Remove the reference to overcloud-without-mergepy file
overcloud-without-mergepy.yaml file is removed in the as part of bug #1619786. Removing its reference in the client too. Change-Id: Icaaec4190681f2d0f3c4ab6efc6b7f073372aed1
This commit is contained in:
parent
698655303e
commit
fc9480236b
@ -31,7 +31,7 @@ SERVICE_LIST = {
|
||||
}
|
||||
|
||||
TRIPLEO_HEAT_TEMPLATES = "/usr/share/openstack-tripleo-heat-templates/"
|
||||
OVERCLOUD_YAML_NAMES = ("overcloud-without-mergepy.yaml", "overcloud.yaml")
|
||||
OVERCLOUD_YAML_NAME = "overcloud.yaml"
|
||||
RESOURCE_REGISTRY_NAME = "overcloud-resource-registry-puppet.yaml"
|
||||
RHEL_REGISTRATION_EXTRACONFIG_NAME = (
|
||||
"extraconfig/pre_deploy/rhel-registration/")
|
||||
|
@ -218,7 +218,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
|
||||
mock_get_template_contents.assert_called_with(
|
||||
object_request=mock.ANY,
|
||||
template_object=constants.OVERCLOUD_YAML_NAMES[0])
|
||||
template_object=constants.OVERCLOUD_YAML_NAME)
|
||||
|
||||
mock_create_tempest_deployer_input.assert_called_with()
|
||||
mock_process_multiple_env.assert_called_with([])
|
||||
@ -393,7 +393,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
|
||||
mock_get_template_contents.assert_called_with(
|
||||
object_request=mock.ANY,
|
||||
template_object=constants.OVERCLOUD_YAML_NAMES[0])
|
||||
template_object=constants.OVERCLOUD_YAML_NAME)
|
||||
|
||||
mock_create_tempest_deployer_input.assert_called_with()
|
||||
mock_process_multiple_env.assert_called_with(['/fake/path'])
|
||||
@ -498,7 +498,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
|
||||
mock_get_template_contents.assert_called_with(
|
||||
object_request=mock.ANY,
|
||||
template_object=constants.OVERCLOUD_YAML_NAMES[0])
|
||||
template_object=constants.OVERCLOUD_YAML_NAME)
|
||||
|
||||
mock_create_tempest_deployer_input.assert_called_with()
|
||||
mock_process_multiple_env.assert_called_with([])
|
||||
@ -888,34 +888,14 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
self.assertIsNone(result)
|
||||
mock_heat_deploy_func.assert_called_once_with(
|
||||
self.cmd, {}, 'overcloud',
|
||||
'/fake/path/' + constants.OVERCLOUD_YAML_NAMES[0], {},
|
||||
'/fake/path/' + constants.OVERCLOUD_YAML_NAME, {},
|
||||
['~/overcloud-env.json'], 1, '/fake/path', {})
|
||||
|
||||
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
|
||||
'_heat_deploy')
|
||||
def test_try_overcloud_deploy_w_only_second_template_existing(
|
||||
self, mock_heat_deploy_func):
|
||||
mock_heat_deploy_func.side_effect = [
|
||||
ObjectClientException('error'), None]
|
||||
result = self.cmd._try_overcloud_deploy_with_compat_yaml(
|
||||
'/fake/path', {}, 'overcloud', {}, ['~/overcloud-env.json'], 1, {})
|
||||
# If it returns None it succeeded
|
||||
self.assertIsNone(result)
|
||||
mock_heat_deploy_func.assert_has_calls(
|
||||
[mock.call({}, 'overcloud',
|
||||
'/fake/path/' + constants.OVERCLOUD_YAML_NAMES[0], {},
|
||||
['~/overcloud-env.json'], 1, '/fake/path', {}),
|
||||
mock.call({}, 'overcloud',
|
||||
'/fake/path/' + constants.OVERCLOUD_YAML_NAMES[1], {},
|
||||
['~/overcloud-env.json'], 1, '/fake/path', {})])
|
||||
|
||||
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
|
||||
'_heat_deploy', autospec=True)
|
||||
def test_try_overcloud_deploy_with_no_templates_existing(
|
||||
self, mock_heat_deploy_func):
|
||||
mock_heat_deploy_func.side_effect = [
|
||||
ObjectClientException('error')
|
||||
for stack_file in constants.OVERCLOUD_YAML_NAMES]
|
||||
mock_heat_deploy_func.side_effect = ObjectClientException('error')
|
||||
self.assertRaises(ValueError,
|
||||
self.cmd._try_overcloud_deploy_with_compat_yaml,
|
||||
'/fake/path', mock.ANY, mock.ANY, mock.ANY,
|
||||
@ -925,9 +905,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
'_heat_deploy', autospec=True)
|
||||
def test_try_overcloud_deploy_show_missing_file(
|
||||
self, mock_heat_deploy_func):
|
||||
mock_heat_deploy_func.side_effect = [
|
||||
mock_heat_deploy_func.side_effect = \
|
||||
ObjectClientException('/fake/path not found')
|
||||
for stack_file in constants.OVERCLOUD_YAML_NAMES]
|
||||
try:
|
||||
self.cmd._try_overcloud_deploy_with_compat_yaml(
|
||||
'/fake/path', mock.ANY, mock.ANY, mock.ANY,
|
||||
@ -1021,8 +1000,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
|
||||
# Check that Heat was called with correct parameters:
|
||||
call_args = mock_heat_deploy.call_args[0]
|
||||
self.assertEqual(call_args[3],
|
||||
'/dev/null/overcloud-without-mergepy.yaml')
|
||||
self.assertEqual(call_args[3], '/dev/null/overcloud.yaml')
|
||||
self.assertIn('/tmp/foo3.yaml', call_args[5])
|
||||
self.assertIn('/tmp/environment.yaml', call_args[5])
|
||||
foo_index = call_args[5].index('/tmp/foo3.yaml')
|
||||
@ -1347,7 +1325,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
|
||||
mock_get_template_contents.assert_called_with(
|
||||
object_request=mock.ANY,
|
||||
template_object=constants.OVERCLOUD_YAML_NAMES[0])
|
||||
template_object=constants.OVERCLOUD_YAML_NAME)
|
||||
|
||||
mock_create_tempest_deployer_input.assert_called_with()
|
||||
mock_process_multiple_env.assert_called_with(['/fake/path'])
|
||||
|
@ -439,18 +439,14 @@ class DeployOvercloud(command.Command):
|
||||
stack_name, parameters,
|
||||
created_env_files, timeout,
|
||||
env):
|
||||
messages = ['The following errors occurred:']
|
||||
for overcloud_yaml_name in constants.OVERCLOUD_YAML_NAMES:
|
||||
overcloud_yaml = os.path.join(tht_root, overcloud_yaml_name)
|
||||
try:
|
||||
self._heat_deploy(stack, stack_name, overcloud_yaml,
|
||||
parameters, created_env_files, timeout,
|
||||
tht_root, env)
|
||||
except ClientException as e:
|
||||
messages.append(str(e))
|
||||
else:
|
||||
return
|
||||
raise ValueError('\n'.join(messages))
|
||||
overcloud_yaml = os.path.join(tht_root, constants.OVERCLOUD_YAML_NAME)
|
||||
try:
|
||||
self._heat_deploy(stack, stack_name, overcloud_yaml,
|
||||
parameters, created_env_files, timeout,
|
||||
tht_root, env)
|
||||
except ClientException as e:
|
||||
messages = 'Failed to deploy: %s' % str(e)
|
||||
raise ValueError(messages)
|
||||
|
||||
def _is_tls_enabled(self, overcloud_endpoint):
|
||||
return overcloud_endpoint.startswith('https')
|
||||
|
Loading…
x
Reference in New Issue
Block a user