Fix role creation in tools/create_userrc.sh

* use role-create instead of tenant-create
* add some missing quote

Change-Id: I3e263bfbfe63a35c5a95248f05d78bd6a1c2e593
This commit is contained in:
Attila Fazekas 2013-01-08 16:51:05 +01:00
parent b2a1d7deae
commit 5b813bc489

View File

@ -173,10 +173,10 @@ function add_entry(){
fi fi
cat >"$rcfile" <<EOF cat >"$rcfile" <<EOF
# you can source this file # you can source this file
export EC2_ACCESS_KEY=$ec2_access_key export EC2_ACCESS_KEY="$ec2_access_key"
export EC2_SECRET_KEY=$ec2_secret_key export EC2_SECRET_KEY="$ec2_secret_key"
export EC2_URL=$EC2_URL export EC2_URL="$EC2_URL"
export S3_URL=$S3_URL export S3_URL="$S3_URL"
# OpenStack USER ID = $user_id # OpenStack USER ID = $user_id
export OS_USERNAME="$user_name" export OS_USERNAME="$user_name"
# Openstack Tenant ID = $tenant_id # Openstack Tenant ID = $tenant_id
@ -210,7 +210,7 @@ function create_or_get_role(){
if [ -n "$role_id" ]; then if [ -n "$role_id" ]; then
echo $role_id echo $role_id
else else
keystone tenant-create --name "$role_name" |awk '/\|[[:space:]]*id[[:space:]]*\|.*\|/ {print $4}' keystone role-create --name "$role_name" |awk '/\|[[:space:]]*id[[:space:]]*\|.*\|/ {print $4}'
fi fi
} }