Remove container_registry param from package update action
The package_update_plan mistrl workflow is invoked in upgrade|update|
ceph-upgrade|ffwd-upgrade prepare clis. The container registry
parameter is being removed and we will use treat it as a regular
environment file (see depends-on). This removes it from the Mistral
action and keeps it defaulted in the workflow to prevent
chicken-and-egg issues with CI. We'll remove the workflow parameter in
a follow-up patch.
Partial-Bug: #1785825
Co-Authored-By: Jiri Stransky <jistr@jistr.com>
Related: https://review.openstack.org/570893 python-tripleoclient
Change-Id: I4130dd1eea6caec82dcb4a699875f2951693148f
(cherry picked from commit c837491161
)
This commit is contained in:
parent
d93e12e4a1
commit
40d4c37bf2
|
@ -28,11 +28,10 @@ LOG = logging.getLogger(__name__)
|
|||
|
||||
class UpdateStackAction(templates.ProcessTemplatesAction):
|
||||
|
||||
def __init__(self, timeout, container_registry, ceph_ansible_playbook,
|
||||
def __init__(self, timeout, ceph_ansible_playbook,
|
||||
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):
|
||||
|
@ -56,8 +55,6 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
|
|||
return actions.Result(error=err_msg)
|
||||
|
||||
update_env = {}
|
||||
if self.container_registry is not None:
|
||||
update_env.update(self.container_registry)
|
||||
|
||||
noop_env = {
|
||||
'resource_registry': {
|
||||
|
@ -78,8 +75,6 @@ class UpdateStackAction(templates.ProcessTemplatesAction):
|
|||
update_env.update(noop_env)
|
||||
template_utils.deep_update(env, update_env)
|
||||
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})
|
||||
|
|
|
@ -98,24 +98,13 @@ class UpdateStackActionTest(base.TestCase):
|
|||
update_env = {'resource_registry':
|
||||
{'OS::TripleO::DeploymentSteps': 'OS::Heat::None'}}
|
||||
mock_getenv.return_value = env
|
||||
fake_registry = {'parameter_defaults':
|
||||
{'DockerKeystoneImage': '192.168.24.1:8787/'
|
||||
'keystone-docker:latest',
|
||||
'DockerHeatApiImage:': '192.168.24.1:8787/'
|
||||
'heat-api-docker:latest'}}
|
||||
update_env.update(fake_registry)
|
||||
mock_swift.get_object.return_value = ({}, env)
|
||||
mock_object_client.return_value = mock_swift
|
||||
|
||||
action = package_update.UpdateStackAction(self.timeout, fake_registry,
|
||||
action = package_update.UpdateStackAction(self.timeout,
|
||||
container=self.container,
|
||||
ceph_ansible_playbook=None)
|
||||
action.run(mock_ctx)
|
||||
mock_updateinenv.assert_called_once_with(
|
||||
mock_swift, env, 'parameter_defaults',
|
||||
fake_registry['parameter_defaults']
|
||||
)
|
||||
|
||||
mock_deepupdate.assert_called_once_with(env, update_env)
|
||||
|
||||
heat.stacks.update.assert_called_once_with('stack_id')
|
||||
|
|
|
@ -11,7 +11,7 @@ workflows:
|
|||
|
||||
input:
|
||||
- container
|
||||
- container_registry
|
||||
- container_registry: ''
|
||||
- ceph_ansible_playbook
|
||||
- timeout: 240
|
||||
- queue_name: tripleo
|
||||
|
@ -27,7 +27,6 @@ workflows:
|
|||
input:
|
||||
timeout: <% $.timeout %>
|
||||
container: <% $.container %>
|
||||
container_registry: <% $.container_registry %>
|
||||
ceph_ansible_playbook: <% $.ceph_ansible_playbook %>
|
||||
on-success: clean_plan
|
||||
on-error: set_update_failed
|
||||
|
|
Loading…
Reference in New Issue