-
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.
Enhance registerExistingSSHKey feature
- Loading branch information
1 parent
3a94dda
commit 35829cc
Showing
7 changed files
with
222 additions
and
32 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
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
58 changes: 58 additions & 0 deletions
58
src/testclient/scripts/5.sshKey/spider-test-register-sshKey.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,58 @@ | ||
#!/bin/bash | ||
|
||
function CallSpider() { | ||
echo "- Get sshKey in ${MCIRRegionName}" | ||
|
||
resp=$( | ||
curl -H "${AUTH}" -sX POST http://$SpiderServer/spider/regkeypair -H 'Content-Type: application/json' -d @- <<EOF | ||
{ | ||
"ConnectionName": "${CONN_CONFIG[$INDEX,$REGION]}", | ||
"ReqInfo": { | ||
"Name": "${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}", | ||
"CSPId": "jhseo-test" | ||
} | ||
} | ||
EOF | ||
); echo ${resp} | jq '' | ||
echo "" | ||
} | ||
|
||
#function spider_get_sshKey() { | ||
|
||
echo "####################################################################" | ||
echo "## 5. sshKey: Get" | ||
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]} | ||
|
||
CallSpider | ||
|
||
done | ||
|
||
done | ||
wait | ||
|
||
else | ||
echo "" | ||
|
||
MCIRRegionName=${CONN_CONFIG[$INDEX,$REGION]} | ||
|
||
CallSpider | ||
|
||
fi | ||
|
||
#} | ||
|
||
#spider_get_sshKey |
Oops, something went wrong.