Merge "Don't set DeployIdentifier in tripleoclient"
This commit is contained in:
commit
8aa4f8810f
|
@ -239,9 +239,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'NeutronPublicInterface': 'nic1',
|
'NeutronPublicInterface': 'nic1',
|
||||||
'NtpServer': '',
|
'NtpServer': '',
|
||||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||||
'UpdateIdentifier': '',
|
|
||||||
'StackAction': 'UPDATE',
|
'StackAction': 'UPDATE',
|
||||||
'DeployIdentifier': '',
|
|
||||||
'UndercloudHostsEntries': [
|
'UndercloudHostsEntries': [
|
||||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane']
|
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane']
|
||||||
}
|
}
|
||||||
|
@ -338,8 +336,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
parameters_env = {
|
parameters_env = {
|
||||||
'parameter_defaults': {
|
'parameter_defaults': {
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'UpdateIdentifier': '',
|
|
||||||
'DeployIdentifier': '',
|
|
||||||
'UndercloudHostsEntries':
|
'UndercloudHostsEntries':
|
||||||
['192.168.0.1 uc.ctlplane.localhost uc.ctlplane']}}
|
['192.168.0.1 uc.ctlplane.localhost uc.ctlplane']}}
|
||||||
|
|
||||||
|
@ -474,9 +470,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'NeutronTunnelTypes': 'gre',
|
'NeutronTunnelTypes': 'gre',
|
||||||
'NtpServer': '',
|
'NtpServer': '',
|
||||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||||
'UpdateIdentifier': '',
|
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'DeployIdentifier': '',
|
|
||||||
'UndercloudHostsEntries': [
|
'UndercloudHostsEntries': [
|
||||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
||||||
]
|
]
|
||||||
|
@ -595,16 +589,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
baremetal = clients.baremetal
|
baremetal = clients.baremetal
|
||||||
baremetal.node.list.return_value = range(10)
|
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)
|
self.cmd.take_action(parsed_args)
|
||||||
mock_copy.assert_called_once()
|
mock_copy.assert_called_once()
|
||||||
object_client.put_container.assert_called_once_with(
|
object_client.put_container.assert_called_once_with(
|
||||||
|
@ -1221,10 +1205,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
'NeutronPublicInterface': 'nic1',
|
'NeutronPublicInterface': 'nic1',
|
||||||
'NeutronTunnelTypes': 'gre',
|
'NeutronTunnelTypes': 'gre',
|
||||||
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
'SnmpdReadonlyUserPassword': 'PASSWORD',
|
||||||
'UpdateIdentifier': '',
|
|
||||||
'StackAction': 'CREATE',
|
'StackAction': 'CREATE',
|
||||||
'NtpServer': 'ntp',
|
'NtpServer': 'ntp',
|
||||||
'DeployIdentifier': '',
|
|
||||||
'UndercloudHostsEntries': [
|
'UndercloudHostsEntries': [
|
||||||
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
'192.168.0.1 uc.ctlplane.localhost uc.ctlplane'
|
||||||
]
|
]
|
||||||
|
@ -1532,8 +1514,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||||
self.cmd.take_action(parsed_args)
|
self.cmd.take_action(parsed_args)
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
[mock.call(mock.ANY, mock.ANY, 'overcloud', mock.ANY,
|
[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']}, {},
|
['192.168.0.1 uc.ctlplane.localhost uc.ctlplane']}, {},
|
||||||
451, mock.ANY, {}, False, False, False, None,
|
451, mock.ANY, {}, False, False, False, None,
|
||||||
deployment_options={})],
|
deployment_options={})],
|
||||||
|
|
|
@ -68,16 +68,6 @@ 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.
|
|
||||||
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'
|
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
|
||||||
|
|
||||||
# Update parameters from answers file:
|
# Update parameters from answers file:
|
||||||
|
|
Loading…
Reference in New Issue