From 7e2dcaea03b199efdff626ca2f0854555ff3407c Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Sun, 9 Apr 2017 22:33:28 +1200 Subject: [PATCH] Fix gate failure The failure: http://logs.openstack.org/45/454945/1/check/gate-mistral-devstack-dsvm-ubuntu-xenial-nv/e9daa6e/console.html#_2017-04-08_11_50_48_519100 When populate workflow actions in database, no actual authentication is made, as a result, for Keystone client, the 'service_catalog' property value is None. After the patch[1], the 'service_catalog' related actions won't be inserted into the database and can not be used in workflow definition. This change removes 'service_catalog' related actions from the mapping file and modify the keystone action test case accordingly. Change-Id: I469d38cad165b57690c43db485f86e898f08de06 --- mistral/actions/openstack/mapping.json | 8 -------- .../openstack/action_collection_wb.yaml | 16 ++++++++-------- .../engine/actions/v2/test_openstack_actions.py | 6 +++--- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/mistral/actions/openstack/mapping.json b/mistral/actions/openstack/mapping.json index f08fadd50..8284fb47d 100644 --- a/mistral/actions/openstack/mapping.json +++ b/mistral/actions/openstack/mapping.json @@ -411,14 +411,6 @@ "roles_list": "roles.list", "roles_revoke": "roles.revoke", "roles_update": "roles.update", - "service_catalog_catalog": "service_catalog.catalog", - "service_catalog_factory": "service_catalog.factory", - "service_catalog_get_data": "service_catalog.get_data", - "service_catalog_get_endpoints": "service_catalog.get_endpoints", - "service_catalog_get_token": "service_catalog.get_token", - "service_catalog_get_urls": "service_catalog.get_urls", - "service_catalog_is_valid": "service_catalog.is_valid", - "service_catalog_url_for": "service_catalog.url_for", "services_create": "services.create", "services_delete": "services.delete", "services_find": "services.find", diff --git a/mistral/tests/resources/openstack/action_collection_wb.yaml b/mistral/tests/resources/openstack/action_collection_wb.yaml index b95d0f0db..47ab49c0c 100644 --- a/mistral/tests/resources/openstack/action_collection_wb.yaml +++ b/mistral/tests/resources/openstack/action_collection_wb.yaml @@ -6,10 +6,10 @@ workflows: keystone: type: direct tasks: - catalog: - action: keystone.service_catalog_get_data + projects_list: + action: keystone.projects_list publish: - result: <% task(catalog).result %> + result: <% task().result %> nova: type: direct @@ -17,7 +17,7 @@ workflows: networks_list: action: nova.networks_list publish: - result: <% task(networks_list).result %> + result: <% task().result %> glance: type: direct @@ -25,7 +25,7 @@ workflows: images_list: action: glance.images_list publish: - result: <% task(images_list).result %> + result: <% task().result %> heat: type: direct @@ -33,7 +33,7 @@ workflows: stacks_list: action: heat.stacks_list publish: - result: <% task(stacks_list).result %> + result: <% task().result %> neutron: type: direct @@ -41,7 +41,7 @@ workflows: list_subnets: action: neutron.list_subnets publish: - result: <% task(list_subnets).result %> + result: <% task().result %> cinder: type: direct @@ -49,5 +49,5 @@ workflows: volumes_list: action: cinder.volumes_list publish: - result: <% task(volumes_list).result %> + result: <% task().result %> diff --git a/mistral_tempest_tests/tests/scenario/engine/actions/v2/test_openstack_actions.py b/mistral_tempest_tests/tests/scenario/engine/actions/v2/test_openstack_actions.py index dbc7455f7..2625a80cf 100644 --- a/mistral_tempest_tests/tests/scenario/engine/actions/v2/test_openstack_actions.py +++ b/mistral_tempest_tests/tests/scenario/engine/actions/v2/test_openstack_actions.py @@ -46,9 +46,9 @@ class OpenStackActionsTestsV2(base.TestCase): @decorators.idempotent_id('81bdc1c9-cd9a-4c97-b8ce-e44f5211eace') def test_keystone_actions(self): wf_name = self.wb['name'] + '.keystone' - _, execution = self.client.create_execution(wf_name) - self.client.wait_execution_success(execution) - executed_task = self.client.get_wf_tasks(wf_name)[-1] + _, execution = self.admin_client.create_execution(wf_name) + self.admin_client.wait_execution_success(execution) + executed_task = self.admin_client.get_wf_tasks(wf_name)[-1] self.assertEqual('SUCCESS', executed_task['state'])