Skip to content

Commit

Permalink
feat(registry): add support for project
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored and remyleone committed Aug 24, 2020
1 parent cf96cc5 commit 54472f4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 22 additions & 1 deletion internal/namespaces/registry/v1/registry_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)`,
Expand All @@ -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,
},
Expand Down Expand Up @@ -154,6 +160,9 @@ func registryNamespaceList() *core.Command {
{
FieldName: "OrganizationID",
},
{
FieldName: "ProjectID",
},
{
FieldName: "Status",
},
Expand Down Expand Up @@ -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`,
Expand Down Expand Up @@ -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`,
Expand Down

0 comments on commit 54472f4

Please sign in to comment.