-
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.
Update conf.env and testSet.env for Domestic CSPs, and Add modify_ngi…
…nx.sh to Set nginx server on NCP Classic VM (#1604) * Update conf.env and testSet.env to test Domestic CSPs * Update NCP Classic KR and SGN region VMSpec * Update credential template * Update NCP Classic Korea and Singapore SPEC_NAME for Test scripts * Add Resource Create/Clean Test codes for Domestic CSPs
- Loading branch information
1 parent
adf56fd
commit 6c9db65
Showing
13 changed files
with
962 additions
and
161 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
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
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,56 @@ | ||
#!/bin/bash | ||
|
||
function CallTB() { | ||
echo "- Create vNet in ${MCIRRegionName}" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/resources/vNet?option=register -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"connectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"cspVNetId": "60e5d9da-55cd-47be-a0d9-6cf67c54f15c" | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function create_vNet() { | ||
|
||
echo "####################################################################" | ||
echo "## 3. vNet: Create" | ||
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 | ||
|
||
#} | ||
|
||
#create_vNet |
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,81 @@ | ||
#!/bin/bash | ||
|
||
function CallTB() { | ||
echo "- Create vNet in ${MCIRRegionName}" | ||
|
||
CIDRNum=$(($INDEX+1)) | ||
CIDRDiff=$(($CIDRNum*$REGION)) | ||
CIDRDiff=$(($CIDRDiff%254)) | ||
|
||
CidrBlock="10.${CIDRDiff}.0.0/16" | ||
|
||
# Original | ||
# IPv4CIDR01="10.${CIDRDiff}.0.0/18" | ||
# IPv4CIDR02="10.${CIDRDiff}.64.0/18" | ||
|
||
# Modified by OH (For extra range for NLB subnet ) | ||
IPv4CIDR01="10.${CIDRDiff}.0.0/28" | ||
IPv4CIDR02="10.${CIDRDiff}.64.0/28" | ||
|
||
# CidrBlock="10.1.0.0/16" # for a temporal test for a limited CSP. | ||
# IPv4CIDR01="10.1.0.0/18" | ||
# IPv4CIDR02="10.1.64.0/18" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/resources/vNet -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"connectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"cidrBlock": "${CidrBlock}", | ||
"subnetInfoList": [ { | ||
"Name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"IPv4_CIDR": "${IPv4CIDR01}" | ||
}, { | ||
"Name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}-01", | ||
"IPv4_CIDR": "${IPv4CIDR02}" | ||
} ] | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function create_vNet() { | ||
|
||
echo "####################################################################" | ||
echo "## 3. vNet: Create" | ||
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 | ||
|
||
#} | ||
|
||
#create_vNet |
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,56 @@ | ||
#!/bin/bash | ||
|
||
function CallTB() { | ||
echo "- Create vNet in ${MCIRRegionName}" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/resources/vNet?option=register -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"connectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"cspVNetId": "7e3af4cc-407b-47f6-beda-7c161ebe56f0" | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function create_vNet() { | ||
|
||
echo "####################################################################" | ||
echo "## 3. vNet: Create" | ||
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 | ||
|
||
#} | ||
|
||
#create_vNet |
101 changes: 101 additions & 0 deletions
101
src/testclient/scripts/4.securityGroup/create-securityGroup-ktvpc.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,101 @@ | ||
#!/bin/bash | ||
|
||
function CallTB() { | ||
echo "- Create securityGroup in ${MCIRRegionName}" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/resources/securityGroup -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"connectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"vNetId": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"description": "test description", | ||
"firewallRules": [ | ||
{ | ||
"FromPort": "1", | ||
"ToPort": "65535", | ||
"IPProtocol": "tcp", | ||
"Direction": "inbound", | ||
"CIDR": "0.0.0.0/0" | ||
}, | ||
{ | ||
"FromPort": "1", | ||
"ToPort": "65535", | ||
"IPProtocol": "udp", | ||
"Direction": "inbound", | ||
"CIDR": "0.0.0.0/0" | ||
}, | ||
{ | ||
"FromPort": "-1", | ||
"ToPort": "-1", | ||
"IPProtocol": "icmp", | ||
"Direction": "inbound", | ||
"CIDR": "0.0.0.0/0" | ||
}, | ||
{ | ||
"FromPort": "1", | ||
"ToPort": "65535", | ||
"IPProtocol": "tcp", | ||
"Direction": "outbound", | ||
"CIDR": "0.0.0.0/0" | ||
}, | ||
{ | ||
"FromPort": "1", | ||
"ToPort": "65535", | ||
"IPProtocol": "udp", | ||
"Direction": "outbound", | ||
"CIDR": "0.0.0.0/0" | ||
}, | ||
{ | ||
"FromPort": "-1", | ||
"ToPort": "-1", | ||
"IPProtocol": "icmp", | ||
"Direction": "outbound", | ||
"CIDR": "0.0.0.0/0" | ||
} | ||
] | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function create_securityGroup() { | ||
|
||
echo "####################################################################" | ||
echo "## 4. SecurityGroup: Create" | ||
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 | ||
|
||
#} | ||
|
||
#create_securityGroup |
Oops, something went wrong.