Merge "Fix deprecated params user_id, role_id, tenant_id"
This commit is contained in:
commit
364472409b
@ -58,9 +58,9 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]] && [[ "$ENABLED_SERVICES" =~ "s-proxy" |
|
||||
# Nova needs ResellerAdmin role to download images when accessing
|
||||
# swift through the s3 api.
|
||||
keystone user-role-add \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--user_id $NOVA_USER \
|
||||
--role_id $RESELLER_ROLE
|
||||
--tenant-id $SERVICE_TENANT \
|
||||
--user-id $NOVA_USER \
|
||||
--role-id $RESELLER_ROLE
|
||||
fi
|
||||
|
||||
# Heat
|
||||
@ -69,9 +69,9 @@ if [[ "$ENABLED_SERVICES" =~ "heat" ]]; then
|
||||
--pass="$SERVICE_PASSWORD" \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--email=heat@example.com)
|
||||
keystone user-role-add --tenant_id $SERVICE_TENANT \
|
||||
--user_id $HEAT_USER \
|
||||
--role_id $SERVICE_ROLE
|
||||
keystone user-role-add --tenant-id $SERVICE_TENANT \
|
||||
--user-id $HEAT_USER \
|
||||
--role-id $SERVICE_ROLE
|
||||
# heat_stack_user role is for users created by Heat
|
||||
keystone role-create --name heat_stack_user
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
@ -106,9 +106,9 @@ if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--email=glance@example.com)
|
||||
keystone user-role-add \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--user_id $GLANCE_USER \
|
||||
--role_id $ADMIN_ROLE
|
||||
--tenant-id $SERVICE_TENANT \
|
||||
--user-id $GLANCE_USER \
|
||||
--role-id $ADMIN_ROLE
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
GLANCE_SERVICE=$(get_id keystone service-create \
|
||||
--name=glance \
|
||||
@ -129,13 +129,13 @@ if [[ "$ENABLED_SERVICES" =~ "ceilometer" ]]; then
|
||||
--pass="$SERVICE_PASSWORD" \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--email=ceilometer@example.com)
|
||||
keystone user-role-add --tenant_id $SERVICE_TENANT \
|
||||
--user_id $CEILOMETER_USER \
|
||||
--role_id $ADMIN_ROLE
|
||||
keystone user-role-add --tenant-id $SERVICE_TENANT \
|
||||
--user-id $CEILOMETER_USER \
|
||||
--role-id $ADMIN_ROLE
|
||||
# Ceilometer needs ResellerAdmin role to access swift account stats.
|
||||
keystone user-role-add --tenant_id $SERVICE_TENANT \
|
||||
--user_id $CEILOMETER_USER \
|
||||
--role_id $RESELLER_ROLE
|
||||
keystone user-role-add --tenant-id $SERVICE_TENANT \
|
||||
--user-id $CEILOMETER_USER \
|
||||
--role-id $RESELLER_ROLE
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
CEILOMETER_SERVICE=$(get_id keystone service-create \
|
||||
--name=ceilometer \
|
||||
@ -192,7 +192,7 @@ if [[ "$ENABLED_SERVICES" =~ "tempest" ]]; then
|
||||
--pass="$ADMIN_PASSWORD" \
|
||||
--email=alt_demo@example.com)
|
||||
keystone user-role-add \
|
||||
--tenant_id $ALT_DEMO_TENANT \
|
||||
--user_id $ALT_DEMO_USER \
|
||||
--role_id $MEMBER_ROLE
|
||||
--tenant-id $ALT_DEMO_TENANT \
|
||||
--user-id $ALT_DEMO_USER \
|
||||
--role-id $MEMBER_ROLE
|
||||
fi
|
||||
|
@ -335,9 +335,9 @@ create_cinder_accounts() {
|
||||
--email=cinder@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
keystone user-role-add \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--user_id $CINDER_USER \
|
||||
--role_id $ADMIN_ROLE
|
||||
--tenant-id $SERVICE_TENANT \
|
||||
--user-id $CINDER_USER \
|
||||
--role-id $ADMIN_ROLE
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
CINDER_SERVICE=$(keystone service-create \
|
||||
--name=cinder \
|
||||
|
14
lib/keystone
14
lib/keystone
@ -217,9 +217,9 @@ create_keystone_accounts() {
|
||||
--name admin \
|
||||
| grep " id " | get_field 2)
|
||||
keystone user-role-add \
|
||||
--user_id $ADMIN_USER \
|
||||
--role_id $ADMIN_ROLE \
|
||||
--tenant_id $ADMIN_TENANT
|
||||
--user-id $ADMIN_USER \
|
||||
--role-id $ADMIN_ROLE \
|
||||
--tenant-id $ADMIN_TENANT
|
||||
|
||||
# service
|
||||
SERVICE_TENANT=$(keystone tenant-create \
|
||||
@ -244,10 +244,10 @@ create_keystone_accounts() {
|
||||
--pass "$ADMIN_PASSWORD" \
|
||||
--email demo@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
keystone user-role-add --user_id $DEMO_USER --role_id $MEMBER_ROLE --tenant_id $DEMO_TENANT
|
||||
keystone user-role-add --user_id $ADMIN_USER --role_id $ADMIN_ROLE --tenant_id $DEMO_TENANT
|
||||
keystone user-role-add --user_id $DEMO_USER --role_id $ANOTHER_ROLE --tenant_id $DEMO_TENANT
|
||||
keystone user-role-add --user_id $DEMO_USER --role_id $MEMBER_ROLE --tenant_id $INVIS_TENANT
|
||||
keystone user-role-add --user-id $DEMO_USER --role-id $MEMBER_ROLE --tenant-id $DEMO_TENANT
|
||||
keystone user-role-add --user-id $ADMIN_USER --role-id $ADMIN_ROLE --tenant-id $DEMO_TENANT
|
||||
keystone user-role-add --user-id $DEMO_USER --role-id $ANOTHER_ROLE --tenant-id $DEMO_TENANT
|
||||
keystone user-role-add --user-id $DEMO_USER --role-id $MEMBER_ROLE --tenant-id $INVIS_TENANT
|
||||
|
||||
# Keystone
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
|
@ -301,9 +301,9 @@ function create_neutron_accounts() {
|
||||
--email=neutron@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
keystone user-role-add \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--user_id $NEUTRON_USER \
|
||||
--role_id $ADMIN_ROLE
|
||||
--tenant-id $SERVICE_TENANT \
|
||||
--user-id $NEUTRON_USER \
|
||||
--role-id $ADMIN_ROLE
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
NEUTRON_SERVICE=$(keystone service-create \
|
||||
--name=neutron \
|
||||
|
6
lib/nova
6
lib/nova
@ -399,9 +399,9 @@ create_nova_accounts() {
|
||||
--email=nova@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
keystone user-role-add \
|
||||
--tenant_id $SERVICE_TENANT \
|
||||
--user_id $NOVA_USER \
|
||||
--role_id $ADMIN_ROLE
|
||||
--tenant-id $SERVICE_TENANT \
|
||||
--user-id $NOVA_USER \
|
||||
--role-id $ADMIN_ROLE
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
NOVA_SERVICE=$(keystone service-create \
|
||||
--name=nova \
|
||||
|
@ -464,7 +464,7 @@ function create_swift_accounts() {
|
||||
|
||||
SWIFT_USER=$(keystone user-create --name=swift --pass="$SERVICE_PASSWORD" \
|
||||
--tenant_id $SERVICE_TENANT --email=swift@example.com | grep " id " | get_field 2)
|
||||
keystone user-role-add --tenant_id $SERVICE_TENANT --user_id $SWIFT_USER --role_id $ADMIN_ROLE
|
||||
keystone user-role-add --tenant-id $SERVICE_TENANT --user-id $SWIFT_USER --role-id $ADMIN_ROLE
|
||||
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
SWIFT_SERVICE=$(keystone service-create --name=swift --type="object-store" \
|
||||
@ -479,14 +479,14 @@ function create_swift_accounts() {
|
||||
|
||||
SWIFT_TENANT_TEST1=$(keystone tenant-create --name=swifttenanttest1 | grep " id " | get_field 2)
|
||||
SWIFT_USER_TEST1=$(keystone user-create --name=swiftusertest1 --pass=testing --email=test@example.com | grep " id " | get_field 2)
|
||||
keystone user-role-add --user_id $SWIFT_USER_TEST1 --role_id $ADMIN_ROLE --tenant_id $SWIFT_TENANT_TEST1
|
||||
keystone user-role-add --user-id $SWIFT_USER_TEST1 --role-id $ADMIN_ROLE --tenant-id $SWIFT_TENANT_TEST1
|
||||
|
||||
SWIFT_USER_TEST3=$(keystone user-create --name=swiftusertest3 --pass=testing3 --email=test3@example.com | grep " id " | get_field 2)
|
||||
keystone user-role-add --user_id $SWIFT_USER_TEST3 --role_id $ANOTHER_ROLE --tenant_id $SWIFT_TENANT_TEST1
|
||||
keystone user-role-add --user-id $SWIFT_USER_TEST3 --role-id $ANOTHER_ROLE --tenant-id $SWIFT_TENANT_TEST1
|
||||
|
||||
SWIFT_TENANT_TEST2=$(keystone tenant-create --name=swifttenanttest2 | grep " id " | get_field 2)
|
||||
SWIFT_USER_TEST2=$(keystone user-create --name=swiftusertest2 --pass=testing2 --email=test2@example.com | grep " id " | get_field 2)
|
||||
keystone user-role-add --user_id $SWIFT_USER_TEST2 --role_id $ADMIN_ROLE --tenant_id $SWIFT_TENANT_TEST2
|
||||
keystone user-role-add --user-id $SWIFT_USER_TEST2 --role-id $ADMIN_ROLE --tenant-id $SWIFT_TENANT_TEST2
|
||||
}
|
||||
|
||||
# init_swift() - Initialize rings
|
||||
|
Loading…
Reference in New Issue
Block a user