Make our tempest job use import, standalone, and inject_metadata

This configures Glance to inject a random piece of metadata
into images that are created via import, cause devstack to use import,
and execute a post-run job to make sure the cirros image that was
uploaded via import got that metadata as expected.

Change-Id: I7851e2b5ed21534e739327ce9562d458064eab1c
This commit is contained in:
Dan Smith 2020-07-15 10:22:55 -07:00
parent 9c66f46a14
commit 7d49b7ffc2
2 changed files with 36 additions and 0 deletions

View File

@ -208,6 +208,26 @@
python_version: 3.6
tox_envlist: functional-py36
- job:
name: tempest-integrated-storage-import-workflow
parent: tempest-integrated-storage
description: |
The regular tempest-integrated-storage job but with glance metadata injection
post-run: playbooks/post-check-metadata-injection.yaml
vars:
devstack_localrc:
GLANCE_STANDALONE: True
GLANCE_USE_IMPORT_WORKFLOW: True
devstack_local_conf:
post-config:
$GLANCE_IMAGE_IMPORT_CONF:
image_import_opts:
image_import_plugins: "['inject_image_metadata']"
inject_metadata_properties:
ignore_user_roles:
inject: |
"glance_devstack_test":"doyouseeme?"
- project:
templates:
- check-requirements
@ -239,6 +259,8 @@
- ^\.zuul\.yaml$
- tempest-integrated-storage:
irrelevant-files: *tempest-irrelevant-files
- tempest-integrated-storage-import-workflow:
irrelevant-files: *tempest-irrelevant-files
- grenade:
irrelevant-files: *tempest-irrelevant-files
- tempest-ipv6-only:
@ -250,6 +272,8 @@
- openstack-tox-functional-py38
- tempest-integrated-storage:
irrelevant-files: *tempest-irrelevant-files
- tempest-integrated-storage-import-workflow:
irrelevant-files: *tempest-irrelevant-files
- grenade:
irrelevant-files: *tempest-irrelevant-files
- tempest-ipv6-only:

View File

@ -0,0 +1,12 @@
- hosts: controller
tasks:
- name: Run glance validation script
shell:
executable: /bin/bash
cmd: |
set -xe
source /opt/stack/devstack/openrc
# NOTE(danms): just dump the image so we can see it in case the check fails
openstack image show $(openstack image list -f csv -c ID -c Name --quote none | grep cirros | cut -d , -f 1)
openstack image list -f value -c Name --property 'glance_devstack_test=doyouseeme?' | grep cirros
environment: '{{ zuul | zuul_legacy_vars }}'