Merge "Remove ceph-specific logic from update/upgrade prepare workflow"
This commit is contained in:
@@ -28,12 +28,11 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
class UpdateStackAction(templates.ProcessTemplatesAction):
|
||||
|
||||
def __init__(self, timeout, container_registry, ceph_ansible_playbook,
|
||||
def __init__(self, timeout, container_registry,
|
||||
container=constants.DEFAULT_CONTAINER_NAME):
|
||||
super(UpdateStackAction, self).__init__(container)
|
||||
self.timeout_mins = timeout
|
||||
self.container_registry = container_registry
|
||||
self.ceph_ansible_playbook = ceph_ansible_playbook
|
||||
|
||||
def run(self, context):
|
||||
# get the stack. Error if doesn't exist
|
||||
@@ -80,9 +79,6 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
|
||||
parameters = {}
|
||||
if self.container_registry is not None:
|
||||
parameters.update(self.container_registry['parameter_defaults'])
|
||||
if self.ceph_ansible_playbook:
|
||||
parameters.update({'CephAnsiblePlaybook': '%s' %
|
||||
self.ceph_ansible_playbook})
|
||||
plan_utils.update_in_env(swift, env, 'parameter_defaults', parameters)
|
||||
|
||||
# process all plan files and create or update a stack
|
||||
|
||||
@@ -108,8 +108,7 @@ class UpdateStackActionTest(base.TestCase):
|
||||
mock_object_client.return_value = mock_swift
|
||||
|
||||
action = package_update.UpdateStackAction(self.timeout, fake_registry,
|
||||
container=self.container,
|
||||
ceph_ansible_playbook=None)
|
||||
container=self.container)
|
||||
action.run(mock_ctx)
|
||||
mock_updateinenv.assert_called_once_with(
|
||||
mock_swift, env, 'parameter_defaults',
|
||||
|
||||
@@ -12,7 +12,6 @@ workflows:
|
||||
input:
|
||||
- container
|
||||
- container_registry
|
||||
- ceph_ansible_playbook: '/usr/share/ceph-ansible/site-docker.yml.sample'
|
||||
- timeout: 240
|
||||
- queue_name: tripleo
|
||||
- skip_deploy_identifier: False
|
||||
@@ -28,21 +27,9 @@ workflows:
|
||||
timeout: <% $.timeout %>
|
||||
container: <% $.container %>
|
||||
container_registry: <% $.container_registry %>
|
||||
ceph_ansible_playbook: <% $.ceph_ansible_playbook %>
|
||||
on-success: clean_plan
|
||||
on-error: set_update_failed
|
||||
|
||||
clean_plan:
|
||||
action: tripleo.plan.update_plan_environment
|
||||
input:
|
||||
container: <% $.container %>
|
||||
parameter: CephAnsiblePlaybook
|
||||
env_key: parameter_defaults
|
||||
delete: true
|
||||
on-success: send_message
|
||||
on-error: set_update_failed
|
||||
|
||||
|
||||
set_update_failed:
|
||||
on-success: send_message
|
||||
publish:
|
||||
|
||||
Reference in New Issue
Block a user