@@ -328,11 +328,11 @@ function configure_keystone_extensions {
328328function create_keystone_accounts {
329329
330330 # admin
331- ADMIN_TENANT =$(get_or_create_project "admin")
332- ADMIN_USER =$(get_or_create_user "admin" \
333- "$ADMIN_PASSWORD" "$ADMIN_TENANT ")
334- ADMIN_ROLE =$(get_or_create_role "admin")
335- get_or_add_user_role $ADMIN_ROLE $ADMIN_USER $ADMIN_TENANT
331+ local admin_tenant =$(get_or_create_project "admin")
332+ local admin_user =$(get_or_create_user "admin" \
333+ "$ADMIN_PASSWORD" "$admin_tenant ")
334+ local admin_role =$(get_or_create_role "admin")
335+ get_or_add_user_role $admin_role $admin_user $admin_tenant
336336
337337 # Create service project/role
338338 get_or_create_project "$SERVICE_TENANT_NAME"
@@ -347,25 +347,25 @@ function create_keystone_accounts {
347347 get_or_create_role ResellerAdmin
348348
349349 # The Member role is used by Horizon and Swift so we need to keep it:
350- MEMBER_ROLE =$(get_or_create_role "Member")
350+ local member_role =$(get_or_create_role "Member")
351351
352352 # ANOTHER_ROLE demonstrates that an arbitrary role may be created and used
353353 # TODO(sleepsonthefloor): show how this can be used for rbac in the future!
354354
355- ANOTHER_ROLE =$(get_or_create_role "anotherrole")
355+ local another_role =$(get_or_create_role "anotherrole")
356356
357357 # invisible tenant - admin can't see this one
358- INVIS_TENANT =$(get_or_create_project "invisible_to_admin")
358+ local invis_tenant =$(get_or_create_project "invisible_to_admin")
359359
360360 # demo
361- DEMO_TENANT =$(get_or_create_project "demo")
362- DEMO_USER =$(get_or_create_user "demo" \
363- "$ADMIN_PASSWORD" "$DEMO_TENANT " "demo@example.com")
364-
365- get_or_add_user_role $MEMBER_ROLE $DEMO_USER $DEMO_TENANT
366- get_or_add_user_role $ADMIN_ROLE $ADMIN_USER $DEMO_TENANT
367- get_or_add_user_role $ANOTHER_ROLE $DEMO_USER $DEMO_TENANT
368- get_or_add_user_role $MEMBER_ROLE $DEMO_USER $INVIS_TENANT
361+ local demo_tenant =$(get_or_create_project "demo")
362+ local demo_user =$(get_or_create_user "demo" \
363+ "$ADMIN_PASSWORD" "$demo_tenant " "demo@example.com")
364+
365+ get_or_add_user_role $member_role $demo_user $demo_tenant
366+ get_or_add_user_role $admin_role $admin_user $demo_tenant
367+ get_or_add_user_role $another_role $demo_user $demo_tenant
368+ get_or_add_user_role $member_role $demo_user $invis_tenant
369369
370370 # Keystone
371371 if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
0 commit comments