Eradicate last of underscores in options

The --ip_range in stack.sh remains due to nova-manage needing to be fixed.

(Rebased 05Dec2013)

Change-Id: Ic0f93d41b6edfdc5deb82ae820e2c0c5a8bce24e
This commit is contained in:
Dean Troyer 2013-11-22 11:30:44 -06:00
parent 3422668612
commit 526b79f988
6 changed files with 16 additions and 18 deletions

View File

@ -149,7 +149,7 @@ fi
# Create the bootable volume # Create the bootable volume
start_time=$(date +%s) start_time=$(date +%s)
cinder create --image-id $IMAGE --display_name=$VOL_NAME --display_description "test bootable volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE || \ cinder create --image-id $IMAGE --display-name=$VOL_NAME --display-description "test bootable volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE || \
die $LINENO "Failure creating volume $VOL_NAME" die $LINENO "Failure creating volume $VOL_NAME"
if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then
echo "Volume $VOL_NAME not created" echo "Volume $VOL_NAME not created"
@ -165,10 +165,10 @@ die_if_not_set $LINENO VOL_ID "Failure retrieving volume ID for $VOL_NAME"
# Boot instance # Boot instance
# ------------- # -------------
# Boot using the --block_device_mapping param. The format of mapping is: # Boot using the --block-device-mapping param. The format of mapping is:
# <dev_name>=<id>:<type>:<size(GB)>:<delete_on_terminate> # <dev_name>=<id>:<type>:<size(GB)>:<delete_on_terminate>
# Leaving the middle two fields blank appears to do-the-right-thing # Leaving the middle two fields blank appears to do-the-right-thing
VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --block-device-mapping vda=$VOL_ID --security_groups=$SECGROUP --key_name $KEY_NAME $VM_NAME | grep ' id ' | get_field 2) VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --block-device-mapping vda=$VOL_ID --security-groups=$SECGROUP --key-name $KEY_NAME $VM_NAME | grep ' id ' | get_field 2)
die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME" die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME"
# Check that the status is active within ACTIVE_TIMEOUT seconds # Check that the status is active within ACTIVE_TIMEOUT seconds

View File

@ -56,10 +56,8 @@ unset OS_PASSWORD
unset OS_AUTH_URL unset OS_AUTH_URL
# Common authentication args # Common authentication args
TENANT_ARG="--os_tenant_name=$x_TENANT_NAME" TENANT_ARG="--os-tenant-name=$x_TENANT_NAME"
TENANT_ARG_DASH="--os-tenant-name=$x_TENANT_NAME" ARGS="--os-username=$x_USERNAME --os-password=$x_PASSWORD --os-auth-url=$x_AUTH_URL"
ARGS="--os_username=$x_USERNAME --os_password=$x_PASSWORD --os_auth_url=$x_AUTH_URL"
ARGS_DASH="--os-username=$x_USERNAME --os-password=$x_PASSWORD --os-auth-url=$x_AUTH_URL"
# Set global return # Set global return
RETURN=0 RETURN=0
@ -71,7 +69,7 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
STATUS_KEYSTONE="Skipped" STATUS_KEYSTONE="Skipped"
else else
echo -e "\nTest Keystone" echo -e "\nTest Keystone"
if keystone $TENANT_ARG_DASH $ARGS_DASH catalog --service identity; then if keystone $TENANT_ARG $ARGS catalog --service identity; then
STATUS_KEYSTONE="Succeeded" STATUS_KEYSTONE="Succeeded"
else else
STATUS_KEYSTONE="Failed" STATUS_KEYSTONE="Failed"
@ -90,7 +88,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
else else
# Test OSAPI # Test OSAPI
echo -e "\nTest Nova" echo -e "\nTest Nova"
if nova $TENANT_ARG_DASH $ARGS_DASH flavor-list; then if nova $TENANT_ARG $ARGS flavor-list; then
STATUS_NOVA="Succeeded" STATUS_NOVA="Succeeded"
else else
STATUS_NOVA="Failed" STATUS_NOVA="Failed"
@ -107,7 +105,7 @@ if [[ "$ENABLED_SERVICES" =~ "c-api" ]]; then
STATUS_CINDER="Skipped" STATUS_CINDER="Skipped"
else else
echo -e "\nTest Cinder" echo -e "\nTest Cinder"
if cinder $TENANT_ARG_DASH $ARGS_DASH list; then if cinder $TENANT_ARG $ARGS list; then
STATUS_CINDER="Succeeded" STATUS_CINDER="Succeeded"
else else
STATUS_CINDER="Failed" STATUS_CINDER="Failed"
@ -124,7 +122,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
STATUS_GLANCE="Skipped" STATUS_GLANCE="Skipped"
else else
echo -e "\nTest Glance" echo -e "\nTest Glance"
if glance $TENANT_ARG_DASH $ARGS_DASH image-list; then if glance $TENANT_ARG $ARGS image-list; then
STATUS_GLANCE="Succeeded" STATUS_GLANCE="Succeeded"
else else
STATUS_GLANCE="Failed" STATUS_GLANCE="Failed"
@ -141,7 +139,7 @@ if [[ "$ENABLED_SERVICES" =~ "swift" || "$ENABLED_SERVICES" =~ "s-proxy" ]]; the
STATUS_SWIFT="Skipped" STATUS_SWIFT="Skipped"
else else
echo -e "\nTest Swift" echo -e "\nTest Swift"
if swift $TENANT_ARG_DASH $ARGS_DASH stat; then if swift $TENANT_ARG $ARGS stat; then
STATUS_SWIFT="Succeeded" STATUS_SWIFT="Succeeded"
else else
STATUS_SWIFT="Failed" STATUS_SWIFT="Failed"

View File

@ -127,7 +127,7 @@ fi
# Boot instance # Boot instance
# ------------- # -------------
VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --security_groups=$SECGROUP $VM_NAME | grep ' id ' | get_field 2) VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --security-groups=$SECGROUP $VM_NAME | grep ' id ' | get_field 2)
die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME" die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME"
# Check that the status is active within ACTIVE_TIMEOUT seconds # Check that the status is active within ACTIVE_TIMEOUT seconds

View File

@ -238,9 +238,9 @@ function create_network {
source $TOP_DIR/openrc admin admin source $TOP_DIR/openrc admin admin
local TENANT_ID=$(get_tenant_id $TENANT) local TENANT_ID=$(get_tenant_id $TENANT)
source $TOP_DIR/openrc $TENANT $TENANT source $TOP_DIR/openrc $TENANT $TENANT
local NET_ID=$(neutron net-create --tenant_id $TENANT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' ) local NET_ID=$(neutron net-create --tenant-id $TENANT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' )
die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $TENANT_ID $NET_NAME $EXTRA" die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $TENANT_ID $NET_NAME $EXTRA"
neutron subnet-create --ip_version 4 --tenant_id $TENANT_ID --gateway $GATEWAY $NET_ID $CIDR neutron subnet-create --ip-version 4 --tenant-id $TENANT_ID --gateway $GATEWAY $NET_ID $CIDR
neutron-debug probe-create --device-owner compute $NET_ID neutron-debug probe-create --device-owner compute $NET_ID
source $TOP_DIR/openrc demo demo source $TOP_DIR/openrc demo demo
} }

View File

@ -130,7 +130,7 @@ fi
# Boot instance # Boot instance
# ------------- # -------------
VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --security_groups=$SECGROUP $VM_NAME | grep ' id ' | get_field 2) VM_UUID=$(nova boot --flavor $INSTANCE_TYPE --image $IMAGE --security-groups=$SECGROUP $VM_NAME | grep ' id ' | get_field 2)
die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME" die_if_not_set $LINENO VM_UUID "Failure launching $VM_NAME"
# Check that the status is active within ACTIVE_TIMEOUT seconds # Check that the status is active within ACTIVE_TIMEOUT seconds
@ -156,7 +156,7 @@ fi
# Create a new volume # Create a new volume
start_time=$(date +%s) start_time=$(date +%s)
cinder create --display_name $VOL_NAME --display_description "test volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE || \ cinder create --display-name $VOL_NAME --display-description "test volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE || \
die $LINENO "Failure creating volume $VOL_NAME" die $LINENO "Failure creating volume $VOL_NAME"
if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then
die $LINENO "Volume $VOL_NAME not created" die $LINENO "Volume $VOL_NAME not created"

View File

@ -1083,7 +1083,7 @@ if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nov
die_if_not_set $LINENO NOVA_USER_ID "Failure retrieving NOVA_USER_ID for nova" 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) 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" 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) CREDS=$(keystone ec2-credentials-create --user-id $NOVA_USER_ID --tenant-id $NOVA_TENANT_ID)
ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }') ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }')
SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }') SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')
iniset $NOVA_CONF DEFAULT s3_access_key "$ACCESS_KEY" iniset $NOVA_CONF DEFAULT s3_access_key "$ACCESS_KEY"