Skip to content

Commit

Permalink
Delete associated mc-nlb mcis
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Nov 6, 2022
1 parent f9a0ac7 commit ac48dab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/mcis/manageInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,18 @@ func DelMcis(nsId string, mcisId string, option string) (common.IdList, error) {
}
deletedResources.IdList = append(deletedResources.IdList, output.IdList...)

// delete associated MCIS NLBs
mcisNlbId := mcisId + "-nlb"
check, _ = CheckMcis(nsId, mcisNlbId)
if check {
mcisNlbDeleteResult, err := DelMcis(nsId, mcisNlbId, option)
if err != nil {
common.CBLog.Error(err)
return deletedResources, err
}
deletedResources.IdList = append(deletedResources.IdList, mcisNlbDeleteResult.IdList...)
}

// delete mcis info
err = common.CBStore.Delete(key)
if err != nil {
Expand Down

0 comments on commit ac48dab

Please sign in to comment.