Skip to content

Commit b2aa437

Browse files
feat(instance): added field private_networks for ListServersRequest (#3302)
Co-authored-by: Jules Castéran <[email protected]>
1 parent 7dde95b commit b2aa437

File tree

5 files changed

+44
-33
lines changed

5 files changed

+44
-33
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ EXAMPLES:
1919
scw instance server list name=server1
2020

2121
ARGS:
22-
[project-id] List only Instances of this Project ID
23-
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
24-
[private-ip] List Instances by private_ip
25-
[without-ip] List Instances that are not attached to a public IP
26-
[commercial-type] List Instances of this commercial type
27-
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
28-
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
29-
[private-network] List Instances in this Private Network
30-
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
31-
[organization-id] List only Instances of this Organization ID
32-
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
22+
[project-id] List only Instances of this Project ID
23+
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
24+
[private-ip] List Instances by private_ip
25+
[without-ip] List Instances that are not attached to a public IP
26+
[commercial-type] List Instances of this commercial type
27+
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
28+
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
29+
[private-network] List Instances in this Private Network
30+
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
31+
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
32+
[organization-id] List only Instances of this Organization ID
33+
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
3334

3435
FLAGS:
3536
-h, --help help for list

docs/commands/instance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,7 @@ scw instance server list [arg=value ...]
19091909
| tags.{index} | | List Instances with these exact tags (to filter with several tags, use commas to separate them) |
19101910
| private-network | | List Instances in this Private Network |
19111911
| order | One of: `creation_date_desc`, `creation_date_asc`, `modification_date_desc`, `modification_date_asc` | Define the order of the returned servers |
1912+
| private-networks.{index} | | List Instances from the given Private Networks (use commas to separate them) |
19121913
| organization-id | | List only Instances of this Organization ID |
19131914
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `all` | Zone to target. If none is passed will use default zone from the config |
19141915

internal/namespaces/alias/testdata/test-alias-multiple-words.golden

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ EXAMPLES:
1919
scw instance server list name=server1
2020

2121
ARGS:
22-
[project-id] List only Instances of this Project ID
23-
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
24-
[private-ip] List Instances by private_ip
25-
[without-ip] List Instances that are not attached to a public IP
26-
[commercial-type] List Instances of this commercial type
27-
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
28-
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
29-
[private-network] List Instances in this Private Network
30-
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
31-
[organization-id] List only Instances of this Organization ID
32-
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
22+
[project-id] List only Instances of this Project ID
23+
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
24+
[private-ip] List Instances by private_ip
25+
[without-ip] List Instances that are not attached to a public IP
26+
[commercial-type] List Instances of this commercial type
27+
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
28+
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
29+
[private-network] List Instances in this Private Network
30+
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
31+
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
32+
[organization-id] List only Instances of this Organization ID
33+
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
3334

3435
FLAGS:
3536
-h, --help help for list

internal/namespaces/alias/testdata/test-alias-one-word-aliases.golden

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ EXAMPLES:
2222
scw instance server list name=server1
2323

2424
ARGS:
25-
[project-id] List only Instances of this Project ID
26-
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
27-
[private-ip] List Instances by private_ip
28-
[without-ip] List Instances that are not attached to a public IP
29-
[commercial-type] List Instances of this commercial type
30-
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
31-
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
32-
[private-network] List Instances in this Private Network
33-
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
34-
[organization-id] List only Instances of this Organization ID
35-
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
25+
[project-id] List only Instances of this Project ID
26+
[name] Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo")
27+
[private-ip] List Instances by private_ip
28+
[without-ip] List Instances that are not attached to a public IP
29+
[commercial-type] List Instances of this commercial type
30+
[state] List Instances in this state (running | stopped | stopped in place | starting | stopping | locked)
31+
[tags.{index}] List Instances with these exact tags (to filter with several tags, use commas to separate them)
32+
[private-network] List Instances in this Private Network
33+
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
34+
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
35+
[organization-id] List only Instances of this Organization ID
36+
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
3637

3738
FLAGS:
3839
-h, --help help for list

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ func instanceServerList() *core.Command {
456456
Positional: false,
457457
EnumValues: []string{"creation_date_desc", "creation_date_asc", "modification_date_desc", "modification_date_asc"},
458458
},
459+
{
460+
Name: "private-networks.{index}",
461+
Short: `List Instances from the given Private Networks (use commas to separate them)`,
462+
Required: false,
463+
Deprecated: false,
464+
Positional: false,
465+
},
459466
{
460467
Name: "organization",
461468
Short: `List only Instances of this Organization ID`,

0 commit comments

Comments
 (0)