From 4e1320c4235476d7e2a0a90f80997e8371c5f399 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Wed, 30 Nov 2016 11:03:02 -0500 Subject: Adds declaring disk device to use on overcloud nodes Now in inventory file a user can declare 'disk_device' which will allow the user to specify which disk on their overcloud server to use for installation. The variable can be a comma delimited list, which will search in order post-introspection for the first device on the node that exists. The default disk used will be sda for deployments. Currently defining a per node disk is not supported by OSCLI, so although defined that way in Apex inventory, only the last definition will be used for all nodes. Other changes include: - Various fixes in inventory parsing - Makes bash writing a common function - Introspection now enabled for baremetal deployments JIRA: APEX-296 Change-Id: I330d91eb17408ccfceb7a99c25edbae5ce6d848d Signed-off-by: Tim Rozet --- lib/parse-functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/parse-functions.sh') 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 } -- cgit 1.2.3-korg