Skip to content

Commit 52de582

Browse files
etoewsapevec
authored andcommitted
Changed --user to --user_id and --role to --role_id in the keystone client for consistency. Need to update keystone calls here.
This change should be applied after [bug/994744 b7fe11c] in python-keystoneclient. Fixes bug 994744. stable/essex note: keystoneclient trunk is used by stable/essex devstack because there aren't stable branches for client libraries so we need this change to pass devstack gate, currently failing with: keystone user-role-add: error: ambiguous option: --user could match --user-id, --user_id Change-Id: I13e643f8552d86ed0bf92799271899f777bde9b2
1 parent 66d47a2 commit 52de582

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

files/keystone_data.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ ANOTHER_ROLE=$(get_id keystone role-create --name=anotherrole)
5656

5757

5858
# Add Roles to Users in Tenants
59-
keystone user-role-add --user $ADMIN_USER --role $ADMIN_ROLE --tenant_id $ADMIN_TENANT
60-
keystone user-role-add --user $ADMIN_USER --role $ADMIN_ROLE --tenant_id $DEMO_TENANT
61-
keystone user-role-add --user $DEMO_USER --role $ANOTHER_ROLE --tenant_id $DEMO_TENANT
59+
keystone user-role-add --user_id $ADMIN_USER --role_id $ADMIN_ROLE --tenant_id $ADMIN_TENANT
60+
keystone user-role-add --user_id $ADMIN_USER --role_id $ADMIN_ROLE --tenant_id $DEMO_TENANT
61+
keystone user-role-add --user_id $DEMO_USER --role_id $ANOTHER_ROLE --tenant_id $DEMO_TENANT
6262

6363
# TODO(termie): these two might be dubious
64-
keystone user-role-add --user $ADMIN_USER --role $KEYSTONEADMIN_ROLE --tenant_id $ADMIN_TENANT
65-
keystone user-role-add --user $ADMIN_USER --role $KEYSTONESERVICE_ROLE --tenant_id $ADMIN_TENANT
64+
keystone user-role-add --user_id $ADMIN_USER --role_id $KEYSTONEADMIN_ROLE --tenant_id $ADMIN_TENANT
65+
keystone user-role-add --user_id $ADMIN_USER --role_id $KEYSTONESERVICE_ROLE --tenant_id $ADMIN_TENANT
6666

6767

6868
# The Member role is used by Horizon and Swift so we need to keep it:
6969
MEMBER_ROLE=$(get_id keystone role-create --name=Member)
70-
keystone user-role-add --user $DEMO_USER --role $MEMBER_ROLE --tenant_id $DEMO_TENANT
71-
keystone user-role-add --user $DEMO_USER --role $MEMBER_ROLE --tenant_id $INVIS_TENANT
70+
keystone user-role-add --user_id $DEMO_USER --role_id $MEMBER_ROLE --tenant_id $DEMO_TENANT
71+
keystone user-role-add --user_id $DEMO_USER --role_id $MEMBER_ROLE --tenant_id $INVIS_TENANT
7272

7373

7474
# Configure service users/roles
@@ -77,34 +77,34 @@ NOVA_USER=$(get_id keystone user-create --name=nova \
7777
--tenant_id $SERVICE_TENANT \
7878
--email=nova@example.com)
7979
keystone user-role-add --tenant_id $SERVICE_TENANT \
80-
--user $NOVA_USER \
81-
--role $ADMIN_ROLE
80+
--user_id $NOVA_USER \
81+
--role_id $ADMIN_ROLE
8282

8383
GLANCE_USER=$(get_id keystone user-create --name=glance \
8484
--pass="$SERVICE_PASSWORD" \
8585
--tenant_id $SERVICE_TENANT \
8686
--email=glance@example.com)
8787
keystone user-role-add --tenant_id $SERVICE_TENANT \
88-
--user $GLANCE_USER \
89-
--role $ADMIN_ROLE
88+
--user_id $GLANCE_USER \
89+
--role_id $ADMIN_ROLE
9090

9191
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
9292
SWIFT_USER=$(get_id keystone user-create --name=swift \
9393
--pass="$SERVICE_PASSWORD" \
9494
--tenant_id $SERVICE_TENANT \
9595
--email=swift@example.com)
9696
keystone user-role-add --tenant_id $SERVICE_TENANT \
97-
--user $SWIFT_USER \
98-
--role $ADMIN_ROLE
97+
--user_id $SWIFT_USER \
98+
--role_id $ADMIN_ROLE
9999
# Nova needs ResellerAdmin role to download images when accessing
100100
# swift through the s3 api. The admin role in swift allows a user
101101
# to act as an admin for their tenant, but ResellerAdmin is needed
102102
# for a user to act as any tenant. The name of this role is also
103103
# configurable in swift-proxy.conf
104104
RESELLER_ROLE=$(get_id keystone role-create --name=ResellerAdmin)
105105
keystone user-role-add --tenant_id $SERVICE_TENANT \
106-
--user $NOVA_USER \
107-
--role $RESELLER_ROLE
106+
--user_id $NOVA_USER \
107+
--role_id $RESELLER_ROLE
108108
fi
109109

110110
if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
@@ -113,6 +113,6 @@ if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
113113
--tenant_id $SERVICE_TENANT \
114114
--email=quantum@example.com)
115115
keystone user-role-add --tenant_id $SERVICE_TENANT \
116-
--user $QUANTUM_USER \
117-
--role $ADMIN_ROLE
116+
--user_id $QUANTUM_USER \
117+
--role_id $ADMIN_ROLE
118118
fi

0 commit comments

Comments
 (0)