Skip to content

feat(instance): add project to resource IP #1129

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 3 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -16,6 +16,7 @@ EXAMPLES:
scw instance ip create server=11111111-1111-1111-1111-111111111111

ARGS:
[project] The project ID the IP is reserved in
[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-id] Organization ID to use. If none is passed will use default organization ID from the config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ EXAMPLES:
scw instance ip list zone=fr-par-1

ARGS:
[project] The project ID the IPs are reserved in
[name] Filter on the IP address (Works as a LIKE operation on the IP address)
[organization-id] The organization ID the IPs are reserved in
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)
Expand Down
12 changes: 12 additions & 0 deletions internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,12 @@ func instanceIPList() *core.Command {
Verb: "list",
ArgsType: reflect.TypeOf(instance.ListIPsRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "project",
Short: `The project ID the IPs are reserved in`,
Required: false,
Positional: false,
},
{
Name: "name",
Short: `Filter on the IP address (Works as a LIKE operation on the IP address)`,
Expand Down Expand Up @@ -1995,6 +2001,12 @@ func instanceIPCreate() *core.Command {
Verb: "create",
ArgsType: reflect.TypeOf(instance.CreateIPRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "project",
Short: `The project ID the IP is reserved in`,
Required: false,
Positional: false,
},
{
Name: "server",
Short: `UUID of the server you want to attach the IP to`,
Expand Down