DeployIdentifier should be provided for any parameter actions
DeployIdentifier is update during the deployment workflow in the
tripleo_common, but all the parameter update and get workflows,
before the depoloyment will fail since the parameter is not provided
for the heat stack validation. Adding a dummy entry for the DeployIdentifier
in the tripleoclient which will be replaced to a timestamp in the
deploy workflow.
Closes-Bug: #1759326
Change-Id: I26cc11895a376788d8aad41727676bec73a15d69
(cherry picked from commit 4cb7a22529
)
This commit is contained in:
parent
e899fcffdb
commit
87d25a3cde
|
@ -159,6 +159,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'DeployIdentifier': 123456789,
|
||||
'UpdateIdentifier': '',
|
||||
'StackAction': 'UPDATE',
|
||||
'DeployIdentifier': '',
|
||||
}
|
||||
|
||||
def _custom_create_params_env(_self, parameters, tht_root,
|
||||
|
@ -277,7 +278,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'OvercloudControlFlavor': 'oooq_control',
|
||||
'OvercloudControllerFlavor': 'oooq_control',
|
||||
'StackAction': 'CREATE',
|
||||
'UpdateIdentifier': ''}}
|
||||
'UpdateIdentifier': '',
|
||||
'DeployIdentifier': ''}}
|
||||
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
|
@ -429,6 +431,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'DeployIdentifier': 123456789,
|
||||
'UpdateIdentifier': '',
|
||||
'StackAction': 'CREATE',
|
||||
'DeployIdentifier': '',
|
||||
}
|
||||
|
||||
testcase = self
|
||||
|
@ -561,7 +564,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
|
||||
def _custom_create_params_env(_self, parameters, tht_root,
|
||||
container_name):
|
||||
testcase.assertTrue('DeployIdentifier' not in parameters)
|
||||
testcase.assertTrue(parameters['DeployIdentifier'] == '')
|
||||
parameter_defaults = {"parameter_defaults": parameters}
|
||||
return parameter_defaults
|
||||
|
||||
|
@ -1085,7 +1088,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
parameters_env = {
|
||||
'parameter_defaults': {
|
||||
'StackAction': 'UPDATE',
|
||||
'UpdateIdentifier': ''}}
|
||||
'UpdateIdentifier': '',
|
||||
'DeployIdentifier': ''}}
|
||||
reg_env = {
|
||||
'parameter_defaults': {
|
||||
'rhel_reg_activation_key': 'super-awesome-key',
|
||||
|
@ -1527,6 +1531,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'UpdateIdentifier': '',
|
||||
'StackAction': 'CREATE',
|
||||
'NtpServer': 'ntp',
|
||||
'DeployIdentifier': '',
|
||||
}
|
||||
|
||||
def _custom_create_params_env(_self, parameters, tht_root,
|
||||
|
|
|
@ -70,6 +70,10 @@ class DeployOvercloud(command.Command):
|
|||
|
||||
stack_is_new = stack is None
|
||||
|
||||
# *Identifier will be update to timestamp value during the deploy
|
||||
# workflow, but till then for all heat stack validations, we need
|
||||
# and entry for starting the deploy action.
|
||||
parameters['DeployIdentifier'] = ''
|
||||
parameters['UpdateIdentifier'] = ''
|
||||
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
|
||||
|
||||
|
|
Loading…
Reference in New Issue