Skip to content

Commit c25943f

Browse files
fix(instance): add missing pnic requests (#2710)
Co-authored-by: Jules Castéran <[email protected]>
1 parent a77d42c commit c25943f

File tree

8 files changed

+26
-19
lines changed

8 files changed

+26
-19
lines changed

cmd/scw/testdata/test-all-usage-instance-private-nic-create-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ USAGE:
66
scw instance private-nic create [arg=value ...]
77

88
ARGS:
9-
server-id
10-
[private-network-id]
11-
[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)
9+
server-id UUID of the server the private NIC will be attached to
10+
private-network-id UUID of the private network where the private NIC will be attached
11+
[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)
1212

1313
FLAGS:
1414
-h, --help help for create

cmd/scw/testdata/test-all-usage-instance-private-nic-delete-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ USAGE:
66
scw instance private-nic delete [arg=value ...]
77

88
ARGS:
9-
server-id
10-
private-nic-id
9+
server-id The server the private NIC is attached to
10+
private-nic-id The private NIC unique ID
1111
[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)
1212

1313
FLAGS:

cmd/scw/testdata/test-all-usage-instance-private-nic-get-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ USAGE:
66
scw instance private-nic get [arg=value ...]
77

88
ARGS:
9-
server-id
10-
private-nic-id
9+
server-id The server the private NIC is attached to
10+
private-nic-id The private NIC unique ID
1111
[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)
1212

1313
FLAGS:

cmd/scw/testdata/test-all-usage-instance-private-nic-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ EXAMPLES:
1313
scw instance private-nic list server-id=my_server_id
1414

1515
ARGS:
16-
server-id
16+
server-id The server the private NIC is attached to
1717
[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)
1818

1919
FLAGS:

docs/commands/instance.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,8 @@ scw instance private-nic create [arg=value ...]
845845

846846
| Name | | Description |
847847
|------|---|-------------|
848-
| server-id | Required | |
849-
| private-network-id | | |
848+
| server-id | Required | UUID of the server the private NIC will be attached to |
849+
| private-network-id | Required | UUID of the private network where the private NIC will be attached |
850850
| 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 |
851851

852852

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

867867
| Name | | Description |
868868
|------|---|-------------|
869-
| server-id | Required | |
870-
| private-nic-id | Required | |
869+
| server-id | Required | The server the private NIC is attached to |
870+
| private-nic-id | Required | The private NIC unique ID |
871871
| 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 |
872872

873873

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

888888
| Name | | Description |
889889
|------|---|-------------|
890-
| server-id | Required | |
891-
| private-nic-id | Required | |
890+
| server-id | Required | The server the private NIC is attached to |
891+
| private-nic-id | Required | The private NIC unique ID |
892892
| 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 |
893893

894894

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

909909
| Name | | Description |
910910
|------|---|-------------|
911-
| server-id | Required | |
911+
| server-id | Required | The server the private NIC is attached to |
912912
| 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 |
913913

914914

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
1919
github.com/mattn/go-colorable v0.1.13
2020
github.com/mattn/go-isatty v0.0.16
21-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8
21+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a
2222
github.com/spf13/cobra v1.6.1
2323
github.com/spf13/pflag v1.0.5
2424
github.com/stretchr/testify v1.8.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
7171
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7272
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7373
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
74-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8 h1:HvVzojcSGcZf7YZ2mtkZ1uoTyGolfiynND+NDuF7Ht4=
75-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221226150403-e0f006954fd8/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
74+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a h1:AN3KX9UupxrBlNe6YE5SUE2IP2jNdy47OyT2Pvv+2mc=
75+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221228142400-b21744e9949a/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7676
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7777
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7878
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,7 @@ func instancePrivateNicList() *core.Command {
27092709
ArgSpecs: core.ArgSpecs{
27102710
{
27112711
Name: "server-id",
2712+
Short: `The server the private NIC is attached to`,
27122713
Required: true,
27132714
Deprecated: false,
27142715
Positional: false,
@@ -2748,13 +2749,15 @@ func instancePrivateNicCreate() *core.Command {
27482749
ArgSpecs: core.ArgSpecs{
27492750
{
27502751
Name: "server-id",
2752+
Short: `UUID of the server the private NIC will be attached to`,
27512753
Required: true,
27522754
Deprecated: false,
27532755
Positional: false,
27542756
},
27552757
{
27562758
Name: "private-network-id",
2757-
Required: false,
2759+
Short: `UUID of the private network where the private NIC will be attached`,
2760+
Required: true,
27582761
Deprecated: false,
27592762
Positional: false,
27602763
},
@@ -2783,12 +2786,14 @@ func instancePrivateNicGet() *core.Command {
27832786
ArgSpecs: core.ArgSpecs{
27842787
{
27852788
Name: "server-id",
2789+
Short: `The server the private NIC is attached to`,
27862790
Required: true,
27872791
Deprecated: false,
27882792
Positional: false,
27892793
},
27902794
{
27912795
Name: "private-nic-id",
2796+
Short: `The private NIC unique ID`,
27922797
Required: true,
27932798
Deprecated: false,
27942799
Positional: false,
@@ -2818,12 +2823,14 @@ func instancePrivateNicDelete() *core.Command {
28182823
ArgSpecs: core.ArgSpecs{
28192824
{
28202825
Name: "server-id",
2826+
Short: `The server the private NIC is attached to`,
28212827
Required: true,
28222828
Deprecated: false,
28232829
Positional: false,
28242830
},
28252831
{
28262832
Name: "private-nic-id",
2833+
Short: `The private NIC unique ID`,
28272834
Required: true,
28282835
Deprecated: false,
28292836
Positional: false,

0 commit comments

Comments
 (0)