Merge common properties on list_images
Several properties which are passed to list_images are the same
between glance v1 and v2 API on the test.
So this patch merges them to clearify the difference.
Change-Id: Id3d71e90cc4173b393f9d8fcfd60283e0159b856
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 3a4428a..c65fee4 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -375,17 +375,18 @@
'backup_type': "daily",
'instance_uuid': self.server_id,
}
+ params = {
+ 'status': 'active',
+ 'sort_key': 'created_at',
+ 'sort_dir': 'asc'
+ }
if CONF.image_feature_enabled.api_v1:
- params = dict(
- properties=properties, status='active',
- sort_key='created_at', sort_dir='asc',)
+ params.update({'properties': properties})
image_list = glance_client.list_images(
detail=True,
**params)['images']
else:
# Additional properties are flattened in glance v2.
- params = dict(
- status='active', sort_key='created_at', sort_dir='asc')
params.update(properties)
image_list = glance_client.list_images(params)['images']