summaryrefslogtreecommitdiffstats
path: root/tests/dmz-clean.sh
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-05-22 19:57:10 -0700
committerblsaws <bryan.sullivan@att.com>2016-05-22 19:57:10 -0700
commitdb5e7aa499e6e6a353c57a2d7e5c044152f3328b (patch)
tree12d3189c958c5a07a2b0a239ff841747b374b08f /tests/dmz-clean.sh
parent8d0118e42e6f845da85fe8ed23d01a706cd6d279 (diff)
Align tests across ubuntu and centos
JIRA: COPPER-4 Change-Id: Ieea3aaae89a99c558ad5c6ba7be0d0c64a4e1752 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests/dmz-clean.sh')
-rw-r--r--tests/dmz-clean.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/tests/dmz-clean.sh b/tests/dmz-clean.sh
index 32302a2..6859192 100644
--- a/tests/dmz-clean.sh
+++ b/tests/dmz-clean.sh
@@ -22,7 +22,7 @@
# Install Congress test server per https://wiki.opnfv.org/copper/academy
# $ source ~/git/copper/tests/adhoc/dmz.sh
# After test, cleanup with
-# $ sh ~/git/copper/tests/adhoc/dmz-clean.sh
+# $ bash ~/git/copper/tests/adhoc/dmz-clean.sh
if [ $# -eq 1 ]; then
if [ $1 == "debug" ]; then
@@ -43,13 +43,11 @@ fi
echo "Delete cirros1 instance"
instance=$(nova list | awk "/ cirros1 / { print \$2 }")
-if [ "$instance" != "" ]; then nova delete $instance
-fi
+if [ "$instance" != "" ]; then nova delete $instance; fi
echo "Delete cirros2 instance"
instance=$(nova list | awk "/ cirros2 / { print \$2 }")
-if [ "$instance" != "" ]; then nova delete $instance
-fi
+if [ "$instance" != "" ]; then nova delete $instance; fi
echo "Delete 'dmz' security group"
sg=$(neutron security-group-list | awk "/ dmz / { print \$2 }")
@@ -62,15 +60,13 @@ echo "Get internal port ID with subnet 10.0.0.1 on 'test_router'"
test_internal_interface=$(neutron router-port-list $router | grep 10.0.0.1 | awk '{print $2}')
echo "If found, delete the port with subnet 10.0.0.1 on 'test_router'"
-if [ "$test_internal_interface" != "" ]; then neutron router-interface-delete $router port=$test_internal_interface
-fi
+if [ "$test_internal_interface" != "" ]; then neutron router-interface-delete $router port=$test_internal_interface; fi
echo "Get public port ID with fixed_ip 192.168.10.2 on 'test_router'"
test_public_interface=$(neutron router-port-list $router | grep 192.168.10.2 | awk '{print $2}')
echo "If found, delete the port with fixed_ip 192.168.10.2 on 'test_router'"
-if [ "$test_public_interface" != "" ]; then neutron router-interface-delete $router port=$test_public_interface
-fi
+if [ "$test_public_interface" != "" ]; then neutron router-interface-delete $router port=$test_public_interface; fi
echo "Delete the router internal interface"
neutron router-interface-delete $router $test_internal_interface
@@ -83,13 +79,11 @@ neutron router-delete test_router
echo "Delete neutron port with fixed_ip 10.0.0.1"
port=$(neutron port-list | awk "/ 10.0.0.1 / { print \$2 }")
-if [ "$port" != "" ]; then neutron port-delete $port
-fi
+if [ "$port" != "" ]; then neutron port-delete $port; fi
echo "Delete neutron port with fixed_ip 10.0.0.2"
port=$(neutron port-list | awk "/ 10.0.0.2 / { print \$2 }")
-if [ "$port" != "" ]; then neutron port-delete $port
-fi
+if [ "$port" != "" ]; then neutron port-delete $port; fi
echo "Delete internal subnet"
neutron subnet-delete test_internal
@@ -103,4 +97,3 @@ neutron subnet-delete test_public
echo "Delete public network"
neutron net-delete test_public
-set +x #echo off