summaryrefslogtreecommitdiffstats
path: root/lib/common-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common-functions.sh')
-rw-r--r--lib/common-functions.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 391d9405..6941093c 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -293,3 +293,16 @@ function verify_internet {
return 1
fi
}
+
+##tests if overcloud nodes have external connectivity
+#params:none
+function test_overcloud_connectivity {
+ for node in $(undercloud_connect stack ". stackrc && nova list" | grep -Eo "controller-[0-9]+|compute-[0-9]+" | tr -d -) ; do
+ if ! overcloud_connect $node "ping -c 2 $ping_site > /dev/null"; then
+ echo "${blue}Node ${node} was unable to ping site ${ping_site}${reset}"
+ return 1
+ fi
+ done
+ echo "${blue}Overcloud external connectivity OK${reset}"
+}
+