From df6793a86e8d8ac4c29cd763ac928bdc9876ac04 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 13 Mar 2014 23:38:11 -0500 Subject: [PATCH] Update stack.sh to use openstackclient commands There were a few instances of keystoneclient still being used, these were replaced with their openstackclient equivalent. Change-Id: I47fb7cf949b9ab054b97ae387ecbc6d7070fa9c3 --- stack.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/stack.sh b/stack.sh index e76a55c534..b302e80312 100755 --- a/stack.sh +++ b/stack.sh @@ -1134,15 +1134,9 @@ fi # Create an access key and secret key for nova ec2 register image if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then - NOVA_USER_ID=$(keystone user-list | grep ' nova ' | get_field 1) - die_if_not_set $LINENO NOVA_USER_ID "Failure retrieving NOVA_USER_ID for nova" - NOVA_TENANT_ID=$(keystone tenant-list | grep " $SERVICE_TENANT_NAME " | get_field 1) - die_if_not_set $LINENO NOVA_TENANT_ID "Failure retrieving NOVA_TENANT_ID for $SERVICE_TENANT_NAME" - CREDS=$(keystone ec2-credentials-create --user-id $NOVA_USER_ID --tenant-id $NOVA_TENANT_ID) - ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }') - SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }') - iniset $NOVA_CONF DEFAULT s3_access_key "$ACCESS_KEY" - iniset $NOVA_CONF DEFAULT s3_secret_key "$SECRET_KEY" + eval $(openstack ec2 credentials create --user nova --project $SERVICE_TENANT_NAME -f shell -c access -c secret) + iniset $NOVA_CONF DEFAULT s3_access_key "$access" + iniset $NOVA_CONF DEFAULT s3_secret_key "$secret" iniset $NOVA_CONF DEFAULT s3_affix_tenant "True" fi