declare -A public_ip_arr
vm_dir=/var/opt/opnfv
+script=`realpath $0`
##END VARS
##FUNCTIONS
##params: destination directory
##usage: clone_bgs /tmp/myvm/
clone_bgs() {
- script=`realpath $0`
script_dir="`dirname "$script"`"
cp -fr $script_dir/ $1
cp -fr $script_dir/../../common/puppet-opnfv $1
echo "${blue}Detecting network configuration...${reset}"
##detect host 1 or 3 interface configuration
#output=`ip link show | grep -E "^[0-9]" | grep -Ev ": lo|tun|virbr|vboxnet" | awk '{print $2}' | sed 's/://'`
- output=`/bin/ls -l /sys/class/net | tail -n +2 | grep -v virtual | cut -d " " -f9`
+ output=`/bin/ls -l /sys/class/net | tail -n +2 | grep -v virtual | cut -d " " -f10`
fi
if [ ! "$output" ]; then
compute_wait_completed=false
for node in ${nodes}; do
- cd /tmp/
##remove VM nodes incase it wasn't cleaned up
rm -rf $vm_dir/$node