Browse code

Merge "Add variable to set volume service version on tempest"

Zuul authored on 2018/05/31 21:25:10
Showing 1 changed files
... ...
@@ -433,6 +433,13 @@ function configure_tempest {
433 433
     iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME
434 434
 
435 435
     # 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
436 443
     # Only turn on TEMPEST_VOLUME_MANAGE_SNAPSHOT by default for "lvm" backends
437 444
     if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then
438 445
         TEMPEST_VOLUME_MANAGE_SNAPSHOT=${TEMPEST_VOLUME_MANAGE_SNAPSHOT:-True}
... ...
@@ -454,6 +461,12 @@ function configure_tempest {
454 454
     iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 $(trueorfalse False TEMPEST_VOLUME_API_V1)
455 455
     local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None}
456 456
     local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"}
457
+    # Reset microversions to None where v2 is running which does not support microversion.
458
+    # Both "None" means no microversion testing.
459
+    if [[ "$TEMPEST_VOLUME_TYPE" == "volumev2" ]]; then
460
+        tempest_volume_min_microversion=None
461
+        tempest_volume_max_microversion=None
462
+    fi
457 463
     if [ "$tempest_volume_min_microversion" == "None" ]; then
458 464
         inicomment $TEMPEST_CONFIG volume min_microversion
459 465
     else