Move properties handling to the test side
On Glance v1 API, properties are passed on headers and the v1 client
changed properties' names internally.
Service clients should work without any wrapper functions, so this
patch moves the handling to the test side.
Change-Id: I46716e2948eeb429a597289c3db54e978a154f27
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index c65fee4..0d06119 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -381,7 +381,8 @@
'sort_dir': 'asc'
}
if CONF.image_feature_enabled.api_v1:
- params.update({'properties': properties})
+ for key, value in properties.items():
+ params['property-%s' % key] = value
image_list = glance_client.list_images(
detail=True,
**params)['images']
diff --git a/tempest/services/image/v1/json/images_client.py b/tempest/services/image/v1/json/images_client.py
index 5680668..ed0a676 100644
--- a/tempest/services/image/v1/json/images_client.py
+++ b/tempest/services/image/v1/json/images_client.py
@@ -130,10 +130,6 @@
if detail:
url += '/detail'
- properties = kwargs.pop('properties', {})
- for key, value in six.iteritems(properties):
- kwargs['property-%s' % key] = value
-
if kwargs.get('changes_since'):
kwargs['changes-since'] = kwargs.pop('changes_since')