Browse code

Merge "Add compute microversions configuration on tempest"

Jenkins authored on 2015/12/15 21:51:34
Showing 1 changed files
... ...
@@ -357,6 +357,30 @@ function configure_tempest {
357 357
         compute_api_extensions=$(remove_disabled_extensions $compute_api_extensions $DISABLE_COMPUTE_API_EXTENSIONS)
358 358
     fi
359 359
 
360
+    # Set the microversion range for compute tests.
361
+    # This is used to run the Nova microversions tests.
362
+    # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests.
363
+    # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion"
364
+    #       for stable branch on each release which should be changed from "latest" to max supported version of that release.
365
+    local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None}
366
+    local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"}
367
+    # Reset microversions to None where v2.0 is running which does not support microversion.
368
+    # Both "None" means no microversion testing.
369
+    if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then
370
+        tempest_compute_min_microversion=None
371
+        tempest_compute_max_microversion=None
372
+    fi
373
+    if [ "$tempest_compute_min_microversion" == "None" ]; then
374
+        inicomment $TEMPEST_CONFIG compute-feature-enabled min_microversion
375
+    else
376
+        iniset $TEMPEST_CONFIG compute-feature-enabled min_microversion $tempest_compute_min_microversion
377
+    fi
378
+    if [ "$tempest_compute_max_microversion" == "None" ]; then
379
+        inicomment $TEMPEST_CONFIG compute-feature-enabled max_microversion
380
+    else
381
+        iniset $TEMPEST_CONFIG compute-feature-enabled max_microversion $tempest_compute_max_microversion
382
+    fi
383
+
360 384
     iniset $TEMPEST_CONFIG compute-feature-enabled resize True
361 385
     iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
362 386
     iniset $TEMPEST_CONFIG compute-feature-enabled change_password False