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 terminate option for delete all MCIs #1797

Merged
merged 2 commits into from
Sep 5, 2024
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
5 changes: 3 additions & 2 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3139,10 +3139,11 @@ const docTemplate = `{
},
{
"enum": [
"force"
"force",
"terminate"
],
"type": "string",
"description": "Option for delete MCI (support force delete)",
"description": "Option for delete all MCIs (support force object delete, terminate before delete)",
"name": "option",
"in": "query"
}
Expand Down
5 changes: 3 additions & 2 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3132,10 +3132,11 @@
},
{
"enum": [
"force"
"force",
"terminate"
],
"type": "string",
"description": "Option for delete MCI (support force delete)",
"description": "Option for delete all MCIs (support force object delete, terminate before delete)",
"name": "option",
"in": "query"
}
Expand Down
4 changes: 3 additions & 1 deletion src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5562,9 +5562,11 @@ paths:
name: nsId
required: true
type: string
- description: Option for delete MCI (support force delete)
- description: Option for delete all MCIs (support force object delete, terminate
before delete)
enum:
- force
- terminate
in: query
name: option
type: string
Expand Down
2 changes: 1 addition & 1 deletion src/api/rest/server/infra/manageInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func RestDelMci(c echo.Context) error {
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(default)
// @Param option query string false "Option for delete MCI (support force delete)" Enums(force)
// @Param option query string false "Option for delete all MCIs (support force object delete, terminate before delete)" Enums(force, terminate)
// @Success 200 {object} model.SimpleMsg
// @Failure 404 {object} model.SimpleMsg
// @Router /ns/{nsId}/mci [delete]
Expand Down