Handle existing security group rules in volume exercise

Change-Id: I0aa3bc0c6179f92a12c1e9bbace61597778ffa1f
This commit is contained in:
Dean Troyer 2013-01-11 15:07:53 -06:00
parent a611e5c7b1
commit 15bda3e463

View File

@ -86,8 +86,12 @@ if ! nova secgroup-list | grep -q $SECGROUP; then
fi
# Configure Security Group Rules
nova secgroup-add-rule $SECGROUP icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule $SECGROUP tcp 22 22 0.0.0.0/0
if ! nova secgroup-list-rules $SECGROUP | grep -q icmp; then
nova secgroup-add-rule $SECGROUP icmp -1 -1 0.0.0.0/0
fi
if ! nova secgroup-list-rules $SECGROUP | grep -q " tcp .* 22 "; then
nova secgroup-add-rule $SECGROUP tcp 22 22 0.0.0.0/0
fi
# determinine instance type
# -------------------------