diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-01-11 10:52:10 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-11 09:55:30 +0000 |
commit | 426d22339f1899c89554ceaf1c7ba5c737d8daa7 (patch) | |
tree | 488892b8b31eddd6262e71c9d3f687bb083c1031 | |
parent | cbd429973c0bdcdef6e8e46b7bfee9d1d43c131f (diff) |
Add check of external network before running any test
Change-Id: I3ab58d924a8e53f2e6375c1c7fa77361d91b5efb
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit a9c1ee74864e30ae7c4e09923460ac943da2be80)
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/check_os.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/check_os.sh b/testcases/VIM/OpenStack/CI/libraries/check_os.sh index 3cc0ee103..88c760766 100755 --- a/testcases/VIM/OpenStack/CI/libraries/check_os.sh +++ b/testcases/VIM/OpenStack/CI/libraries/check_os.sh @@ -71,4 +71,21 @@ do done echo "OpenStack services are OK." + +echo "Checking External network..." +networks=($(neutron net-list | tail -n +4 | head -n -1 | awk '{print $2}')) +is_external=False +for net in "${networks[@]}" +do + is_external=$(neutron net-show $net|grep "router:external"|awk '{print $4}') + if [ $is_external == "True" ]; then + echo "External network found: $net" + break + fi +done +if [ $is_external == "False" ]; then + echo "ERROR: There are no external networks in the deployment." + exit 1 +fi + exit 0 |