Set Tempest storage protocol and vendor w/o setting driver

Set TEMPEST_STORAGE_PROTOCOL and TEMPEST_VOLUME_VENDOR if
they are changed from their defaults, or if
TEMPEST_VOLUME_DRIVER is changed.

This maintains the current behavior of setting these options if
TEMPEST_VOLUME_DRIVER is set to something other than "default".

Change-Id: I1fb7f5db0446f97de48b97a6f451882cc51c51a4
This commit is contained in:
Eric Harney 2014-10-14 18:53:53 -04:00
parent a647898275
commit 014564873e

View File

@ -64,8 +64,10 @@ BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}"
# Cinder/Volume variables
TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-"Open Source"}
TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-iSCSI}
TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR}
TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI"
TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL}
# Neutron/Network variables
IPV6_ENABLED=$(trueorfalse True $IPV6_ENABLED)
@ -369,8 +371,12 @@ function configure_tempest {
iniset $TEMPEST_CONFIG volume backend2_name "LVM_iSCSI_2"
fi
if [ $TEMPEST_VOLUME_DRIVER != "default" ]; then
if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
$TEMPEST_VOLUME_VENDOR != $TEMPEST_DEFAULT_VOLUME_VENDOR ]; then
iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR"
fi
if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
$TEMPEST_STORAGE_PROTOCOL != $TEMPEST_DEFAULT_STORAGE_PROTOCOL ]; then
iniset $TEMPEST_CONFIG volume storage_protocol $TEMPEST_STORAGE_PROTOCOL
fi