Skip to content

Commit 7a8d850

Browse files
committed
Add variable to set volume service version on tempest
Tempest is going to test volume v3 APIs as default in gate and running a separate job to run tests on v2 APIs. To give this ability, this commit provide a var to tell which API version need to be tested and accordingly it configure the catalog_type and microversion setting on tempest. Change-Id: I531f3b32e81ac5d282461597ca286c09429cb143 Needed-By: I0c9193501eb9eaa25eb5f0786bb72eb7855099fb
1 parent f4cec2d commit 7a8d850

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

lib/tempest

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ function configure_tempest {
422422
iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME
423423

424424
# Volume
425+
# Set the service catalog entry for Tempest to run on. Typically
426+
# used to try different Volume API version targets. The tempest
427+
# default it to 'volumev3'(v3 APIs endpoint) , so only set this
428+
# if you want to change it.
429+
if [[ -n "$TEMPEST_VOLUME_TYPE" ]]; then
430+
iniset $TEMPEST_CONFIG volume catalog_type $TEMPEST_VOLUME_TYPE
431+
fi
425432
# Only turn on TEMPEST_VOLUME_MANAGE_SNAPSHOT by default for "lvm" backends
426433
if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then
427434
TEMPEST_VOLUME_MANAGE_SNAPSHOT=${TEMPEST_VOLUME_MANAGE_SNAPSHOT:-True}
@@ -443,6 +450,12 @@ function configure_tempest {
443450
iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 $(trueorfalse False TEMPEST_VOLUME_API_V1)
444451
local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None}
445452
local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"}
453+
# Reset microversions to None where v2 is running which does not support microversion.
454+
# Both "None" means no microversion testing.
455+
if [[ "$TEMPEST_VOLUME_TYPE" == "volumev2" ]]; then
456+
tempest_volume_min_microversion=None
457+
tempest_volume_max_microversion=None
458+
fi
446459
if [ "$tempest_volume_min_microversion" == "None" ]; then
447460
inicomment $TEMPEST_CONFIG volume min_microversion
448461
else

0 commit comments

Comments
 (0)