Fix another_role variable for swift
An error occurs because ANOTHER_ROLE variable in lib/swift is not set. This patch gets and sets the value to another_role variable. Change-Id: I9d67ce243eb6bb42ed7e3522ef816295847d48fa Closes-Bug: #1363884
This commit is contained in:
parent
a672e02818
commit
d3654058e5
@ -357,9 +357,8 @@ function create_keystone_accounts {
|
||||
# The Member role is used by Horizon and Swift so we need to keep it:
|
||||
local member_role=$(get_or_create_role "Member")
|
||||
|
||||
# ANOTHER_ROLE demonstrates that an arbitrary role may be created and used
|
||||
# another_role demonstrates that an arbitrary role may be created and used
|
||||
# TODO(sleepsonthefloor): show how this can be used for rbac in the future!
|
||||
|
||||
local another_role=$(get_or_create_role "anotherrole")
|
||||
|
||||
# invisible tenant - admin can't see this one
|
||||
|
@ -556,6 +556,7 @@ function create_swift_accounts {
|
||||
|
||||
local service_tenant=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
|
||||
local admin_role=$(openstack role list | awk "/ admin / { print \$2 }")
|
||||
local another_role=$(openstack role list | awk "/ anotherrole / { print \$2 }")
|
||||
|
||||
local swift_user=$(get_or_create_user "swift" \
|
||||
"$SERVICE_PASSWORD" $service_tenant)
|
||||
@ -582,7 +583,7 @@ function create_swift_accounts {
|
||||
local swift_user_test3=$(get_or_create_user swiftusertest3 $swiftusertest3_password \
|
||||
"$swift_tenant_test1" "test3@example.com")
|
||||
die_if_not_set $LINENO swift_user_test3 "Failure creating swift_user_test3"
|
||||
get_or_add_user_role $ANOTHER_ROLE $swift_user_test3 $swift_tenant_test1
|
||||
get_or_add_user_role $another_role $swift_user_test3 $swift_tenant_test1
|
||||
|
||||
local swift_tenant_test2=$(get_or_create_project swifttenanttest2)
|
||||
die_if_not_set $LINENO swift_tenant_test2 "Failure creating swift_tenant_test2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user