summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-23 23:37:09 +0100
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commita0f8680a71960ea9a69274bfd62ada0b58ae2c3c (patch)
treeedc6fa68b1db1da12de18019efc8eca2e1d69873
parent0d757c4e25c459fbd5502e22c1d076627310edab (diff)
xci: Adjust how bifrost inventory files are specified
First step towards creating env-vars files based on the use of these scripts so the scripts can be merged into one. Change-Id: I4ee1d9af520aa684a5367a2645d709835bc4a5a1 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
-rwxr-xr-xbifrost/scripts/osa-bifrost-deployment.sh10
-rwxr-xr-xbifrost/scripts/test-bifrost-deployment.sh7
2 files changed, 10 insertions, 7 deletions
diff --git a/bifrost/scripts/osa-bifrost-deployment.sh b/bifrost/scripts/osa-bifrost-deployment.sh
index fb66ae9e..30090bf7 100755
--- a/bifrost/scripts/osa-bifrost-deployment.sh
+++ b/bifrost/scripts/osa-bifrost-deployment.sh
@@ -23,10 +23,13 @@ PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
# ensure the right inventory files is used based on branch
CURRENT_BIFROST_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ $CURRENT_BIFROST_BRANCH = "master" ]; then
- export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.json'}
+ BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+ INVENTORY_FILE_FORMAT="baremetal_json_file"
else
- export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.csv'}
+ BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.csv'}
+ INVENTORY_FILE_FORMAT="baremetal_csv_file"
fi
+export BIFROST_INVENTORY_SOURCE=$BAREMETAL_DATA_FILE
# Set defaults for ansible command-line options to drive the different
# tests.
@@ -113,7 +116,8 @@ ${ANSIBLE} \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
-e test_vm_memory_size=${VM_MEMORY_SIZE} \
-e enable_venv=${ENABLE_VENV} \
- -e test_vm_domain_type=${VM_DOMAIN_TYPE}
+ -e test_vm_domain_type=${VM_DOMAIN_TYPE} \
+ -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
# Execute the installation and VM startup test.
${ANSIBLE} \
diff --git a/bifrost/scripts/test-bifrost-deployment.sh b/bifrost/scripts/test-bifrost-deployment.sh
index 83cf1cc1..f4d008b7 100755
--- a/bifrost/scripts/test-bifrost-deployment.sh
+++ b/bifrost/scripts/test-bifrost-deployment.sh
@@ -20,6 +20,8 @@ USE_VENV="false"
BUILD_IMAGE=true
PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+INVENTORY_FILE_FORMAT="baremetal_json_file"
+export BIFROST_INVENTORY_SOURCE=$BAREMETAL_DATA_FILE
# Set defaults for ansible command-line options to drive the different
# tests.
@@ -50,9 +52,6 @@ INVENTORY_DHCP=false
INVENTORY_DHCP_STATIC_IP=false
WRITE_INTERFACES_FILE=true
-# Set BIFROST_INVENTORY_SOURCE
-export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.json
-
# settings for console access
export DIB_DEV_USER_PWDLESS_SUDO=yes
export DIB_DEV_USER_PASSWORD=devuser
@@ -106,7 +105,7 @@ ${ANSIBLE} -vvvv \
-e test_vm_memory_size=${VM_MEMORY_SIZE} \
-e enable_venv=${ENABLE_VENV} \
-e test_vm_domain_type=${VM_DOMAIN_TYPE} \
- -e baremetal_json_file=${BAREMETAL_DATA_FILE}
+ -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
# Execute the installation and VM startup test.
${ANSIBLE} -vvvv \