2020-09-07 21:28:22 +01:00
|
|
|
# This playbook is for OpenDev infra consumption only.
|
2020-07-15 10:22:55 -07:00
|
|
|
- hosts: controller
|
|
|
|
tasks:
|
|
|
|
- name: Run glance validation script
|
|
|
|
shell:
|
|
|
|
executable: /bin/bash
|
|
|
|
cmd: |
|
|
|
|
source /opt/stack/devstack/openrc
|
2020-07-21 15:54:24 -07:00
|
|
|
set -xe
|
2020-09-07 21:28:22 +01:00
|
|
|
cirrosimg=$(glance image-list | grep cirros | cut -d" " -f 2)
|
2020-07-21 15:54:24 -07:00
|
|
|
|
2023-06-14 09:24:03 +00:00
|
|
|
# There could be more than one cirros image so traverse through the list
|
|
|
|
for image in $cirrosimg
|
|
|
|
do
|
|
|
|
echo "Dumping the cirros image for debugging..."
|
|
|
|
glance image-show $image
|
2020-07-21 15:54:24 -07:00
|
|
|
|
2023-06-14 09:24:03 +00:00
|
|
|
echo "Checking that the cirros image was decorated with metdata on import..."
|
|
|
|
glance image-list --property-filter 'glance_devstack_test=doyouseeme?' | grep $image
|
2020-07-21 15:54:24 -07:00
|
|
|
|
2023-06-14 09:24:03 +00:00
|
|
|
echo "Checking that the cirros image was converted to raw on import..."
|
|
|
|
glance image-show $image | egrep -e 'disk_format.*raw'
|
|
|
|
done
|
2020-07-15 10:22:55 -07:00
|
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|