diff options
author | Dan Radez <dradez@redhat.com> | 2016-12-21 19:39:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-21 19:39:51 +0000 |
commit | 6a6e2dee30562e14a99bf979b65e6817ad08d75a (patch) | |
tree | b257d9833d2623a619341d5de7c25964f80b029f /lib/parse-functions.sh | |
parent | ffb4f46e5ea022e0688cce672395f2dde409e88e (diff) | |
parent | 4e1320c4235476d7e2a0a90f80997e8371c5f399 (diff) |
Merge "Adds declaring disk device to use on overcloud nodes"
Diffstat (limited to 'lib/parse-functions.sh')
-rwxr-xr-x | lib/parse-functions.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/parse-functions.sh b/lib/parse-functions.sh index 84da75c5..b1a61c3d 100755 --- a/lib/parse-functions.sh +++ b/lib/parse-functions.sh @@ -59,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) @@ -69,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 } |