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

fix(instance): add zone to clear security group #729

Merged
merged 1 commit into from
Feb 26, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USAGE:

ARGS:
[name=<generated>] Name of the image
root-volume UUID of the snapshot
snapshot-id UUID of the snapshot
arch Architecture of the image (x86_64 | arm)
[default-bootscript] Default bootscript of the image
[extra-volumes.{key}.id] UUID of the volume
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EXAMPLES:
scw instance security-group clear security-group-id=11111111-1111-1111-1111-111111111111

ARGS:
[zone] Zone to target. If none is passed will use default zone from the config
security-group-id ID of the security group to reset.

FLAGS:
Expand Down
9 changes: 4 additions & 5 deletions internal/namespaces/instance/v1/custom_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-cli/internal/terminal"
"github.com/scaleway/scaleway-sdk-go/logger"

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/internal/human"

"github.com/hashicorp/go-multierror"
"github.com/scaleway/scaleway-cli/internal/core"
"github.com/scaleway/scaleway-cli/internal/human"
"github.com/scaleway/scaleway-cli/internal/interactive"
"github.com/scaleway/scaleway-cli/internal/terminal"
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
"github.com/scaleway/scaleway-sdk-go/logger"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -283,6 +281,7 @@ func securityGroupClearCommand() *core.Command {
return &core.SuccessResult{Message: "Successful reset of the security group rules"}, err
},
ArgSpecs: core.ArgSpecs{
core.ZoneArgSpec(),
{
Name: "security-group-id",
Short: `ID of the security group to reset.`,
Expand Down