fix post-install.sh
[apex.git] / lib / parse-functions.sh
index 4b3d234..94eac01 100755 (executable)
@@ -25,7 +25,7 @@ parse_network_settings() {
       done
   fi
 
-  if output=$(python3 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS $net_isolation_arg -td $APEX_TMP_DIR -e $CONFIG/network-environment.yaml $parse_ext); then
+  if output=$(python3 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS -td $APEX_TMP_DIR -e $BASE/network-environment.yaml $parse_ext); then
       echo -e "${blue}${output}${reset}"
       eval "$output"
   else
@@ -34,10 +34,6 @@ parse_network_settings() {
   fi
 
   if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
-    if [ "$net_isolation_enabled" == "FALSE" ]; then
-      echo -e "${red}ERROR: flat network is not supported with ovs-dpdk ${reset}"
-      exit 1
-    fi
     if [[ ! $enabled_network_list =~ "tenant" ]]; then
       echo -e "${red}ERROR: tenant network is not enabled for ovs-dpdk ${reset}"
       exit 1
@@ -63,6 +59,7 @@ parse_deploy_settings() {
 ##params: none
 ##usage: parse_inventory_file
 parse_inventory_file() {
+  local output
   if [ "$virtual" == "TRUE" ]; then inv_virt="--virtual"; fi
   if [[ "$ha_enabled" == "True" ]]; then inv_ha="--ha"; fi
   instackenv_output=$(python3 -B $LIB/python/apex_python_utils.py parse-inventory -f $INVENTORY_FILE $inv_virt $inv_ha)
@@ -73,5 +70,12 @@ cat > instackenv.json << EOF
 $instackenv_output
 EOF
 EOI
+  if output=$(python3 -B $LIB/python/apex_python_utils.py parse-inventory -f $INVENTORY_FILE $inv_virt $inv_ha --export-bash); then
+    echo -e "${blue}${output}${reset}"
+    eval "$output"
+  else
+    echo -e "${red}ERROR: Failed to parse inventory bash settings file ${INVENTORY_FILE}${reset}"
+    exit 1
+  fi
 
 }