diff --git a/cmd/scw/testdata/test-all-usage-registry-image-list-usage.golden b/cmd/scw/testdata/test-all-usage-registry-image-list-usage.golden index 195dc6eb7b..58fc3fc4db 100644 --- a/cmd/scw/testdata/test-all-usage-registry-image-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-registry-image-list-usage.golden @@ -9,6 +9,7 @@ ARGS: [order-by] Field by which to order the display of Images (created_at_asc | created_at_desc | name_asc | name_desc) [namespace-id] Filter by the Namespace ID [name] Filter by the Image name (exact match) + [project-id] Filter by Project ID [organization-id] Filter by Organization ID [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) diff --git a/cmd/scw/testdata/test-all-usage-registry-namespace-create-usage.golden b/cmd/scw/testdata/test-all-usage-registry-namespace-create-usage.golden index 561e81702d..90c26969ca 100644 --- a/cmd/scw/testdata/test-all-usage-registry-namespace-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-registry-namespace-create-usage.golden @@ -8,6 +8,7 @@ USAGE: ARGS: name Define a namespace name [description] Define a description + [project-id] Assign the namespace to a project ID [is-public] Define the default visibility policy [organization-id] Organization ID to use. If none is passed will use default organization ID from the config [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) diff --git a/cmd/scw/testdata/test-all-usage-registry-namespace-list-usage.golden b/cmd/scw/testdata/test-all-usage-registry-namespace-list-usage.golden index fa926db05f..5dcfc410fd 100644 --- a/cmd/scw/testdata/test-all-usage-registry-namespace-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-registry-namespace-list-usage.golden @@ -7,8 +7,9 @@ USAGE: ARGS: [order-by] Field by which to order the display of Images (created_at_asc | created_at_desc | description_asc | description_desc | name_asc | name_desc) + [project-id] Filter by Project ID [name] Filter by the namespace name (exact match) - [organization-id] Filter by the namespace owner + [organization-id] Filter by Organization ID [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) FLAGS: diff --git a/internal/namespaces/registry/v1/registry_cli.go b/internal/namespaces/registry/v1/registry_cli.go index e0cd4c643a..0029fd435e 100644 --- a/internal/namespaces/registry/v1/registry_cli.go +++ b/internal/namespaces/registry/v1/registry_cli.go @@ -103,6 +103,12 @@ func registryNamespaceList() *core.Command { Positional: false, EnumValues: []string{"created_at_asc", "created_at_desc", "description_asc", "description_desc", "name_asc", "name_desc"}, }, + { + Name: "project-id", + Short: `Filter by Project ID`, + Required: false, + Positional: false, + }, { Name: "name", Short: `Filter by the namespace name (exact match)`, @@ -111,7 +117,7 @@ func registryNamespaceList() *core.Command { }, { Name: "organization-id", - Short: `Filter by the namespace owner`, + Short: `Filter by Organization ID`, Required: false, Positional: false, }, @@ -154,6 +160,9 @@ func registryNamespaceList() *core.Command { { FieldName: "OrganizationID", }, + { + FieldName: "ProjectID", + }, { FieldName: "Status", }, @@ -222,6 +231,12 @@ func registryNamespaceCreate() *core.Command { Required: false, Positional: false, }, + { + Name: "project-id", + Short: `Assign the namespace to a project ID`, + Required: false, + Positional: false, + }, { Name: "is-public", Short: `Define the default visibility policy`, @@ -338,6 +353,12 @@ func registryImageList() *core.Command { Required: false, Positional: false, }, + { + Name: "project-id", + Short: `Filter by Project ID`, + Required: false, + Positional: false, + }, { Name: "organization-id", Short: `Filter by Organization ID`,