Moves image_info from cloud to proxy object

This makes image_info compatible with new sdk version
- This patch changes get_image (which is a cloud object method) to image.get_image (proxy object method)
- image.images accepts **query which is a dict object. So this patch changes the args passed to a dict. If properties is not specified it passes an empty dict.
- updates the documentation to reflect the actual returned parameters
- adds a ci test to list all images without specifying image name or property and assert no field is missing
- changes openstack_image to image in ansible return value

Change-Id: Ibf934568f069c305747fc24fbb22ce3fc095286c
This commit is contained in:
anbanerj
2022-02-07 20:05:28 +05:30
committed by Jakob Meng
parent 1d22a94a90
commit c1a9794207
6 changed files with 335 additions and 23 deletions

View File

@@ -25,8 +25,8 @@
- name: Verify image info
assert:
that:
- "image_info_result.openstack_image.name == image_name"
- "image_info_result.openstack_image.tags | sort == image_tags | sort"
- "image_info_result.images[0].name == image_name"
- "image_info_result.images[0].tags | sort == image_tags | sort"
- name: Delete raw image (defaults)
openstack.cloud.image:
@@ -71,4 +71,4 @@
- name: Verify image is deleted
assert:
that:
- not deleted_image_info_result.openstack_image
- not deleted_image_info_result.images