diff --git a/lib/tempest b/lib/tempest index 350d08c331..1716bc73b1 100644 --- a/lib/tempest +++ b/lib/tempest @@ -28,6 +28,7 @@ # - ``DEFAULT_INSTANCE_TYPE`` # - ``DEFAULT_INSTANCE_USER`` # - ``CINDER_MULTI_LVM_BACKEND`` +# - ``CINDER_ENABLED_BACKENDS`` # # ``stack.sh`` calls the entry points in this order: # @@ -364,11 +365,17 @@ function configure_tempest { if ! is_service_enabled c-bak; then iniset $TEMPEST_CONFIG volume-feature-enabled backup False fi - CINDER_MULTI_LVM_BACKEND=$(trueorfalse False $CINDER_MULTI_LVM_BACKEND) - if [ $CINDER_MULTI_LVM_BACKEND == "True" ]; then + + # Using CINDER_ENABLED_BACKENDS + if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True" - iniset $TEMPEST_CONFIG volume backend1_name "LVM_iSCSI" - iniset $TEMPEST_CONFIG volume backend2_name "LVM_iSCSI_2" + local i=1 + local be + for be in ${CINDER_ENABLED_BACKENDS//,/ }; do + local be_name=${be##*:} + iniset $TEMPEST_CONFIG volume "backend${i}_name" "$be_name" + i=$(( i + 1 )) + done fi if [ $TEMPEST_VOLUME_DRIVER != "default" -o \