diff --git a/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden index d000ed69d2..33ca4fd3c9 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Create project. +Generate a new Project for an Organization, specifying its configuration including name and description. USAGE: scw account project create [arg=value ...] ARGS: - [name] The name of the project - [description] The description of the project + [name] Name of the Project + [description] Description of the Project [organization-id] Organization ID to use. If none is passed the default organization ID will be used FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden index 13bffbff9e..60ba230c6d 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete project. +Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone. USAGE: scw account project delete [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden index c63e207218..e32a50be2a 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Get project. +Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object. USAGE: scw account project get [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden index 0dd6617b70..caeb4ed68d 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden @@ -1,14 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -List projects. +List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. USAGE: scw account project list [arg=value ...] ARGS: - [name] The name of the project - [order-by] The sort order of the returned projects (created_at_asc | created_at_desc | name_asc | name_desc) - [project-ids.{index}] Filter out by a list of project ID + [name] Name of the Project + [order-by] Sort order of the returned Projects (created_at_asc | created_at_desc | name_asc | name_desc) + [project-ids.{index}] Project IDs to filter for. The results will be limited to any Projects with an ID in this array [organization-id] Organization ID to use. If none is passed the default organization ID will be used FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden index 1c279bac6e..c3a6acdd0a 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden @@ -1,14 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Update project. +Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description. USAGE: scw account project update [arg=value ...] ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used - [name] The name of the project - [description] The description of the project + [name] Name of the Project + [description] Description of the Project FLAGS: -h, --help help for update diff --git a/cmd/scw/testdata/test-all-usage-account-project-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-usage.golden index 2f0d6a2a41..fb5cde849a 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-usage.golden @@ -6,11 +6,11 @@ USAGE: scw account project AVAILABLE COMMANDS: - create Create project - delete Delete project - get Get project - list List projects - update Update project + create Create a new Project for an Organization + delete Delete an existing Project + get Get an existing Project + list List all Projects of an Organization + update Update Project FLAGS: -h, --help help for project diff --git a/docs/commands/account.md b/docs/commands/account.md index 1ceae6b494..df0095feab 100644 --- a/docs/commands/account.md +++ b/docs/commands/account.md @@ -3,11 +3,11 @@ This API allows you to manage projects. - [Project management commands](#project-management-commands) - - [Create project](#create-project) - - [Delete project](#delete-project) - - [Get project](#get-project) - - [List projects](#list-projects) - - [Update project](#update-project) + - [Create a new Project for an Organization](#create-a-new-project-for-an-organization) + - [Delete an existing Project](#delete-an-existing-project) + - [Get an existing Project](#get-an-existing-project) + - [List all Projects of an Organization](#list-all-projects-of-an-organization) + - [Update Project](#update-project) ## Project management commands @@ -15,9 +15,9 @@ This API allows you to manage projects. Project management commands. -### Create project +### Create a new Project for an Organization -Create project. +Generate a new Project for an Organization, specifying its configuration including name and description. **Usage:** @@ -30,15 +30,15 @@ scw account project create [arg=value ...] | Name | | Description | |------|---|-------------| -| name | | The name of the project | -| description | | The description of the project | +| name | | Name of the Project | +| description | | Description of the Project | | organization-id | | Organization ID to use. If none is passed the default organization ID will be used | -### Delete project +### Delete an existing Project -Delete project. +Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone. **Usage:** @@ -55,9 +55,9 @@ scw account project delete [arg=value ...] -### Get project +### Get an existing Project -Get project. +Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object. **Usage:** @@ -74,9 +74,9 @@ scw account project get [arg=value ...] -### List projects +### List all Projects of an Organization -List projects. +List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. **Usage:** @@ -89,16 +89,16 @@ scw account project list [arg=value ...] | Name | | Description | |------|---|-------------| -| name | | The name of the project | -| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | The sort order of the returned projects | -| project-ids.{index} | | Filter out by a list of project ID | +| name | | Name of the Project | +| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of the returned Projects | +| project-ids.{index} | | Project IDs to filter for. The results will be limited to any Projects with an ID in this array | | organization-id | | Organization ID to use. If none is passed the default organization ID will be used | -### Update project +### Update Project -Update project. +Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description. **Usage:** @@ -112,8 +112,8 @@ scw account project update [arg=value ...] | Name | | Description | |------|---|-------------| | project-id | | Project ID to use. If none is passed the default project ID will be used | -| name | | The name of the project | -| description | | The description of the project | +| name | | Name of the Project | +| description | | Description of the Project | diff --git a/go.mod b/go.mod index 464996fe37..2d77f4760a 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98 github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-isatty v0.0.17 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 diff --git a/go.sum b/go.sum index 76be72212c..d6cfc3cd51 100644 --- a/go.sum +++ b/go.sum @@ -72,8 +72,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6 h1:bAqxZt/1FAD/M4XLqWYHySz5kNcoQ7Mrdo7imgWAyaQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41 h1:D9rWQCzAaXoBOEQTnw+x5YI1JLZRj/ccKtT4u5DCC1E= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= diff --git a/internal/namespaces/account/v2/account_cli.go b/internal/namespaces/account/v2/account_cli.go index c500e5214f..fec287adeb 100644 --- a/internal/namespaces/account/v2/account_cli.go +++ b/internal/namespaces/account/v2/account_cli.go @@ -47,8 +47,8 @@ func accountProject() *core.Command { func accountProjectCreate() *core.Command { return &core.Command{ - Short: `Create project`, - Long: `Create project.`, + Short: `Create a new Project for an Organization`, + Long: `Generate a new Project for an Organization, specifying its configuration including name and description.`, Namespace: "account", Resource: "project", Verb: "create", @@ -57,14 +57,14 @@ func accountProjectCreate() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "name", - Short: `The name of the project`, + Short: `Name of the Project`, Required: false, Deprecated: false, Positional: false, }, { Name: "description", - Short: `The description of the project`, + Short: `Description of the Project`, Required: false, Deprecated: false, Positional: false, @@ -84,8 +84,8 @@ func accountProjectCreate() *core.Command { func accountProjectList() *core.Command { return &core.Command{ - Short: `List projects`, - Long: `List projects.`, + Short: `List all Projects of an Organization`, + Long: `List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.`, Namespace: "account", Resource: "project", Verb: "list", @@ -94,14 +94,14 @@ func accountProjectList() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "name", - Short: `The name of the project`, + Short: `Name of the Project`, Required: false, Deprecated: false, Positional: false, }, { Name: "order-by", - Short: `The sort order of the returned projects`, + Short: `Sort order of the returned Projects`, Required: false, Deprecated: false, Positional: false, @@ -109,7 +109,7 @@ func accountProjectList() *core.Command { }, { Name: "project-ids.{index}", - Short: `Filter out by a list of project ID`, + Short: `Project IDs to filter for. The results will be limited to any Projects with an ID in this array`, Required: false, Deprecated: false, Positional: false, @@ -134,8 +134,8 @@ func accountProjectList() *core.Command { func accountProjectGet() *core.Command { return &core.Command{ - Short: `Get project`, - Long: `Get project.`, + Short: `Get an existing Project`, + Long: `Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.`, Namespace: "account", Resource: "project", Verb: "get", @@ -157,8 +157,8 @@ func accountProjectGet() *core.Command { func accountProjectDelete() *core.Command { return &core.Command{ - Short: `Delete project`, - Long: `Delete project.`, + Short: `Delete an existing Project`, + Long: `Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.`, Namespace: "account", Resource: "project", Verb: "delete", @@ -186,8 +186,8 @@ func accountProjectDelete() *core.Command { func accountProjectUpdate() *core.Command { return &core.Command{ - Short: `Update project`, - Long: `Update project.`, + Short: `Update Project`, + Long: `Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.`, Namespace: "account", Resource: "project", Verb: "update", @@ -197,14 +197,14 @@ func accountProjectUpdate() *core.Command { core.ProjectIDArgSpec(), { Name: "name", - Short: `The name of the project`, + Short: `Name of the Project`, Required: false, Deprecated: false, Positional: false, }, { Name: "description", - Short: `The description of the project`, + Short: `Description of the Project`, Required: false, Deprecated: false, Positional: false,