summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common-functions.sh2
-rwxr-xr-xlib/overcloud-deploy-functions.sh14
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 2d113450..709dbf97 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -281,7 +281,7 @@ contains_prefix() {
#params: none
function verify_internet {
if ping -c 2 $ping_site > /dev/null; then
- if ping -c 2 www.google.com > /dev/null; then
+ if ping -c 2 $dnslookup_site > /dev/null; then
echo "${blue}Internet connectivity detected${reset}"
return 0
else
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 4b592b46..c8367c9f 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -128,10 +128,20 @@ EOI
fi
# Set ODL version accordingly
- if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['odl_version']}" == 'boron' ]]; then
+ if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && -n "${deploy_options_array['odl_version']}" ]]; then
+ case "${deploy_options_array['odl_version']}" in
+ boron) odl_version='boron'
+ ;;
+ cabron) odl_version='master'
+ ;;
+ *) echo -e "${red}Invalid ODL version ${deploy_options_array['odl_version']}. Please use 'carbon' or 'boron' values.${reset}"
+ exit 1
+ ;;
+ esac
+
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight" \
- --run-command "yum -y install /root/boron/*" \
+ --run-command "yum -y install /root/${odl_version}/*" \
-a overcloud-full.qcow2
EOI
fi