Merge "DeployIdentifier should be provided for any parameter actions"
This commit is contained in:
commit
31688cb8c3
@ -165,6 +165,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,
|
||||||
@ -285,7 +286,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||||||
'OvercloudControlFlavor': 'oooq_control',
|
'OvercloudControlFlavor': 'oooq_control',
|
||||||
'OvercloudControllerFlavor': 'oooq_control',
|
'OvercloudControllerFlavor': 'oooq_control',
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'UpdateIdentifier': ''}}
|
'UpdateIdentifier': '',
|
||||||
|
'DeployIdentifier': ''}}
|
||||||
|
|
||||||
mock_rm = shutil.rmtree = mock.MagicMock()
|
mock_rm = shutil.rmtree = mock.MagicMock()
|
||||||
self.cmd.take_action(parsed_args)
|
self.cmd.take_action(parsed_args)
|
||||||
@ -441,6 +443,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||||||
'DeployIdentifier': 123456789,
|
'DeployIdentifier': 123456789,
|
||||||
'UpdateIdentifier': '',
|
'UpdateIdentifier': '',
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
|
'DeployIdentifier': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
testcase = self
|
testcase = self
|
||||||
@ -577,7 +580,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
|
||||||
|
|
||||||
@ -1118,7 +1121,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',
|
||||||
@ -1572,6 +1576,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,
|
||||||
|
@ -69,6 +69,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
Block a user