Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Just set the breakpoints on args passed to heat update"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Feb 20, 2017
2 parents 65bf4d0 + 999ceeb commit a191504
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
28 changes: 16 additions & 12 deletions tripleo_common/actions/package_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,6 @@ def run(self):
'name': wf_env.name,
'variables': wf_env.variables,
}
template_utils.deep_update(wf_env.variables, {
'resource_registry': {
'resources': {
'*': {
'*': {
constants.UPDATE_RESOURCE_NAME: {
'hooks': 'pre-update'}
}
}
}
}
})

# store params changes back to db before call to process templates
wc.environments.update(**env_kwargs)
Expand All @@ -114,6 +102,22 @@ def run(self):
return processed_data

stack_args = processed_data.copy()

env = stack_args.get('environment', {})
template_utils.deep_update(env, {
'resource_registry': {
'resources': {
'*': {
'*': {
constants.UPDATE_RESOURCE_NAME: {
'hooks': 'pre-update'}
}
}
}
}
})
stack_args['environment'] = env

stack_args['timeout_mins'] = self.timeout_mins
stack_args['existing'] = 'true'

Expand Down
12 changes: 10 additions & 2 deletions tripleo_common/tests/actions/test_package_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,13 @@ def test_run(self, mock_template_contents,
DeployIdentifier=1473366264,
UpdateIdentifier=1473366264,
existing='true',
timeout_mins=1
)
timeout_mins=1,
environment={
'resource_registry': {
'resources': {
'*': {
'*': {'UpdateDeployment': {'hooks': 'pre-update'}}
}
}
}
})

0 comments on commit a191504

Please sign in to comment.