Skip to content

Commit

Permalink
fix(instance): add missing pnic requests (#2710)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
  • Loading branch information
scaleway-bot and Codelax committed Jan 3, 2023
1 parent a77d42c commit c25943f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ USAGE:
scw instance private-nic create [arg=value ...]

ARGS:
server-id
[private-network-id]
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
server-id UUID of the server the private NIC will be attached to
private-network-id UUID of the private network where the private NIC will be attached
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

FLAGS:
-h, --help help for create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ USAGE:
scw instance private-nic delete [arg=value ...]

ARGS:
server-id
private-nic-id
server-id The server the private NIC is attached to
private-nic-id The private NIC unique ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ USAGE:
scw instance private-nic get [arg=value ...]

ARGS:
server-id
private-nic-id
server-id The server the private NIC is attached to
private-nic-id The private NIC unique ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EXAMPLES:
scw instance private-nic list server-id=my_server_id

ARGS:
server-id
server-id The server the private NIC is attached to
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

FLAGS:
Expand Down
14 changes: 7 additions & 7 deletions docs/commands/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,8 @@ scw instance private-nic create [arg=value ...]

| Name | | Description |
|------|---|-------------|
| server-id | Required | |
| private-network-id | | |
| server-id | Required | UUID of the server the private NIC will be attached to |
| private-network-id | Required | UUID of the private network where the private NIC will be attached |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand All @@ -866,8 +866,8 @@ scw instance private-nic delete [arg=value ...]

| Name | | Description |
|------|---|-------------|
| server-id | Required | |
| private-nic-id | Required | |
| server-id | Required | The server the private NIC is attached to |
| private-nic-id | Required | The private NIC unique ID |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand All @@ -887,8 +887,8 @@ scw instance private-nic get [arg=value ...]

| Name | | Description |
|------|---|-------------|
| server-id | Required | |
| private-nic-id | Required | |
| server-id | Required | The server the private NIC is attached to |
| private-nic-id | Required | The private NIC unique ID |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand All @@ -908,7 +908,7 @@ scw instance private-nic list [arg=value ...]

| Name | | Description |
|------|---|-------------|
| server-id | Required | |
| server-id | Required | The server the private NIC is attached to |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8 h1:HvVzojcSGcZf7YZ2mtkZ1uoTyGolfiynND+NDuF7Ht4=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a h1:AN3KX9UupxrBlNe6YE5SUE2IP2jNdy47OyT2Pvv+2mc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
Expand Down
9 changes: 8 additions & 1 deletion internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2709,6 +2709,7 @@ func instancePrivateNicList() *core.Command {
ArgSpecs: core.ArgSpecs{
{
Name: "server-id",
Short: `The server the private NIC is attached to`,
Required: true,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -2748,13 +2749,15 @@ func instancePrivateNicCreate() *core.Command {
ArgSpecs: core.ArgSpecs{
{
Name: "server-id",
Short: `UUID of the server the private NIC will be attached to`,
Required: true,
Deprecated: false,
Positional: false,
},
{
Name: "private-network-id",
Required: false,
Short: `UUID of the private network where the private NIC will be attached`,
Required: true,
Deprecated: false,
Positional: false,
},
Expand Down Expand Up @@ -2783,12 +2786,14 @@ func instancePrivateNicGet() *core.Command {
ArgSpecs: core.ArgSpecs{
{
Name: "server-id",
Short: `The server the private NIC is attached to`,
Required: true,
Deprecated: false,
Positional: false,
},
{
Name: "private-nic-id",
Short: `The private NIC unique ID`,
Required: true,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -2818,12 +2823,14 @@ func instancePrivateNicDelete() *core.Command {
ArgSpecs: core.ArgSpecs{
{
Name: "server-id",
Short: `The server the private NIC is attached to`,
Required: true,
Deprecated: false,
Positional: false,
},
{
Name: "private-nic-id",
Short: `The private NIC unique ID`,
Required: true,
Deprecated: false,
Positional: false,
Expand Down

0 comments on commit c25943f

Please sign in to comment.