Skip to content

Commit 36b69c0

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add variable to set volume service version on tempest"
2 parents 007cbab + 7a8d850 commit 36b69c0

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
@@ -433,6 +433,13 @@ function configure_tempest {
433433
iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME
434434

435435
# Volume
436+
# Set the service catalog entry for Tempest to run on. Typically
437+
# used to try different Volume API version targets. The tempest
438+
# default it to 'volumev3'(v3 APIs endpoint) , so only set this
439+
# if you want to change it.
440+
if [[ -n "$TEMPEST_VOLUME_TYPE" ]]; then
441+
iniset $TEMPEST_CONFIG volume catalog_type $TEMPEST_VOLUME_TYPE
442+
fi
436443
# Only turn on TEMPEST_VOLUME_MANAGE_SNAPSHOT by default for "lvm" backends
437444
if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then
438445
TEMPEST_VOLUME_MANAGE_SNAPSHOT=${TEMPEST_VOLUME_MANAGE_SNAPSHOT:-True}
@@ -454,6 +461,12 @@ function configure_tempest {
454461
iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 $(trueorfalse False TEMPEST_VOLUME_API_V1)
455462
local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None}
456463
local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"}
464+
# Reset microversions to None where v2 is running which does not support microversion.
465+
# Both "None" means no microversion testing.
466+
if [[ "$TEMPEST_VOLUME_TYPE" == "volumev2" ]]; then
467+
tempest_volume_min_microversion=None
468+
tempest_volume_max_microversion=None
469+
fi
457470
if [ "$tempest_volume_min_microversion" == "None" ]; then
458471
inicomment $TEMPEST_CONFIG volume min_microversion
459472
else

0 commit comments

Comments
 (0)