Skip to content

Commit

Permalink
Revert "system_spec => system"
Browse files Browse the repository at this point in the history
This reverts commit 951fea4.
  • Loading branch information
devcurmudgeon committed Apr 18, 2016
1 parent 0faed37 commit 0d57728
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ybd/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ def deploy(defs, target):
deploy_system(defs, system)


def deploy_system(defs, system, parent_location=''):
def deploy_system(defs, system_spec, parent_location=''):
'''Deploy a system and subsystems recursively.
Takes a system (i.e. an entry in the "systems" list in a cluster
Takes a system spec (i.e. an entry in the "systems" list in a cluster
definition), and optionally a path to a parent system tree. If
`parent_location` is given then the `location` given in the cluster
definition for the subsystem is appended to `parent_location`, with
the result being used as the location for the deployment extensions.
'''
system = defs.get(system['path'])
deploy_defaults = system.get('deploy-defaults')
system = defs.get(system_spec['path'])
deploy_defaults = system_spec.get('deploy-defaults')

with sandbox.setup(system):
app.log(system, 'Extracting system artifact into', system['sandbox'])
with open(cache.get_cache(defs, system), 'r') as artifact:
call(['tar', 'x', '--directory', system['sandbox']],
stdin=artifact)

for subsystem in system.get('subsystems', []):
for subsystem in system_spec.get('subsystems', []):
if deploy_defaults:
subsystem = dict(deploy_defaults.items() + subsystem.items())
deploy_system(defs, subsystem, parent_location=system['sandbox'])

for name, deployment in system.get('deploy', {}).iteritems():
for name, deployment in system_spec.get('deploy', {}).iteritems():
method = deployment.get('type') or deployment.get('upgrade-type')
method = os.path.basename(method)
if deploy_defaults:
Expand Down

0 comments on commit 0d57728

Please sign in to comment.