-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c872c6
commit 3a94dda
Showing
3 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/testclient/scripts/4.securityGroup/test-register-csp-securityGroup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
function CallTB() { | ||
echo "- Register securityGroup in ${MCIRRegionName}" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/resources/securityGroup?option=register -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"connectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"vNetId": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"cspSecurityGroupId": "sg-06b67660aa959e005" | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function register_securityGroup() { | ||
|
||
echo "####################################################################" | ||
echo "## 4. SecurityGroup: Register" | ||
echo "####################################################################" | ||
|
||
source ../init.sh | ||
|
||
if [ "${INDEX}" == "0" ]; then | ||
echo "[Parallel execution for all CSP regions]" | ||
INDEXX=${NumCSP} | ||
for ((cspi = 1; cspi <= INDEXX; cspi++)); do | ||
INDEXY=${NumRegion[$cspi]} | ||
CSP=${CSPType[$cspi]} | ||
echo "[$cspi] $CSP details" | ||
for ((cspj = 1; cspj <= INDEXY; cspj++)); do | ||
echo "[$cspi,$cspj] ${RegionName[$cspi,$cspj]}" | ||
|
||
MCIRRegionName=${RegionName[$cspi,$cspj]} | ||
|
||
CallTB | ||
|
||
done | ||
|
||
done | ||
wait | ||
|
||
else | ||
echo "" | ||
|
||
MCIRRegionName=${CONN_CONFIG[$INDEX,$REGION]} | ||
|
||
CallTB | ||
|
||
fi | ||
|
||
#} | ||
|
||
#register_securityGroup |
File renamed without changes.