Skip to content

Commit a13f19c

Browse files
committed
added security-groups scripts
1 parent 2c1a42f commit a13f19c

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

create-os-security-groups.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export RESP_JSON_OS_SECGROUPS_CREATE=$(curl -s -X POST $NOVA_COMPUTE_SERV_PUBLIC
99
-d "{
1010
\"security_group\": {
1111
\"name\": \"secgroup-$RANDOM\",
12-
\"description\": \"auto-generated by script $(basename $0)\"
12+
\"description\": \"auto-generated by script\"
1313
}
1414
}")

create-security-groups.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -ex
2+
3+
source get-api-token.sh
4+
source get-neutron-network-service-public-url.sh
5+
6+
export RESP_JSON_SECURITY_GROUPS_CREATE=$(curl -s -X POST $NEUTRON_NETWORK_SERV_PUBLIC_URL/v2.0/security-groups \
7+
-H "Content-Type: application/json" \
8+
-H "X-Auth-Token: $API_TOKEN" \
9+
-d "{
10+
\"security_group\": {
11+
\"name\": \"sg-$RANDOM\",
12+
\"description\": \"auto-generated by script\"
13+
}
14+
}")

get-security-groups.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash -ex
2+
3+
source get-api-token.sh
4+
source get-neutron-network-service-public-url.sh
5+
6+
export RESP_JSON_SECURITY_GROUPS=$(curl -s -X GET $NEUTRON_NETWORK_SERV_PUBLIC_URL/v2.0/security-groups \
7+
-H "Content-Type: application/json" \
8+
-H "X-Auth-Token: $API_TOKEN")

0 commit comments

Comments
 (0)