Merge "Update stack.sh to use openstackclient commands"
This commit is contained in:
commit
871b1e4709
12
stack.sh
12
stack.sh
@ -1128,15 +1128,9 @@ fi
|
|||||||
|
|
||||||
# Create an access key and secret key for nova ec2 register image
|
# 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
|
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)
|
eval $(openstack ec2 credentials create --user nova --project $SERVICE_TENANT_NAME -f shell -c access -c secret)
|
||||||
die_if_not_set $LINENO NOVA_USER_ID "Failure retrieving NOVA_USER_ID for nova"
|
iniset $NOVA_CONF DEFAULT s3_access_key "$access"
|
||||||
NOVA_TENANT_ID=$(keystone tenant-list | grep " $SERVICE_TENANT_NAME " | get_field 1)
|
iniset $NOVA_CONF DEFAULT s3_secret_key "$secret"
|
||||||
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"
|
|
||||||
iniset $NOVA_CONF DEFAULT s3_affix_tenant "True"
|
iniset $NOVA_CONF DEFAULT s3_affix_tenant "True"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user