Skip to content

feat(instance): add tags and zone fields to IP methods #724

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

Merged
merged 2 commits into from
Feb 25, 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,6 +5,7 @@ USAGE:

ARGS:
[server] UUID of the server you want to attach the IP to
[tags.{index}] An array of keywords you want to tag this IP with
[organization] Organization ID to use. If none is passed will use default organization ID from the config
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ USAGE:
ARGS:
ip IP ID or IP address
[reverse] Reverse domain name
[tags] An array of keywords you want to tag this IP with
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)

FLAGS:
Expand Down
16 changes: 16 additions & 0 deletions internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,12 @@ func instanceIPList() *core.Command {
{
FieldName: "server.name",
},
{
FieldName: "tags",
},
{
FieldName: "zone",
},
}},
}
}
Expand All @@ -1719,6 +1725,11 @@ func instanceIPCreate() *core.Command {
Short: `UUID of the server you want to attach the IP to`,
Required: false,
},
{
Name: "tags.{index}",
Short: `An array of keywords you want to tag this IP with`,
Required: false,
},
core.OrganizationArgSpec(),
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneNlAms1),
},
Expand Down Expand Up @@ -1779,6 +1790,11 @@ func instanceIPUpdate() *core.Command {
Short: `Reverse domain name`,
Required: false,
},
{
Name: "tags",
Short: `An array of keywords you want to tag this IP with`,
Required: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneNlAms1),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down