summaryrefslogtreecommitdiff
path: root/ybd/deployment.py
diff options
context:
space:
mode:
Diffstat (limited to 'ybd/deployment.py')
-rw-r--r--ybd/deployment.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ybd/deployment.py b/ybd/deployment.py
index a802be6..7d3b150 100644
--- a/ybd/deployment.py
+++ b/ybd/deployment.py
@@ -18,6 +18,7 @@ import os
from subprocess import call
import json
from ybd import app, cache, sandbox
+from ybd.utils import log
def deploy(target):
@@ -41,12 +42,12 @@ def deploy_system(system_spec, parent_location=''):
'''
system = app.defs.get(system_spec['path'])
if not cache.get_cache(system):
- app.log('DEPLOY', 'System is not built, cannot deploy:\n', system,
+ log('DEPLOY', 'System is not built, cannot deploy:\n', system,
exit=True)
deploy_defaults = system_spec.get('deploy-defaults')
with sandbox.setup(system):
- app.log(system, 'Extracting system artifact into', system['sandbox'])
+ log(system, 'Extracting system artifact into', system['sandbox'])
with open(cache.get_cache(system), 'r') as artifact:
call(['tar', 'x', '--directory', system['sandbox']],
stdin=artifact)
@@ -70,7 +71,7 @@ def deploy_system(system_spec, parent_location=''):
try:
sandbox.run_extension(system, deployment, 'check', method)
except KeyError:
- app.log(system, "Couldn't find a check extension for", method)
+ log(system, "Couldn't find a check extension for", method)
for ext in system.get('configuration-extensions', []):
sandbox.run_extension(system, deployment, 'configure',
@@ -80,7 +81,7 @@ def deploy_system(system_spec, parent_location=''):
def do_deployment_manifest(system, configuration):
- app.log(system, "Creating deployment manifest in", system['sandbox'])
+ log(system, "Creating deployment manifest in", system['sandbox'])
data = {'configuration': configuration}
metafile = os.path.join(system['sandbox'], 'baserock', 'deployment.meta')
with app.chdir(system['sandbox']), open(metafile, "w") as f: