Skip to content

Commit

Permalink
Merge pull request #1049 from jihoon-seo/220324_Fix_SG_NS_prefix
Browse files Browse the repository at this point in the history
Update to prepend NS prefix to SG name
  • Loading branch information
seokho-son authored Mar 25, 2022
2 parents d34c744 + f9343cc commit fbaa9d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit fbaa9d8

Please sign in to comment.