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,
|
'DeployIdentifier': 123456789,
|
||||||
'UpdateIdentifier': '',
|
'UpdateIdentifier': '',
|
||||||
'StackAction': 'UPDATE',
|
'StackAction': 'UPDATE',
|
||||||
|
'DeployIdentifier': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _custom_create_params_env(_self, parameters, tht_root,
|
def _custom_create_params_env(_self, parameters, tht_root,
|
||||||
|
@ -277,7 +278,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'OvercloudControlFlavor': 'oooq_control',
|
'OvercloudControlFlavor': 'oooq_control',
|
||||||
'OvercloudControllerFlavor': 'oooq_control',
|
'OvercloudControllerFlavor': 'oooq_control',
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'UpdateIdentifier': ''}}
|
'UpdateIdentifier': '',
|
||||||
|
'DeployIdentifier': ''}}
|
||||||
|
|
||||||
self.cmd.take_action(parsed_args)
|
self.cmd.take_action(parsed_args)
|
||||||
|
|
||||||
|
@ -429,6 +431,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'DeployIdentifier': 123456789,
|
'DeployIdentifier': 123456789,
|
||||||
'UpdateIdentifier': '',
|
'UpdateIdentifier': '',
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
|
'DeployIdentifier': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
testcase = self
|
testcase = self
|
||||||
|
@ -561,7 +564,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
|
|
||||||
def _custom_create_params_env(_self, parameters, tht_root,
|
def _custom_create_params_env(_self, parameters, tht_root,
|
||||||
container_name):
|
container_name):
|
||||||
testcase.assertTrue('DeployIdentifier' not in parameters)
|
testcase.assertTrue(parameters['DeployIdentifier'] == '')
|
||||||
parameter_defaults = {"parameter_defaults": parameters}
|
parameter_defaults = {"parameter_defaults": parameters}
|
||||||
return parameter_defaults
|
return parameter_defaults
|
||||||
|
|
||||||
|
@ -1085,7 +1088,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
parameters_env = {
|
parameters_env = {
|
||||||
'parameter_defaults': {
|
'parameter_defaults': {
|
||||||
'StackAction': 'UPDATE',
|
'StackAction': 'UPDATE',
|
||||||
'UpdateIdentifier': ''}}
|
'UpdateIdentifier': '',
|
||||||
|
'DeployIdentifier': ''}}
|
||||||
reg_env = {
|
reg_env = {
|
||||||
'parameter_defaults': {
|
'parameter_defaults': {
|
||||||
'rhel_reg_activation_key': 'super-awesome-key',
|
'rhel_reg_activation_key': 'super-awesome-key',
|
||||||
|
@ -1527,6 +1531,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'UpdateIdentifier': '',
|
'UpdateIdentifier': '',
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'NtpServer': 'ntp',
|
'NtpServer': 'ntp',
|
||||||
|
'DeployIdentifier': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _custom_create_params_env(_self, parameters, tht_root,
|
def _custom_create_params_env(_self, parameters, tht_root,
|
||||||
|
|
|
@ -70,6 +70,10 @@ class DeployOvercloud(command.Command):
|
||||||
|
|
||||||
stack_is_new = stack is None
|
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['UpdateIdentifier'] = ''
|
||||||
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
|
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue