Skip to content

Commit 951e14d

Browse files
committed
Fix default security group in samples/local.sh
The script currently complains about multiple default security groups. This obtains the default and uses it when creating security group rules. Change-Id: I81e59eae5df79889ed1fb02d45af26e3a55aa0e9
1 parent 650769a commit 951e14d

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

samples/local.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ if is_service_enabled nova; then
4141
fi
4242
done
4343

44+
# Update security default group
45+
# -----------------------------
46+
47+
# Add tcp/22 and icmp to default security group
48+
default=$(openstack security group list -f value -c ID)
49+
openstack security group rule create $default --protocol tcp --dst-port 22
50+
openstack security group rule create $default --protocol icmp
4451

4552
# Create A Flavor
4653
# ---------------
@@ -57,12 +64,4 @@ if is_service_enabled nova; then
5764
openstack flavor create $MI_NAME --id 6 --ram 128 --disk 0 --vcpus 1
5865
fi
5966

60-
61-
# Other Uses
62-
# ----------
63-
64-
# Add tcp/22 and icmp to default security group
65-
openstack security group rule create --project $OS_PROJECT_NAME default --protocol tcp --ingress --dst-port 22
66-
openstack security group rule create --project $OS_PROJECT_NAME default --protocol icmp
67-
6867
fi

0 commit comments

Comments
 (0)