Just set the breakpoints on args passed to heat update
Rather than update the plan with the breakpoints, just add the breakpoints to the environment passed to the heat update. Change-Id: Ie8acc73c391469b48f3fb04b013562357a70d25f Closes-Bug: #1663635
This commit is contained in:
parent
80859a9349
commit
999ceebf56
|
@ -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'
|
||||
|
||||
|
|
|
@ -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'}}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue