summaryrefslogtreecommitdiffstats
path: root/tests/adhoc
diff options
context:
space:
mode:
authorBryan Sullivan <bs3131@att.com>2016-02-11 07:53:47 -0800
committerblsaws <bs3131@att.com>2016-04-01 08:30:07 -0700
commit8c5d8a87f57405781810960d508d9ed7920e7ffb (patch)
tree66b41011558c0ceda482e72d872b9673da279716 /tests/adhoc
parent3b998a0ab5b506ea138597ed8e6ca4535ae31e01 (diff)
Fix various bugs in smoke tests.
JIRA: COPPER-4 Change-Id: Ic9364b328105070aeb7ce410225314d1ae023a5d Signed-off-by: Bryan Sullivan <bs3131@att.com>
Diffstat (limited to 'tests/adhoc')
-rw-r--r--tests/adhoc/dmz01.sh10
-rw-r--r--tests/adhoc/smoke01.sh2
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/adhoc/dmz01.sh b/tests/adhoc/dmz01.sh
index 7fc68e1..22ecc3a 100644
--- a/tests/adhoc/dmz01.sh
+++ b/tests/adhoc/dmz01.sh
@@ -37,7 +37,13 @@ source ~/admin-openrc.sh <<EOF
openstack
EOF
-glance --os-image-api-version 1 image-create --name cirros-0.3.3-x86_64-dmz --disk-format qcow2 --location http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img --container-format bare
+image=$(openstack image list | awk "/ cirros-0.3.3-x86_64 / { print \$2 }")
+if [ "$image" == "" ]; then glance --os-image-api-version 1 image-create --name cirros-0.3.3-x86_64 --disk-format qcow2 --location http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img --container-format bare
+fi
+
+image=$(openstack image list | awk "/ cirros-0.3.3-x86_64-dmz / { print \$2 }")
+if [ "$image" == "" ]; then glance --os-image-api-version 1 image-create --name cirros-0.3.3-x86_64-dmz --disk-format qcow2 --location http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img --container-format bare
+fi
IMAGE_ID=$(glance image-list | awk "/ cirros-0.3.3-x86_64-dmz / { print \$2 }")
@@ -56,6 +62,8 @@ neutron router-create external
neutron router-gateway-set external public
neutron router-interface-add external subnet=internal
+# add a delay since the previous command takes the neutron-api offline for a while (?)
+sleep 30
INTERNAL_NET=$(neutron net-list | awk "/ internal / { print \$2 }")
diff --git a/tests/adhoc/smoke01.sh b/tests/adhoc/smoke01.sh
index ec834f3..0391fc2 100644
--- a/tests/adhoc/smoke01.sh
+++ b/tests/adhoc/smoke01.sh
@@ -52,6 +52,8 @@ neutron router-create external
neutron router-gateway-set external public
neutron router-interface-add external subnet=internal
+# add a delay since the previous command takes the neutron-api offline for a while (?)
+sleep 30
INTERNAL_NET=$(neutron net-list | awk "/ internal / { print \$2 }")