Fix tempest_roles for devstack plugin

Currently the devstack plugin sets creator role for tempest user, but it may
conflict with other roles already set to that configuration key. This patch
adds the creator role to the list of roles instead of replacing its value.

Change-Id: I8bdfc31bb2baeabe1d599ea6e9be3c473531f8b6
This commit is contained in:
Miriam Yumi 2018-09-21 10:57:45 -03:00
parent fd1d2fc604
commit 947aa6e1de

View File

@ -1,7 +1,13 @@
# Configure the needed tempest options # Configure the needed tempest options
function configure_barbican_tempest() { function configure_barbican_tempest() {
iniset $TEMPEST_CONFIG service_available barbican True iniset $TEMPEST_CONFIG service_available barbican True
iniset $TEMPEST_CONFIG auth tempest_roles creator roles="$(iniget $TEMPEST_CONFIG auth tempest_roles)"
if [[ -z $roles ]]; then
roles="creator"
else
roles="$roles,creator"
fi
iniset $TEMPEST_CONFIG auth tempest_roles $roles
} }
# check for service enabled # check for service enabled