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