Skip to content

Commit

Permalink
Update register-cloud-interactive.sh to support $NumCSP and $NumRegion
Browse files Browse the repository at this point in the history
  • Loading branch information
sykim-etri committed Jan 5, 2024
1 parent 5178ccb commit 2e3f34a
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ EOF
}

echo "####################################################################"
echo "## 1. Register Cloud Inforation"
echo "## 1. Register Cloud Information"
echo "####################################################################"

SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}`
Expand All @@ -155,11 +155,11 @@ echo -e " - Tumblebug Server : ${GREEN}${BOLD} $TumblebugServer ${NC}"
echo -e " - Spider Server : ${GREEN}${BOLD} $SpiderServer ${NC}"
echo ""

INDEXX=${TotalNumCSP}
INDEXX=${NumCSP}
echo -e "${BOLD}2) Enabled Clouds and Regions${NC}"

for ((cspi = 1; cspi <= INDEXX; cspi++)); do
INDEXY=${TotalNumRegion[$cspi]}
INDEXY=${NumRegion[$cspi]}
CSP=${CSPType[$cspi]}
echo -e "${GREEN}${BOLD} - [$cspi] Cloud : $CSP (enabled regions : $INDEXY)${NC}"
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
Expand Down Expand Up @@ -211,9 +211,17 @@ if [ "${INDEX}" == "0" ]; then

else
echo ""
CallSpiderPostDriver
CallSpiderPostRegion

INDEXX=${NumCSP}
for ((cspi = 1; cspi <= INDEXX; cspi++)); do
INDEXY=${NumRegion[$cspi]}
CSP=${CSPType[$cspi]}
CallSpiderPostDriver
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
INDEX=$cspi
REGION=$cspj
CallSpiderPostRegion
done
done
fi

# Print list of all registered cloud info
Expand Down

0 comments on commit 2e3f34a

Please sign in to comment.