clean up whitespace issues on exercises and friends
Change-Id: I812a73e46ddd4d5fed4d304d9ef92c1de243f497
diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh
index fe27bd0..634a6d5 100755
--- a/exercises/boot_from_volume.sh
+++ b/exercises/boot_from_volume.sh
@@ -119,7 +119,7 @@
INSTANCE_TYPE=$(nova flavor-list | grep $DEFAULT_INSTANCE_TYPE | get_field 1)
if [[ -z "$INSTANCE_TYPE" ]]; then
# grab the first flavor in the list to launch if default doesn't exist
- INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
+ INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
fi
# Clean-up from previous runs
diff --git a/exercises/docker.sh b/exercises/docker.sh
index 0672bc0..10c5436 100755
--- a/exercises/docker.sh
+++ b/exercises/docker.sh
@@ -62,7 +62,7 @@
INSTANCE_TYPE=$(nova flavor-list | grep $DEFAULT_INSTANCE_TYPE | get_field 1)
if [[ -z "$INSTANCE_TYPE" ]]; then
# grab the first flavor in the list to launch if default doesn't exist
- INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
+ INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
fi
# Clean-up from previous runs
@@ -102,4 +102,3 @@
echo "*********************************************************************"
echo "SUCCESS: End DevStack Exercise: $0"
echo "*********************************************************************"
-
diff --git a/exercises/euca.sh b/exercises/euca.sh
index 64c0014..ed521e4 100755
--- a/exercises/euca.sh
+++ b/exercises/euca.sh
@@ -87,31 +87,31 @@
# Volumes
# -------
if is_service_enabled c-vol && ! is_service_enabled n-cell; then
- VOLUME_ZONE=`euca-describe-availability-zones | head -n1 | cut -f2`
- die_if_not_set $LINENO VOLUME_ZONE "Failure to find zone for volume"
+ VOLUME_ZONE=`euca-describe-availability-zones | head -n1 | cut -f2`
+ die_if_not_set $LINENO VOLUME_ZONE "Failure to find zone for volume"
- VOLUME=`euca-create-volume -s 1 -z $VOLUME_ZONE | cut -f2`
- die_if_not_set $LINENO VOLUME "Failure to create volume"
+ VOLUME=`euca-create-volume -s 1 -z $VOLUME_ZONE | cut -f2`
+ die_if_not_set $LINENO VOLUME "Failure to create volume"
- # Test that volume has been created
- VOLUME=`euca-describe-volumes $VOLUME | cut -f2`
- die_if_not_set $LINENO VOLUME "Failure to get volume"
+ # Test that volume has been created
+ VOLUME=`euca-describe-volumes $VOLUME | cut -f2`
+ die_if_not_set $LINENO VOLUME "Failure to get volume"
- # Test volume has become available
- if ! timeout $RUNNING_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -q available; do sleep 1; done"; then
- die $LINENO "volume didn't become available within $RUNNING_TIMEOUT seconds"
- fi
+ # Test volume has become available
+ if ! timeout $RUNNING_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -q available; do sleep 1; done"; then
+ die $LINENO "volume didn't become available within $RUNNING_TIMEOUT seconds"
+ fi
- # Attach volume to an instance
- euca-attach-volume -i $INSTANCE -d $ATTACH_DEVICE $VOLUME || \
- die $LINENO "Failure attaching volume $VOLUME to $INSTANCE"
- if ! timeout $ACTIVE_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -A 1 in-use | grep -q attach; do sleep 1; done"; then
- die $LINENO "Could not attach $VOLUME to $INSTANCE"
- fi
+ # Attach volume to an instance
+ euca-attach-volume -i $INSTANCE -d $ATTACH_DEVICE $VOLUME || \
+ die $LINENO "Failure attaching volume $VOLUME to $INSTANCE"
+ if ! timeout $ACTIVE_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -A 1 in-use | grep -q attach; do sleep 1; done"; then
+ die $LINENO "Could not attach $VOLUME to $INSTANCE"
+ fi
- # Detach volume from an instance
- euca-detach-volume $VOLUME || \
- die $LINENO "Failure detaching volume $VOLUME to $INSTANCE"
+ # Detach volume from an instance
+ euca-detach-volume $VOLUME || \
+ die $LINENO "Failure detaching volume $VOLUME to $INSTANCE"
if ! timeout $ACTIVE_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -q available; do sleep 1; done"; then
die $LINENO "Could not detach $VOLUME to $INSTANCE"
fi
@@ -120,7 +120,7 @@
euca-delete-volume $VOLUME || \
die $LINENO "Failure to delete volume"
if ! timeout $ACTIVE_TIMEOUT sh -c "while euca-describe-volumes | grep $VOLUME; do sleep 1; done"; then
- die $LINENO "Could not delete $VOLUME"
+ die $LINENO "Could not delete $VOLUME"
fi
else
echo "Volume Tests Skipped"
diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh
index 2833b65..1a1608c 100755
--- a/exercises/floating_ips.sh
+++ b/exercises/floating_ips.sh
@@ -113,7 +113,7 @@
INSTANCE_TYPE=$(nova flavor-list | grep $DEFAULT_INSTANCE_TYPE | get_field 1)
if [[ -z "$INSTANCE_TYPE" ]]; then
# grab the first flavor in the list to launch if default doesn't exist
- INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
+ INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
fi
# Clean-up from previous runs
@@ -168,7 +168,7 @@
# list floating addresses
if ! timeout $ASSOCIATE_TIMEOUT sh -c "while ! nova floating-ip-list | grep $TEST_FLOATING_POOL | grep -q $TEST_FLOATING_IP; do sleep 1; done"; then
die $LINENO "Floating IP not allocated"
- fi
+ fi
fi
# Dis-allow icmp traffic (ping)
diff --git a/exercises/neutron-adv-test.sh b/exercises/neutron-adv-test.sh
index e0c37ef..7dfa5dc 100755
--- a/exercises/neutron-adv-test.sh
+++ b/exercises/neutron-adv-test.sh
@@ -273,12 +273,12 @@
}
function ping_ip {
- # Test agent connection. Assumes namespaces are disabled, and
- # that DHCP is in use, but not L3
- local VM_NAME=$1
- local NET_NAME=$2
- IP=$(get_instance_ip $VM_NAME $NET_NAME)
- ping_check $NET_NAME $IP $BOOT_TIMEOUT
+ # Test agent connection. Assumes namespaces are disabled, and
+ # that DHCP is in use, but not L3
+ local VM_NAME=$1
+ local NET_NAME=$2
+ IP=$(get_instance_ip $VM_NAME $NET_NAME)
+ ping_check $NET_NAME $IP $BOOT_TIMEOUT
}
function check_vm {
@@ -330,12 +330,12 @@
}
function delete_networks {
- foreach_tenant_net 'delete_network ${%TENANT%_NAME} %NUM%'
- #TODO(nati) add secuirty group check after it is implemented
- # source $TOP_DIR/openrc demo1 demo1
- # nova secgroup-delete-rule default icmp -1 -1 0.0.0.0/0
- # source $TOP_DIR/openrc demo2 demo2
- # nova secgroup-delete-rule default icmp -1 -1 0.0.0.0/0
+ foreach_tenant_net 'delete_network ${%TENANT%_NAME} %NUM%'
+ # TODO(nati) add secuirty group check after it is implemented
+ # source $TOP_DIR/openrc demo1 demo1
+ # nova secgroup-delete-rule default icmp -1 -1 0.0.0.0/0
+ # source $TOP_DIR/openrc demo2 demo2
+ # nova secgroup-delete-rule default icmp -1 -1 0.0.0.0/0
}
function create_all {
diff --git a/exercises/volumes.sh b/exercises/volumes.sh
index e536d16..9ee9fa9 100755
--- a/exercises/volumes.sh
+++ b/exercises/volumes.sh
@@ -117,7 +117,7 @@
INSTANCE_TYPE=$(nova flavor-list | grep $DEFAULT_INSTANCE_TYPE | get_field 1)
if [[ -z "$INSTANCE_TYPE" ]]; then
# grab the first flavor in the list to launch if default doesn't exist
- INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
+ INSTANCE_TYPE=$(nova flavor-list | head -n 4 | tail -n 1 | get_field 1)
fi
# Clean-up from previous runs
diff --git a/files/keystone_data.sh b/files/keystone_data.sh
index 3f3137c..ea2d52d 100755
--- a/files/keystone_data.sh
+++ b/files/keystone_data.sh
@@ -66,12 +66,12 @@
# Heat
if [[ "$ENABLED_SERVICES" =~ "heat" ]]; then
HEAT_USER=$(get_id keystone user-create --name=heat \
- --pass="$SERVICE_PASSWORD" \
- --tenant_id $SERVICE_TENANT \
- --email=heat@example.com)
+ --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
+ --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
@@ -126,16 +126,16 @@
# Ceilometer
if [[ "$ENABLED_SERVICES" =~ "ceilometer" ]]; then
CEILOMETER_USER=$(get_id keystone user-create --name=ceilometer \
- --pass="$SERVICE_PASSWORD" \
- --tenant_id $SERVICE_TENANT \
- --email=ceilometer@example.com)
+ --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
+ --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
+ --user-id $CEILOMETER_USER \
+ --role-id $RESELLER_ROLE
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
CEILOMETER_SERVICE=$(get_id keystone service-create \
--name=ceilometer \
diff --git a/tests/functions.sh b/tests/functions.sh
index 7d486d4..40376aa 100755
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -122,16 +122,16 @@
# test empty option
if ini_has_option test.ini ddd empty; then
- echo "OK: ddd.empty present"
+ echo "OK: ddd.empty present"
else
- echo "ini_has_option failed: ddd.empty not found"
+ echo "ini_has_option failed: ddd.empty not found"
fi
# test non-empty option
if ini_has_option test.ini bbb handlers; then
- echo "OK: bbb.handlers present"
+ echo "OK: bbb.handlers present"
else
- echo "ini_has_option failed: bbb.handlers not found"
+ echo "ini_has_option failed: bbb.handlers not found"
fi
# test changing empty option