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

Update to prepend NS prefix to SG name #1049

Merged
merged 1 commit into from
Mar 25, 2022
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
2 changes: 1 addition & 1 deletion src/core/mcir/securitygroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func CreateSecurityGroup(nsId string, u *TbSecurityGroupReq, option string) (TbS

tempReq := SpiderSecurityReqInfoWrapper{}
tempReq.ConnectionName = u.ConnectionName
tempReq.ReqInfo.Name = u.Name
tempReq.ReqInfo.Name = fmt.Sprintf("%s-%s", nsId, u.Name)
tempReq.ReqInfo.VPCName = vNetInfo.CspVNetName
tempReq.ReqInfo.SecurityRules = u.FirewallRules
tempReq.ReqInfo.CSPId = u.CspSecurityGroupId
Expand Down
2 changes: 1 addition & 1 deletion src/core/mcir/vnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func CreateVNet(nsId string, u *TbVNetReq, option string) (TbVNetInfo, error) {

tempReq := SpiderVPCReqInfoWrapper{}
tempReq.ConnectionName = u.ConnectionName
tempReq.ReqInfo.Name = nsId + "-" + u.Name
tempReq.ReqInfo.Name = fmt.Sprintf("%s-%s", nsId, u.Name)
tempReq.ReqInfo.IPv4_CIDR = u.CidrBlock
tempReq.ReqInfo.CSPId = u.CspVNetId

Expand Down
2 changes: 1 addition & 1 deletion src/core/mcis/provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ func CreateVm(nsId string, mcisId string, vmInfoData *TbVmInfo, option string) e

//generate VM ID(Name) to request to CSP(Spider)
//combination of nsId, mcidId, and vmName reqested from user
tempReq.ReqInfo.Name = nsId + "-" + mcisId + "-" + vmInfoData.Name
tempReq.ReqInfo.Name = fmt.Sprintf("%s-%s-%s", nsId, mcisId, vmInfoData.Name)

err := fmt.Errorf("")

Expand Down