Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide total number of clouds to automate registration of connectionConfig #932

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/api/rest/server/mcir/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// @Accept json
// @Produce json
// @Param registeringMethod query string true "registerWithInfo or registerWithId"
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param imageInfo body mcir.TbImageInfo false "Details for an image object"
// @Param imageId body mcir.TbImageReq false "name, connectionName and cspImageId"
// @Success 200 {object} mcir.TbImageInfo
Expand Down Expand Up @@ -93,7 +93,7 @@ func RestPostImage(c echo.Context) error {
// @Accept json
// @Produce json
// @Param imageInfo body mcir.TbImageInfo true "Details for an image object"
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param imageId path string true "Image ID"
// @Success 200 {object} mcir.TbImageInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down Expand Up @@ -193,7 +193,7 @@ func RestLookupImageList(c echo.Context) error {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
Expand Down Expand Up @@ -248,7 +248,7 @@ func RestFetchImages(c echo.Context) error {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param imageId path string true "Image ID"
// @Success 200 {object} mcir.TbImageInfo
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -270,7 +270,7 @@ type RestGetAllImageResponse struct {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param option query string false "Option" Enums(id)
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllImageResponse,[ID]=common.IdList} "Different return structures by the given option param"
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -287,7 +287,7 @@ func RestGetAllImage(c echo.Context) error {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param imageId path string true "Image ID"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -303,7 +303,7 @@ func RestDelImage(c echo.Context) error {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/resources/image [delete]
Expand All @@ -323,7 +323,7 @@ type RestSearchImageRequest struct {
// @Tags [MCIR] Image management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param keywords body RestSearchImageRequest true "Keywords"
// @Success 200 {object} RestGetAllImageResponse
// @Failure 404 {object} common.SimpleMsg
Expand Down
10 changes: 5 additions & 5 deletions src/api/rest/server/mcir/securitygroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// @Tags [MCIR] Security group management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param securityGroupReq body mcir.TbSecurityGroupReq true "Details for an securityGroup object"
// @Success 200 {object} mcir.TbSecurityGroupInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down Expand Up @@ -85,7 +85,7 @@ func RestPutSecurityGroup(c echo.Context) error {
// @Tags [MCIR] Security group management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param securityGroupId path string true "Security Group ID"
// @Success 200 {object} mcir.TbSecurityGroupInfo
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -107,7 +107,7 @@ type RestGetAllSecurityGroupResponse struct {
// @Tags [MCIR] Security group management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param option query string false "Option" Enums(id)
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSecurityGroupResponse,[ID]=common.IdList} "Different return structures by the given option param"
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -124,7 +124,7 @@ func RestGetAllSecurityGroup(c echo.Context) error {
// @Tags [MCIR] Security group management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param securityGroupId path string true "Security Group ID"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -140,7 +140,7 @@ func RestDelSecurityGroup(c echo.Context) error {
// @Tags [MCIR] Security group management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/resources/securityGroup [delete]
Expand Down
10 changes: 5 additions & 5 deletions src/api/rest/server/mcir/sshkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// @Tags [MCIR] Access key management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param sshKeyInfo body mcir.TbSshKeyReq true "Details for an SSH Key object"
// @Success 200 {object} mcir.TbSshKeyInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down Expand Up @@ -81,7 +81,7 @@ func RestPutSshKey(c echo.Context) error {
// @Tags [MCIR] Access key management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param sshKeyId path string true "SSH Key ID"
// @Success 200 {object} mcir.TbSshKeyInfo
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -103,7 +103,7 @@ type RestGetAllSshKeyResponse struct {
// @Tags [MCIR] Access key management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param option query string false "Option" Enums(id)
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSshKeyResponse,[ID]=common.IdList} "Different return structures by the given option param"
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -120,7 +120,7 @@ func RestGetAllSshKey(c echo.Context) error {
// @Tags [MCIR] Access key management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param sshKeyId path string true "SSH Key ID"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -136,7 +136,7 @@ func RestDelSshKey(c echo.Context) error {
// @Tags [MCIR] Access key management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/resources/sshKey [delete]
Expand Down
10 changes: 5 additions & 5 deletions src/api/rest/server/mcir/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param subnetReq body mcir.TbSubnetReq true "Details for an Subnet object"
// @Success 200 {object} mcir.TbSubnetInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down Expand Up @@ -88,7 +88,7 @@ func RestPutSubnet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param subnetId path string true "Subnet ID"
// @Success 200 {object} mcir.TbSubnetInfo
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -110,7 +110,7 @@ type RestGetAllSubnetResponse struct {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param option query string false "Option" Enums(id)
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSubnetResponse,[ID]=common.IdList} "Different return structures by the given option param"
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -128,7 +128,7 @@ func RestGetAllSubnet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param subnetId path string true "Subnet ID"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -145,7 +145,7 @@ func RestDelSubnet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/resources/vNet/{vNetId}/subnet [delete]
Expand Down
10 changes: 5 additions & 5 deletions src/api/rest/server/mcir/vnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param vNetReq body mcir.TbVNetReq true "Details for an VNet object"
// @Success 200 {object} mcir.TbVNetInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down Expand Up @@ -86,7 +86,7 @@ func RestPutVNet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param vNetId path string true "VNet ID"
// @Success 200 {object} mcir.TbVNetInfo
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -108,7 +108,7 @@ type RestGetAllVNetResponse struct {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param option query string false "Option" Enums(id)
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllVNetResponse,[ID]=common.IdList} "Different return structures by the given option param"
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -125,7 +125,7 @@ func RestGetAllVNet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param vNetId path string true "VNet ID"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
Expand All @@ -141,7 +141,7 @@ func RestDelVNet(c echo.Context) error {
// @Tags [MCIR] Network management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID"
// @Param nsId path string true "Namespace ID" default(ns01)
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/resources/vNet [delete]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ echo -e " - Tumblebug Server : ${GREEN}${BOLD} $TumblebugServer ${NC}"
echo -e " - Spider Server : ${GREEN}${BOLD} $SpiderServer ${NC}"
echo ""

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

for ((cspi = 1; cspi <= INDEXX; cspi++)); do
INDEXY=${NumRegion[$cspi]}
INDEXY=${TotalNumRegion[$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 @@ -179,9 +179,9 @@ done

if [ "${INDEX}" == "0" ]; then
echo "[Parallel execution for all CSP regions]"
INDEXX=${NumCSP}
INDEXX=${TotalNumCSP}
for ((cspi = 1; cspi <= INDEXX; cspi++)); do
INDEXY=${NumRegion[$cspi]}
INDEXY=${TotalNumRegion[$cspi]}
CSP=${CSPType[$cspi]}
echo "[$cspi] $CSP details"
for ((cspj = 1; cspj <= INDEXY; cspj++)); do
Expand Down
Loading