Skip to content

Commit b8c1ab2

Browse files
feat(instance): add servers filter in ListServersRequest (#3391)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 5ba7c59 commit b8c1ab2

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ARGS:
3030
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
3131
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
3232
[private-nic-mac-address] List Instances associated with the given private NIC MAC address
33+
[servers.{index}] List Instances from these server ids (use commas to separate them)
3334
[organization-id] List only Instances of this Organization ID
3435
[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 | pl-waw-3 | all)
3536

docs/commands/instance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,6 +1979,7 @@ scw instance server list [arg=value ...]
19791979
| order | One of: `creation_date_desc`, `creation_date_asc`, `modification_date_desc`, `modification_date_asc` | Define the order of the returned servers |
19801980
| private-networks.{index} | | List Instances from the given Private Networks (use commas to separate them) |
19811981
| private-nic-mac-address | | List Instances associated with the given private NIC MAC address |
1982+
| servers.{index} | | List Instances from these server ids (use commas to separate them) |
19821983
| organization-id | | List only Instances of this Organization ID |
19831984
| 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`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |
19841985

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ARGS:
3030
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
3131
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
3232
[private-nic-mac-address] List Instances associated with the given private NIC MAC address
33+
[servers.{index}] List Instances from these server ids (use commas to separate them)
3334
[organization-id] List only Instances of this Organization ID
3435
[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 | pl-waw-3 | all)
3536

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ARGS:
3333
[order] Define the order of the returned servers (creation_date_desc | creation_date_asc | modification_date_desc | modification_date_asc)
3434
[private-networks.{index}] List Instances from the given Private Networks (use commas to separate them)
3535
[private-nic-mac-address] List Instances associated with the given private NIC MAC address
36+
[servers.{index}] List Instances from these server ids (use commas to separate them)
3637
[organization-id] List only Instances of this Organization ID
3738
[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 | pl-waw-3 | all)
3839

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,13 @@ func instanceServerList() *core.Command {
470470
Deprecated: false,
471471
Positional: false,
472472
},
473+
{
474+
Name: "servers.{index}",
475+
Short: `List Instances from these server ids (use commas to separate them)`,
476+
Required: false,
477+
Deprecated: false,
478+
Positional: false,
479+
},
473480
{
474481
Name: "organization",
475482
Short: `List only Instances of this Organization ID`,

0 commit comments

Comments
 (0)