Merge "Just set the breakpoints on args passed to heat update"

This commit is contained in:
Jenkins 2017-02-20 19:02:14 +00:00 committed by Gerrit Code Review
commit a191504835
2 changed files with 26 additions and 14 deletions

View File

@ -89,18 +89,6 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
'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)
@ -114,6 +102,22 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
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'

View File

@ -139,5 +139,13 @@ class UpdateStackActionTest(base.TestCase):
DeployIdentifier=1473366264,
UpdateIdentifier=1473366264,
existing='true',
timeout_mins=1
)
timeout_mins=1,
environment={
'resource_registry': {
'resources': {
'*': {
'*': {'UpdateDeployment': {'hooks': 'pre-update'}}
}
}
}
})