Skip to content

Commit 5affb66

Browse files
feat(k8s): add support for many order-by options in node list (#4384)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 55f8111 commit 5affb66

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ EXAMPLES:
1818
ARGS:
1919
cluster-id Cluster ID from which the nodes will be listed from
2020
[pool-id] Pool ID on which to filter the returned nodes
21-
[order-by] Sort order of the returned nodes (created_at_asc | created_at_desc)
21+
[order-by] Sort order of the returned nodes (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc | status_asc | status_desc | version_asc | version_desc)
2222
[name] Name to filter on, only nodes containing this substring in their name will be returned
2323
[status] Status to filter on, only nodes with this status will be returned (unknown | creating | not_ready | ready | deleting | deleted | locked | rebooting | creation_error | upgrading | starting | registering)
2424
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

docs/commands/k8s.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ scw k8s node list [arg=value ...]
837837
|------|---|-------------|
838838
| cluster-id | Required | Cluster ID from which the nodes will be listed from |
839839
| pool-id | | Pool ID on which to filter the returned nodes |
840-
| order-by | One of: `created_at_asc`, `created_at_desc` | Sort order of the returned nodes |
840+
| order-by | One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `name_asc`, `name_desc`, `status_asc`, `status_desc`, `version_asc`, `version_desc` | Sort order of the returned nodes |
841841
| name | | Name to filter on, only nodes containing this substring in their name will be returned |
842842
| status | One of: `unknown`, `creating`, `not_ready`, `ready`, `deleting`, `deleted`, `locked`, `rebooting`, `creation_error`, `upgrading`, `starting`, `registering` | Status to filter on, only nodes with this status will be returned |
843843
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |

internal/namespaces/k8s/v1/k8s_cli.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ func k8sNodeList() *core.Command {
19461946
Required: false,
19471947
Deprecated: false,
19481948
Positional: false,
1949-
EnumValues: []string{"created_at_asc", "created_at_desc"},
1949+
EnumValues: []string{"created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc", "name_asc", "name_desc", "status_asc", "status_desc", "version_asc", "version_desc"},
19501950
},
19511951
{
19521952
Name: "name",

0 commit comments

Comments
 (0)