Merge "Handle existing security group rules in volume exercise"

This commit is contained in:
Jenkins 2013-01-12 14:15:16 +00:00 committed by Gerrit Code Review
commit 9bd9d7d1a3

View File

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