Don't set DeployIdentifier in tripleoclient
We set this to a new unique value or empty string
based on skip_deploy_identifier in tripleo-common.
As we don't have a way to compare an old DeployIdentifer
with a new DeployIdentifier in ansible, there is no
point in using the existing value from stack.
Change-Id: Ic52ce8ff38394df9f5234c257ce1affee7ff0791
(cherry picked from commit e001960d15
)
This commit is contained in:
parent
d7ceeff25b
commit
ca70205af6
|
@ -239,9 +239,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'NeutronPublicInterface': 'nic1',
|
||||
'NtpServer': '',
|
||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||
'UpdateIdentifier': '',
|
||||
'StackAction': 'UPDATE',
|
||||
'DeployIdentifier': '',
|
||||
'UndercloudHostsEntries': [
|
||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane']
|
||||
}
|
||||
|
@ -338,8 +336,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
parameters_env = {
|
||||
'parameter_defaults': {
|
||||
'StackAction': 'CREATE',
|
||||
'UpdateIdentifier': '',
|
||||
'DeployIdentifier': '',
|
||||
'UndercloudHostsEntries':
|
||||
['192.168.0.1 uc.ctlplane.localhost uc.ctlplane']}}
|
||||
|
||||
|
@ -474,9 +470,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'NeutronTunnelTypes': 'gre',
|
||||
'NtpServer': '',
|
||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||
'UpdateIdentifier': '',
|
||||
'StackAction': 'CREATE',
|
||||
'DeployIdentifier': '',
|
||||
'UndercloudHostsEntries': [
|
||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
||||
]
|
||||
|
@ -595,16 +589,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
baremetal = clients.baremetal
|
||||
baremetal.node.list.return_value = range(10)
|
||||
|
||||
testcase = self
|
||||
|
||||
def _custom_create_params_env(_self, parameters, tht_root,
|
||||
container_name):
|
||||
testcase.assertTrue(parameters['DeployIdentifier'] == '')
|
||||
parameter_defaults = {"parameter_defaults": parameters}
|
||||
return parameter_defaults
|
||||
|
||||
mock_create_parameters_env.side_effect = _custom_create_params_env
|
||||
|
||||
self.cmd.take_action(parsed_args)
|
||||
mock_copy.assert_called_once()
|
||||
object_client.put_container.assert_called_once_with(
|
||||
|
@ -1221,10 +1205,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
'NeutronPublicInterface': 'nic1',
|
||||
'NeutronTunnelTypes': 'gre',
|
||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||
'UpdateIdentifier': '',
|
||||
'StackAction': 'CREATE',
|
||||
'NtpServer': 'ntp',
|
||||
'DeployIdentifier': '',
|
||||
'UndercloudHostsEntries': [
|
||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
||||
]
|
||||
|
@ -1532,8 +1514,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
self.cmd.take_action(parsed_args)
|
||||
self.assertIn(
|
||||
[mock.call(mock.ANY, mock.ANY, 'overcloud', mock.ANY,
|
||||
{'DeployIdentifier': '', 'UpdateIdentifier': '',
|
||||
'StackAction': 'UPDATE', 'UndercloudHostsEntries':
|
||||
{'StackAction': 'UPDATE', 'UndercloudHostsEntries':
|
||||
['192.168.0.1 uc.ctlplane.localhost uc.ctlplane']}, {},
|
||||
451, mock.ANY, {}, False, False, False, None,
|
||||
deployment_options={})],
|
||||
|
|
|
@ -68,16 +68,6 @@ 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.
|
||||
if stack_is_new or args.skip_deploy_identifier:
|
||||
parameters['DeployIdentifier'] = ''
|
||||
else:
|
||||
parameters[
|
||||
'DeployIdentifier'] = stack.parameters['DeployIdentifier']
|
||||
|
||||
parameters['UpdateIdentifier'] = ''
|
||||
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
|
||||
|
||||
# Update parameters from answers file:
|
||||
|
|
Loading…
Reference in New Issue