Skip to content

Commit

Permalink
feat: support for forcing namespace deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Aug 19, 2022
1 parent 900b2eb commit ea7529e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rhoc/pkg/cmd/namespaces/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type options struct {
outputFormat string
id string
skipConfirm bool
force bool

f *factory.Factory
}
Expand Down Expand Up @@ -45,6 +46,7 @@ func NewDeletesCommand(f *factory.Factory) *cobra.Command {

cmdutil.AddOutput(cmd, &opts.outputFormat)
cmdutil.AddYes(cmd, &opts.skipConfirm)
cmdutil.AddForce(cmd, &opts.force)
cmdutil.AddID(cmd, &opts.id).Required()

return cmd
Expand All @@ -70,6 +72,7 @@ func run(opts *options) error {
}

e := c.Clusters().DeleteConnectorNamespace(opts.f.Context, opts.id)
e = e.Force(opts.force)

result, httpRes, err := e.Execute()
if httpRes != nil {
Expand Down

0 comments on commit ea7529e

Please sign in to comment.