net_id=`neutron net-list | grep test-net | cut -f 2 -d " "`
# ATTACH NETWORK TO ROUTER
-echo "Attaching external and tenant networks to reouter"
+echo "Attaching external and tenant networks to router"
neutron router-create test-router
neutron router-interface-add test-router test-subnet
neutron router-gateway-set test-router external
# FIRST VM
echo "Creating first VM in the network and adding the security group to it"
-nova boot --image cirros-0.3.4 --flavor 1 --nic net-id=$net_id test-vm1
+nova boot --image cirros-0.3.4 --flavor nfv --nic net-id=$net_id test-vm1
nova add-secgroup test-vm1 test-secgroup
echo "Waiting 7 seconds for the VM to come up"
# SECOND VM
echo "Creating second VM in the network and adding the security group to it"
-nova boot --image cirros-0.3.4 --flavor 1 --nic net-id=$net_id test-vm2
+nova boot --image cirros-0.3.4 --flavor nfv --nic net-id=$net_id test-vm2
nova add-secgroup test-vm2 test-secgroup
# FLOATING IP
nova_list=`ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null stack@$undercloud_ip ". stackrc && nova list | tail -n+4 | head -n-1 | sed 's/ //g'" 2> /dev/null`
node_list=($nova_list)
IFS="$OIFS"
-echo
for node in "${node_list[@]}"
do
+ echo
node_fields=`echo $node | cut -d "|" -f 3,7`
node_name=`echo $node_fields | cut -d "|" -f 1`
node_ip=`echo $node_fields | cut -d "=" -f 2`