Merge pull request #113 from cloudbuilders/pause

Add pause to exercise.sh (requires nova flag)
This commit is contained in:
Jesse Andrews 2011-10-29 16:14:27 -07:00
commit c4cc93f9be
2 changed files with 23 additions and 0 deletions

View File

@ -127,6 +127,28 @@ if ! timeout 10 sh -c "while ! ping -c1 -w1 $FLOATING_IP; do sleep 1; done"; the
exit 1 exit 1
fi fi
# pause the VM and verify we can't ping it anymore
nova pause $NAME
sleep 2
if ( ping -c1 -w1 $IP); then
echo "Pause failure - ping shouldn't work"
exit 1
fi
if ( ping -c1 -w1 $FLOATING_IP); then
echo "Pause failure - ping floating ips shouldn't work"
exit 1
fi
# unpause the VM and verify we can ping it again
nova unpause $NAME
sleep 2
ping -c1 -w1 $IP
# dis-allow icmp traffic (ping) # dis-allow icmp traffic (ping)
nova secgroup-delete-rule $SECGROUP icmp -1 -1 0.0.0.0/0 nova secgroup-delete-rule $SECGROUP icmp -1 -1 0.0.0.0/0

View File

@ -613,6 +613,7 @@ function add_nova_flag {
rm -f $NOVA_DIR/bin/nova.conf rm -f $NOVA_DIR/bin/nova.conf
add_nova_flag "--verbose" add_nova_flag "--verbose"
add_nova_flag "--nodaemon" add_nova_flag "--nodaemon"
add_nova_flag "--allow_admin_api"
add_nova_flag "--scheduler_driver=$SCHEDULER" add_nova_flag "--scheduler_driver=$SCHEDULER"
add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf" add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf"
add_nova_flag "--network_manager=nova.network.manager.$NET_MAN" add_nova_flag "--network_manager=nova.network.manager.$NET_MAN"