Moving undercloud root pw to debug only
[apex.git] / lib / undercloud-functions.sh
index 080fcbb..7108dcf 100755 (executable)
@@ -55,6 +55,10 @@ function setup_undercloud_vm {
 
   # if the VM is not running update the authkeys and start it
   if ! virsh list | grep undercloud > /dev/null; then
+    if [ "$debug" == 'TRUE' ]; then
+      LIBGUESTFS_BACKEND=direct virt-customize -a $undercloud_dst --root-password password:opnfvapex
+    fi
+
     echo "Injecting ssh key to Undercloud VM"
     LIBGUESTFS_BACKEND=direct virt-customize -a $undercloud_dst --run-command "mkdir -p /root/.ssh/" \
         --upload ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys \
@@ -127,7 +131,11 @@ function configure_undercloud {
 
   # check for ODL L3/ONOS
   if [ "${deploy_options_array['sdn_l3']}" == 'True' ]; then
-    ext_net_type=br-ex
+    if [ "${deploy_options_array['dataplane']}" == 'fdio' ]; then
+      ext_net_type=vpp_interface
+    else
+      ext_net_type=br-ex
+    fi
   fi
 
   if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
@@ -136,12 +144,12 @@ function configure_undercloud {
     ovs_dpdk_bridge=''
   fi
 
-  if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e "br-ex"); then
+  if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e "br-ex" --deploy-settings-file $DEPLOY_SETTINGS_FILE); then
     echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}"
     exit 1
   fi
 
-  if ! compute_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e $ext_net_type -d "$ovs_dpdk_bridge"); then
+  if ! compute_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e $ext_net_type -d "$ovs_dpdk_bridge" --deploy-settings-file $DEPLOY_SETTINGS_FILE); then
     echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}"
     exit 1
   fi