| ... | ... |
@@ -452,15 +452,26 @@ function configure_tempest {
|
| 452 | 452 |
fi |
| 453 | 453 |
|
| 454 | 454 |
# Using ``CINDER_ENABLED_BACKENDS`` |
| 455 |
+ # Cinder uses a comma separated list with "type:backend_name": |
|
| 456 |
+ # CINDER_ENABLED_BACKENDS = ceph:cephBE1,lvm:lvmBE2,foo:my_foo |
|
| 455 | 457 |
if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then |
| 458 |
+ # We have at least 2 backends |
|
| 456 | 459 |
iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True" |
| 457 |
- local i=1 |
|
| 460 |
+ local add_comma_seperator=0 |
|
| 461 |
+ local backends_list='' |
|
| 458 | 462 |
local be |
| 463 |
+ # Tempest uses a comma separated list of backend_names: |
|
| 464 |
+ # backend_names = BACKEND_1,BACKEND_2 |
|
| 459 | 465 |
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
| 460 |
- local be_name=${be##*:}
|
|
| 461 |
- iniset $TEMPEST_CONFIG volume "backend${i}_name" "$be_name"
|
|
| 462 |
- i=$(( i + 1 )) |
|
| 466 |
+ if [ "$add_comma_seperator" -eq "1" ]; then |
|
| 467 |
+ backends_list+=,${be##*:}
|
|
| 468 |
+ else |
|
| 469 |
+ # first element in the list |
|
| 470 |
+ backends_list+=${be##*:}
|
|
| 471 |
+ add_comma_seperator=1 |
|
| 472 |
+ fi |
|
| 463 | 473 |
done |
| 474 |
+ iniset $TEMPEST_CONFIG volume "backend_names" "$backends_list" |
|
| 464 | 475 |
fi |
| 465 | 476 |
|
| 466 | 477 |
if [ $TEMPEST_VOLUME_DRIVER != "default" -o \ |