From dfc6c56490eb358018f79822ae9847e2be89d8b3 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 27 Nov 2020 23:47:18 -0600 Subject: [PATCH] Remove retired Qinling support Qinling project is retiring in Wallaby cycle[1]. This commit removes the usages of Qinling project before its code is removed. Needed-By: https://review.opendev.org/c/openstack/qinling/+/764521 [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018638.html Change-Id: Ic35b8fb37fb1916a6e51c147372a92cdc04281cf --- lower-constraints.txt | 1 - mistral_extra/actions/generator_factory.py | 2 +- mistral_extra/actions/openstack/actions.py | 23 ---------------- mistral_extra/actions/openstack/mapping.json | 27 ------------------- .../unit/actions/openstack/test_generator.py | 8 +----- .../openstack/test_openstack_actions.py | 13 --------- ...emove-qinling-suport-523fc534d7008f3f.yaml | 7 +++++ requirements.txt | 1 - 8 files changed, 9 insertions(+), 73 deletions(-) create mode 100644 releasenotes/notes/remove-qinling-suport-523fc534d7008f3f.yaml diff --git a/lower-constraints.txt b/lower-constraints.txt index 1a86d9e..15f415f 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -36,5 +36,4 @@ python-ironicclient==2.7.0 python-ironic-inspector-client==1.5.0 python-vitrageclient==2.0.0 python-zunclient==3.4.0 -python-qinlingclient==1.0.0 yaql==1.1.3 diff --git a/mistral_extra/actions/generator_factory.py b/mistral_extra/actions/generator_factory.py index c741bac..7b1b401 100644 --- a/mistral_extra/actions/generator_factory.py +++ b/mistral_extra/actions/generator_factory.py @@ -21,7 +21,7 @@ SUPPORTED_MODULES = [ 'Nova', 'Glance', 'Keystone', 'Heat', 'Neutron', 'Cinder', 'Trove', 'Ironic', 'Baremetal Introspection', 'Swift', 'SwiftService', 'Zaqar', 'Barbican', 'Mistral', 'Designate', 'Magnum', 'Murano', 'Tacker', - 'Aodh', 'Gnocchi', 'Glare', 'Vitrage', 'Senlin', 'Zun', 'Qinling', 'Manila' + 'Aodh', 'Gnocchi', 'Glare', 'Vitrage', 'Senlin', 'Zun', 'Manila' ] diff --git a/mistral_extra/actions/openstack/actions.py b/mistral_extra/actions/openstack/actions.py index af52ee1..8beaf95 100644 --- a/mistral_extra/actions/openstack/actions.py +++ b/mistral_extra/actions/openstack/actions.py @@ -70,7 +70,6 @@ neutronclient = _try_import('neutronclient.v2_0.client') nova = _try_import('novaclient') novaclient = _try_import('novaclient.client') nova_api_versions = _try_import('novaclient.api_versions') -qinlingclient = _try_import('qinlingclient.v1.client') senlinclient = _try_import('senlinclient.v1.client') swift_client = _try_import('swiftclient.client') swiftservice = _try_import('swiftclient.service') @@ -1015,28 +1014,6 @@ class ZunAction(base.OpenStackAction): ) -class QinlingAction(base.OpenStackAction): - _service_type = 'function-engine' - - @classmethod - def _get_client_class(cls): - return qinlingclient.Client - - def _create_client(self, context): - qinling_endpoint = self.get_service_endpoint() - session_and_auth = self.get_session_and_auth(context) - - return self._get_client_class()(endpoint_override=qinling_endpoint.url, - session=session_and_auth['session']) - - @classmethod - def _get_fake_client(cls): - return cls._get_client_class()( - endpoint_override="http://127.0.0.1:7070/", - session=ks_session.Session() - ) - - class ManilaAction(base.OpenStackAction): _service_type = 'sharev2' diff --git a/mistral_extra/actions/openstack/mapping.json b/mistral_extra/actions/openstack/mapping.json index f5028d3..9b22f80 100644 --- a/mistral_extra/actions/openstack/mapping.json +++ b/mistral_extra/actions/openstack/mapping.json @@ -1307,33 +1307,6 @@ "services_enable": "services.enable", "services_list": "services.list" }, - "qinling": { - "_comment": "Qinling v1 actions", - "runtimes_create": "runtimes.create", - "runtimes_list": "runtimes.list", - "runtimes_get": "runtimes.get", - "runtimes_delete": "runtimes.delete", - "functions_create": "functions.create", - "functions_list": "functions.list", - "functions_get": "functions.get", - "functions_update": "functions.update", - "functions_delete": "functions.delete", - "function_executions_create": "function_executions.create", - "function_executions_list": "function_executions.list", - "function_executions_get": "function_executions.get", - "function_executions_delete": "function_executions.delete", - "function_executions_get_log": "function_executions.get_log", - "jobs_create": "jobs.create", - "jobs_list": "jobs.list", - "jobs_get": "jobs.get", - "jobs_update": "jobs.update", - "jobs_delete": "jobs.delete", - "webhooks_create": "webhooks.create", - "webhooks_list": "webhooks.list", - "webhooks_get": "webhooks.get", - "webhooks_update": "webhooks.update", - "webhooks_delete": "webhooks.delete" - }, "manila": { "_comment": "It uses manilaclient.v2.", "availability_zones_list": "availability_zones.list", diff --git a/mistral_extra/tests/unit/actions/openstack/test_generator.py b/mistral_extra/tests/unit/actions/openstack/test_generator.py index dc8d5b3..b338a2d 100644 --- a/mistral_extra/tests/unit/actions/openstack/test_generator.py +++ b/mistral_extra/tests/unit/actions/openstack/test_generator.py @@ -57,8 +57,7 @@ MODULE_MAPPING = { 'gnocchi': ['gnocchi.metric_list', actions.GnocchiAction], 'glare': ['glare.artifacts_list', actions.GlareAction], 'vitrage': ['vitrage.alarm_get', actions.VitrageAction], - 'zun': ['zun.containers_list', actions.ZunAction], - 'qinling': ['qinling.runtimes_list', actions.QinlingAction] + 'zun': ['zun.containers_list', actions.ZunAction] } EXTRA_MODULES = ['neutron', 'swift', 'zaqar', 'tacker', 'senlin'] @@ -89,11 +88,6 @@ class GeneratorTest(base.BaseTest): actions.ZunAction, "get_fake_client_method", return_value=lambda x: None)) - # Same for Qinling client - self.useFixture(fixtures.MockPatchObject( - actions.QinlingAction, "get_fake_client_method", - return_value=lambda x: None)) - def test_generator(self): for generator_cls in generator_factory.all_generators(): action_classes = generator_cls.create_actions() diff --git a/mistral_extra/tests/unit/actions/openstack/test_openstack_actions.py b/mistral_extra/tests/unit/actions/openstack/test_openstack_actions.py index dad3f56..852df86 100644 --- a/mistral_extra/tests/unit/actions/openstack/test_openstack_actions.py +++ b/mistral_extra/tests/unit/actions/openstack/test_openstack_actions.py @@ -379,19 +379,6 @@ class OpenStackActionTest(base.BaseTestCase): container_id="1234-abcd" ) - @mock.patch.object(actions.QinlingAction, '_get_client') - def test_qinling_action(self, mocked): - mock_ctx = mock.Mock() - method_name = "runtimes.get" - action_class = actions.QinlingAction - action_class.client_method_name = method_name - params = {'id': '1234-abcd'} - action = action_class(**params) - action.run(mock_ctx) - - self.assertTrue(mocked().runtimes.get.called) - mocked().runtimes.get.assert_called_once_with(id="1234-abcd") - @mock.patch.object(actions.ManilaAction, '_get_client') def test_manila_action(self, mocked): mock_ctx = mock.Mock() diff --git a/releasenotes/notes/remove-qinling-suport-523fc534d7008f3f.yaml b/releasenotes/notes/remove-qinling-suport-523fc534d7008f3f.yaml new file mode 100644 index 0000000..59b7bb5 --- /dev/null +++ b/releasenotes/notes/remove-qinling-suport-523fc534d7008f3f.yaml @@ -0,0 +1,7 @@ +upgrade: + - | + The ``Qinling`` project is no longer maintained and + `retired since Wallaby cycle`__ . Its support is also removed + since Wallaby cycle. + + __ http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018638.html diff --git a/requirements.txt b/requirements.txt index 1359a2a..e4667cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,6 @@ python-ironicclient!=2.7.1,!=3.0.0,>=2.7.0 # Apache-2.0 python-ironic-inspector-client>=1.5.0 # Apache-2.0 python-vitrageclient>=2.0.0 # Apache-2.0 python-zunclient>=3.4.0 # Apache-2.0 -python-qinlingclient>=1.0.0 # Apache-2.0 oauthlib>=0.6.2 # BSD yaql>=1.1.3 # Apache-2.0 keystoneauth1>=3.18.0 # Apache-2.0 \ No newline at end of file