Skip to content

Commit

Permalink
feat(iam): add username order by in ListUsers (#4345)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Dec 9, 2024
1 parent da2d54f commit 1c469a8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw iam user list [arg=value ...]

ARGS:
[order-by=created_at_asc] Criteria for sorting results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | email_asc | email_desc | last_login_asc | last_login_desc)
[order-by=created_at_asc] Criteria for sorting results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | email_asc | email_desc | last_login_asc | last_login_desc | username_asc | username_desc)
[user-ids.{index}] Filter by list of IDs
[mfa] Filter by MFA status
[tag] Filter by tags containing a given string
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/iam.md
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ scw iam user list [arg=value ...]

| Name | | Description |
|------|---|-------------|
| order-by | Default: `created_at_asc`<br />One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `email_asc`, `email_desc`, `last_login_asc`, `last_login_desc` | Criteria for sorting results |
| order-by | Default: `created_at_asc`<br />One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `email_asc`, `email_desc`, `last_login_asc`, `last_login_desc`, `username_asc`, `username_desc` | Criteria for sorting results |
| user-ids.{index} | | Filter by list of IDs |
| mfa | | Filter by MFA status |
| tag | | Filter by tags containing a given string |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241205101249-1e60263d7dd0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241209103932-cb4590f1bf86
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241205101249-1e60263d7dd0 h1:3QUuR6KCwS2ewkX3A2djS3H4ZlV1/SyBHNDz7da4mDQ=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241205101249-1e60263d7dd0/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241209103932-cb4590f1bf86 h1:SA93A+shM43Qw7b8srntt5vp+hjuH3gEwRI7YDqZg3o=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241209103932-cb4590f1bf86/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/iam/v1alpha1/iam_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func iamUserList() *core.Command {
Deprecated: false,
Positional: false,
Default: core.DefaultValueSetter("created_at_asc"),
EnumValues: []string{"created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc", "email_asc", "email_desc", "last_login_asc", "last_login_desc"},
EnumValues: []string{"created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc", "email_asc", "email_desc", "last_login_asc", "last_login_desc", "username_asc", "username_desc"},
},
{
Name: "user-ids.{index}",
Expand Down

0 comments on commit 1c469a8

Please sign in to comment.