From e5ed4b9f1e6b2843c48b0df56a71cdb185004ef7 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Sun, 6 Aug 2023 12:03:34 -0700 Subject: [PATCH] Remove Glance v1 APIs tests code Glance v1 APIs were removed in Rocky and tempest master does not support the Rocky release. If glance v1 APIs needs to be tested for older release then older Tempest can be used. Tempest is removing the Glance v1 APIs tests, config option, and its service clients and this change is needed for that. Needed-By: https://review.opendev.org/c/openstack/tempest/+/890592 Change-Id: I0ef67e86730320755e6f642a36f97ab462fe0aad --- .../tests/scenario/manager.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py index b7f8914..cb4e52c 100644 --- a/barbican_tempest_plugin/tests/scenario/manager.py +++ b/barbican_tempest_plugin/tests/scenario/manager.py @@ -16,7 +16,6 @@ from oslo_log import log -from tempest.common import image as common_image from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils @@ -46,24 +45,16 @@ class ScenarioTest(manager.NetworkScenarioTest): 'name': name, 'container_format': fmt, 'disk_format': disk_format or fmt, + 'visibility': 'private' } - if CONF.image_feature_enabled.api_v1: - params['is_public'] = 'False' - params['properties'] = properties - params = {'headers': common_image.image_meta_to_headers(**params)} - else: - params['visibility'] = 'private' - # Additional properties are flattened out in the v2 API. - params.update(properties) + # Additional properties are flattened out in the v2 API. + params.update(properties) body = self.image_client.create_image(**params) image = body['image'] if 'image' in body else body self.addCleanup(self.image_client.delete_image, image['id']) self.assertEqual("queued", image['status']) with open(path, 'rb') as image_file: - if CONF.image_feature_enabled.api_v1: - self.image_client.update_image(image['id'], data=image_file) - else: - self.image_client.store_image_file(image['id'], image_file) + self.image_client.store_image_file(image['id'], image_file) if CONF.image_feature_enabled.import_image: available_stores = []