Merge "Don't validate stack when creating/updating plan" into stable/queens
This commit is contained in:
commit
dadea7bc02
|
@ -210,7 +210,8 @@ class TestOvercloudCreatePlan(utils.TestCommand):
|
|||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={
|
||||
'container': 'overcast',
|
||||
'generate_passwords': True
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False
|
||||
})
|
||||
|
||||
@mock.patch("tripleoclient.workflows.plan_management.tarball")
|
||||
|
@ -267,7 +268,8 @@ class TestOvercloudCreatePlan(utils.TestCommand):
|
|||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={
|
||||
'container': 'overcast',
|
||||
'generate_passwords': True
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False
|
||||
})
|
||||
|
||||
self.swift.get_account.assert_called_once()
|
||||
|
@ -312,7 +314,8 @@ class TestOvercloudCreatePlan(utils.TestCommand):
|
|||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={
|
||||
'container': 'overcast',
|
||||
'generate_passwords': True
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False
|
||||
})
|
||||
|
||||
mock_open_context.assert_has_calls(
|
||||
|
|
|
@ -49,7 +49,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
plan_management.create_plan_from_templates(
|
||||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/')
|
||||
'/tht-root/',
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -59,7 +60,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True})
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False})
|
||||
|
||||
@mock.patch('tripleoclient.workflows.plan_management.tarball',
|
||||
autospec=True)
|
||||
|
@ -72,7 +74,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
plan_management.create_plan_from_templates,
|
||||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/')
|
||||
'/tht-root/',
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -94,7 +97,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/',
|
||||
'the_roles_file.yaml')
|
||||
'the_roles_file.yaml',
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -104,7 +108,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True})
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False})
|
||||
|
||||
mock_open_context.assert_has_calls(
|
||||
[mock.call('the_roles_file.yaml')])
|
||||
|
@ -125,7 +130,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/',
|
||||
plan_env_file='the-plan-environment.yaml')
|
||||
plan_env_file='the-plan-environment.yaml',
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -135,7 +141,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True})
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False})
|
||||
|
||||
mock_open_context.assert_has_calls(
|
||||
[mock.call('the-plan-environment.yaml')])
|
||||
|
@ -156,7 +163,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/',
|
||||
networks_file='the-network-data.yaml')
|
||||
networks_file='the-network-data.yaml',
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -166,7 +174,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True})
|
||||
'generate_passwords': True,
|
||||
'validate_stack': False})
|
||||
|
||||
mock_open_context.assert_has_calls(
|
||||
[mock.call('the-network-data.yaml')])
|
||||
|
@ -198,7 +207,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/',
|
||||
generate_passwords=False)
|
||||
generate_passwords=False,
|
||||
validate_stack=False)
|
||||
|
||||
self.workflow.action_executions.create.assert_called_once_with(
|
||||
'tripleo.plan.create_container',
|
||||
|
@ -208,7 +218,8 @@ class TestPlanCreationWorkflows(utils.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.create_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': False})
|
||||
'generate_passwords': False,
|
||||
'validate_stack': False})
|
||||
|
||||
|
||||
class TestPlanUpdateWorkflows(base.TestCommand):
|
||||
|
@ -267,7 +278,8 @@ class TestPlanUpdateWorkflows(base.TestCommand):
|
|||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/',
|
||||
keep_env=True)
|
||||
keep_env=True,
|
||||
validate_stack=False)
|
||||
|
||||
mock_empty_container.assert_called_once_with(
|
||||
self.object_store, 'test-overcloud')
|
||||
|
@ -295,7 +307,8 @@ class TestPlanUpdateWorkflows(base.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.update_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True, 'source_url': None})
|
||||
'generate_passwords': True, 'source_url': None,
|
||||
'validate_stack': False})
|
||||
|
||||
@mock.patch('tripleoclient.workflows.plan_management.tarball',
|
||||
autospec=True)
|
||||
|
@ -307,7 +320,8 @@ class TestPlanUpdateWorkflows(base.TestCommand):
|
|||
plan_management.update_plan_from_templates(
|
||||
self.app.client_manager,
|
||||
'test-overcloud',
|
||||
'/tht-root/')
|
||||
'/tht-root/',
|
||||
validate_stack=False)
|
||||
|
||||
mock_empty_container.assert_called_once_with(
|
||||
self.object_store, 'test-overcloud')
|
||||
|
@ -322,7 +336,8 @@ class TestPlanUpdateWorkflows(base.TestCommand):
|
|||
self.workflow.executions.create.assert_called_once_with(
|
||||
'tripleo.plan_management.v1.update_deployment_plan',
|
||||
workflow_input={'container': 'test-overcloud',
|
||||
'generate_passwords': True, 'source_url': None})
|
||||
'generate_passwords': True, 'source_url': None,
|
||||
'validate_stack': False})
|
||||
|
||||
|
||||
class TestUpdatePasswords(base.TestCase):
|
||||
|
|
|
@ -457,13 +457,15 @@ class DeployOvercloud(command.Command):
|
|||
parsed_args.roles_file, generate_passwords,
|
||||
parsed_args.plan_environment_file,
|
||||
parsed_args.networks_file,
|
||||
type(self)._keep_env_on_update)
|
||||
type(self)._keep_env_on_update,
|
||||
validate_stack=False)
|
||||
else:
|
||||
plan_management.create_plan_from_templates(
|
||||
self.clients, parsed_args.stack, tht_root,
|
||||
parsed_args.roles_file, generate_passwords,
|
||||
parsed_args.plan_environment_file,
|
||||
parsed_args.networks_file)
|
||||
parsed_args.networks_file,
|
||||
validate_stack=False)
|
||||
|
||||
# Get any missing (e.g j2 rendered) files from the plan to tht_root
|
||||
self._download_missing_files_from_plan(
|
||||
|
|
|
@ -133,7 +133,8 @@ class CreatePlan(command.Command):
|
|||
plan_management.create_plan_from_templates(
|
||||
clients, name, parsed_args.templates,
|
||||
generate_passwords=generate_passwords,
|
||||
plan_env_file=parsed_args.plan_environment_file)
|
||||
plan_env_file=parsed_args.plan_environment_file,
|
||||
validate_stack=False)
|
||||
else:
|
||||
plan_management.create_deployment_plan(
|
||||
clients, container=name,
|
||||
|
|
|
@ -122,7 +122,7 @@ def create_container(workflow_client, **input_):
|
|||
|
||||
def create_plan_from_templates(clients, name, tht_root, roles_file=None,
|
||||
generate_passwords=True, plan_env_file=None,
|
||||
networks_file=None):
|
||||
networks_file=None, validate_stack=True):
|
||||
workflow_client = clients.workflow_engine
|
||||
swift_client = clients.tripleoclient.object_store
|
||||
|
||||
|
@ -140,7 +140,8 @@ def create_plan_from_templates(clients, name, tht_root, roles_file=None,
|
|||
|
||||
try:
|
||||
create_deployment_plan(clients, container=name,
|
||||
generate_passwords=generate_passwords)
|
||||
generate_passwords=generate_passwords,
|
||||
validate_stack=validate_stack)
|
||||
except exceptions.WorkflowServiceError:
|
||||
swiftutils.delete_container(swift_client, name)
|
||||
raise
|
||||
|
@ -148,7 +149,8 @@ def create_plan_from_templates(clients, name, tht_root, roles_file=None,
|
|||
|
||||
def update_plan_from_templates(clients, name, tht_root, roles_file=None,
|
||||
generate_passwords=True, plan_env_file=None,
|
||||
networks_file=None, keep_env=False):
|
||||
networks_file=None, keep_env=False,
|
||||
validate_stack=True):
|
||||
swift_client = clients.tripleoclient.object_store
|
||||
passwords = None
|
||||
keep_file_contents = {}
|
||||
|
@ -201,7 +203,8 @@ def update_plan_from_templates(clients, name, tht_root, roles_file=None,
|
|||
|
||||
update_deployment_plan(clients, container=name,
|
||||
generate_passwords=generate_passwords,
|
||||
source_url=None)
|
||||
source_url=None,
|
||||
validate_stack=validate_stack)
|
||||
|
||||
|
||||
def _load_content_or_file(swift_client, container, remote_and_local_map):
|
||||
|
|
Loading…
Reference in New Issue