summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-08-25 09:45:01 -0400
committerDan Radez <dradez@redhat.com>2016-09-07 15:55:44 -0400
commit51510a96718c909cbcbf02256c440dbdceab7227 (patch)
tree549dfa3ecd6e222a6a92e535f8bf8c97b7243b21 /ci
parentc5904a139026826c3dea1a63e5ff21953aa4869a (diff)
moving inventory file parsing to python
Change-Id: Ib03728e8ffe9c65044b32b4348e9c1c88862c6e3 Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 91663dfc..00441975 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -179,8 +179,19 @@ parse_cmdline() {
exit 1
fi
- if [[ -n "$virtual" && -n "$INVENTORY_FILE" ]]; then
- echo -e "${red}ERROR: You should not specify an inventory with virtual deployments${reset}"
+ # inventory file usage validation
+ if [[ -n "$virtual" ]]; then
+ if [[ -n "$INVENTORY_FILE" ]]; then
+ echo -e "${red}ERROR: You should not specify an inventory file with virtual deployments${reset}"
+ exit 1
+ else
+ INVENTORY_FILE='/tmp/inventory-virt.yaml'
+ fi
+ elif [[ -z "$INVENTORY_FILE" ]]; then
+ echo -e "${red}ERROR: You must specify an inventory file for baremetal deployments! Exiting...${reset}"
+ exit 1
+ elif [[ ! -f "$INVENTORY_FILE" ]]; then
+ echo -e "{$red}ERROR: Inventory File: ${INVENTORY_FILE} does not exist! Exiting...${reset}"
exit 1
fi
@@ -194,16 +205,6 @@ parse_cmdline() {
exit 1
fi
- if [[ ! -z "$INVENTORY_FILE" && ! -f "$INVENTORY_FILE" ]]; then
- echo -e "{$red}ERROR: Inventory File: ${INVENTORY_FILE} does not exist! Exiting...${reset}"
- exit 1
- fi
-
- if [[ -z "$virtual" && -z "$INVENTORY_FILE" ]]; then
- echo -e "${red}ERROR: You must specify an inventory file for baremetal deployments! Exiting...${reset}"
- exit 1
- fi
-
if [[ "$net_isolation_enabled" == "FALSE" && "$post_config" == "TRUE" ]]; then
echo -e "${blue}INFO: Post Install Configuration will be skipped. It is not supported with --flat${reset}"
post_config="FALSE"
@@ -226,9 +227,8 @@ main() {
setup_undercloud_vm
if [ "$virtual" == "TRUE" ]; then
setup_virtual_baremetal $VM_CPUS $VM_RAM
- elif [ -n "$INVENTORY_FILE" ]; then
- parse_inventory_file
fi
+ parse_inventory_file
configure_undercloud
overcloud_deploy
if [ "$post_config" == "TRUE" ]; then