Add library sourcing error check
[apex.git] / ci / deploy.sh
index bd5a675..97ab0e5 100755 (executable)
@@ -55,9 +55,17 @@ ext_net_type="interface"
 ip_address_family=4
 
 # Libraries
-source $LIB/common-functions.sh
-source $LIB/utility-functions.sh
-source $LIB/installer/onos/onos_gw_mac_update.sh
+lib_files=(
+$LIB/common-functions.sh
+$LIB/utility-functions.sh
+$LIB/installer/onos/onos_gw_mac_update.sh
+)
+for lib_file in ${lib_files[@]}; do
+  if ! source $lib_file; then
+    echo -e "${red}ERROR: Failed to source $lib_file${reset}"
+    exit 1
+  fi
+done
 
 ##FUNCTIONS
 ##translates yaml into variables
@@ -502,7 +510,7 @@ function setup_virtual_baremetal {
 EOF
 
   # next create the virtual machines and add their definitions to the file
-  if [ ha_enabled != "FALSE" && "$ha_enabled" != "false" ]; then
+  if [ ha_enabled == "False" ]; then
       # 1 controller + computes
       # zero based so just pass compute count
       vm_index=$VM_COMPUTES
@@ -1065,7 +1073,6 @@ display_usage() {
   echo -e "   -n|--net-settings : Full path to network settings file. Optional."
   echo -e "   -p|--ping-site : site to use to verify IP connectivity. Optional. Defaults to 8.8.8.8"
   echo -e "   -v|--virtual : Virtualize overcloud nodes instead of using baremetal."
-  echo -e "   --no-ha : disable High Availability deployment scheme, this assumes a single controller and single compute node"
   echo -e "   --flat : disable Network Isolation and use a single flat network for the underlay network."
   echo -e "   --no-post-config : disable Post Install configuration."
   echo -e "   --debug : enable debug output."
@@ -1113,11 +1120,6 @@ parse_cmdline() {
                 echo "Executing a Virtual Deployment"
                 shift 1
             ;;
-        --no-ha )
-                ha_enabled="False"
-                echo "HA Deployment Disabled"
-                shift 1
-            ;;
         --flat )
                 net_isolation_enabled="FALSE"
                 echo "Underlay Network Isolation Disabled: using flat configuration"