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
This commit is contained in:
parent
e765946be1
commit
e5ed4b9f1e
@ -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,13 +45,8 @@ 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)
|
||||
body = self.image_client.create_image(**params)
|
||||
@ -60,9 +54,6 @@ class ScenarioTest(manager.NetworkScenarioTest):
|
||||
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)
|
||||
|
||||
if CONF.image_feature_enabled.import_image:
|
||||
|
Loading…
Reference in New Issue
Block a user