Allow to set min,max API microversion in tempest

This patch introduce new devstack variables to set min and max Ironic
API version to allow skip tempest tests.

 TEMPEST_BAREMETAL_MIN_MICROVERSION
 TEMPEST_BAREMETAL_MAX_MICROVERSION

Set TEMPEST_BAREMETAL_MAX_MICROVERSION to 1.16 as it is latest API
version for mitaka release.

Conflicts:
      devstack/lib/ironic
      doc/source/dev/releasing.rst

Related-Bug: #1655888
Change-Id: Id6d36280f622549a2877aab99c11e4008af67fe7
(cherry picked from commit 76b91709ae)
This commit is contained in:
Vasyl Saienko 2017-01-12 13:40:52 +02:00 committed by John L. Villalovos
parent 26dcd6b7a0
commit 7d2e71c0e4

View File

@ -172,6 +172,12 @@ IRONIC_LIBVIRT_HOOKS_PATH=${IRONIC_LIBVIRT_HOOKS_PATH:-/etc/libvirt/hooks/}
# keystone and noauth.
IRONIC_AUTH_STRATEGY=${IRONIC_AUTH_STRATEGY:-keystone}
# Define baremetal min_microversion in tempest config. Default value None is picked from tempest.
TEMPEST_BAREMETAL_MIN_MICROVERSION=${TEMPEST_BAREMETAL_MIN_MICROVERSION:-}
# Define baremetal max_microversion in tempest config. No default value means that it is picked from tempest.
TEMPEST_BAREMETAL_MAX_MICROVERSION=${TEMPEST_BAREMETAL_MAX_MICROVERSION:-'1.16'}
# get_pxe_boot_file() - Get the PXE/iPXE boot file path
function get_pxe_boot_file {
local relpath=syslinux/pxelinux.0
@ -1023,6 +1029,13 @@ function cleanup_baremetal_basic_ops {
function ironic_configure_tempest {
iniset $TEMPEST_CONFIG service_available ironic True
if [[ -n "$TEMPEST_BAREMETAL_MIN_MICROVERSION" ]]; then
iniset $TEMPEST_CONFIG baremetal min_microversion $TEMPEST_BAREMETAL_MIN_MICROVERSION
fi
if [[ -n "$TEMPEST_BAREMETAL_MAX_MICROVERSION" ]]; then
iniset $TEMPEST_CONFIG baremetal max_microversion $TEMPEST_BAREMETAL_MAX_MICROVERSION
fi
local bm_flavor_id
bm_flavor_id=$(openstack flavor show baremetal -f value -c id)
die_if_not_set $LINENO bm_flavor_id "Failed to get id of baremetal flavor"