add wait_for ping

This commit is contained in:
James Slagle 2014-02-17 16:03:32 -05:00
parent 5aa03ac22c
commit bf45f2acd3
1 changed files with 3 additions and 1 deletions

View File

@ -55,9 +55,11 @@ nova boot --key-name default --flavor m1.tiny --image user demo
wait_for 10 5 neutron port-list -f csv -c id --quote none \| grep id
PORT=$(neutron port-list -f csv -c id --quote none | tail -n1)
neutron floatingip-create ext-net --port-id "${PORT//[[:space:]]/}"
FLOATINGIP=$(neutron floatingip-create ext-net --port-id "${PORT//[[:space:]]/}" | awk '$2=="floating_ip_address" {print $4}')
neutron security-group-rule-create default --protocol icmp \
--direction ingress --port-range-min 8 --port-range-max 8
neutron security-group-rule-create default --protocol tcp \
--direction ingress --port-range-min 22 --port-range-max 22
wait_for 30 10 ping -c 1 $FLOATINGIP