Merge "Updating ENV var names to better reflect what they point to"
authorDan Radez <dradez@redhat.com>
Wed, 21 Dec 2016 20:01:22 +0000 (20:01 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 21 Dec 2016 20:01:22 +0000 (20:01 +0000)
1  2 
lib/overcloud-deploy-functions.sh
lib/parse-functions.sh

@@@ -55,15 -55,15 +55,15 @@@ function overcloud_deploy 
  
  
    # Make sure the correct overcloud image is available
-   if [ ! -f $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
-       echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
+   if [ ! -f $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
+       echo "${red} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
        echo "Please install the opnfv-apex package to provide this overcloud image for deployment.${reset}"
        exit 1
    fi
  
    echo "Copying overcloud image to Undercloud"
    ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "rm -f overcloud-full.qcow2"
-   scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2
+   scp ${SSH_OPTIONS[@]} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2
  
    # Install ovs-dpdk inside the overcloud image if it is enabled.
    if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' || "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
@@@ -134,7 -134,7 +134,7 @@@ EO
                ;;
        boron)  odl_version='boron'
                ;;
 -      cabron) odl_version='master'
 +      carbon) odl_version='master'
                ;;
        *) echo -e "${red}Invalid ODL version ${deploy_options_array['odl_version']}.  Please use 'carbon' or 'boron' values.${reset}"
           exit 1
@@@ -289,19 -289,11 +289,19 @@@ openstack overcloud image uploa
  
  echo "Configuring undercloud and discovering nodes"
  openstack baremetal import --json instackenv.json
 -openstack baremetal configure boot
 +
  bash -x set_perf_images.sh ${performance_roles[@]}
 -#if [[ -z "$virtual" ]]; then
 -#  openstack baremetal introspection bulk start
 -#fi
 +if [[ -z "$virtual" ]]; then
 +  openstack baremetal introspection bulk start
 +  if [[ -n "$root_disk_list" ]]; then
 +    openstack baremetal configure boot -root-device=${root_disk_list}
 +  else
 +    openstack baremetal configure boot
 +  fi
 +else
 +  openstack baremetal configure boot
 +fi
 +
  echo "Configuring flavors"
  for flavor in baremetal control compute; do
    echo -e "${blue}INFO: Updating flavor: \${flavor}${reset}"
diff --combined lib/parse-functions.sh
@@@ -25,7 -25,7 +25,7 @@@ parse_network_settings() 
        done
    fi
  
-   if output=$(python3 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS -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
@@@ -59,7 -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)
@@@ -70,12 -69,5 +70,12 @@@ cat > instackenv.json << EO
  $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
  
  }