Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -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 ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions cmd/scw/testdata/test-all-usage-account-project-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ USAGE:
scw account project <command>

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
Expand Down
44 changes: 22 additions & 22 deletions docs/commands/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
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

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:**

Expand All @@ -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:**

Expand All @@ -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:**

Expand All @@ -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:**

Expand All @@ -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:**

Expand All @@ -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 |



2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
34 changes: 17 additions & 17 deletions internal/namespaces/account/v2/account_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -94,22 +94,22 @@ 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,
EnumValues: []string{"created_at_asc", "created_at_desc", "name_asc", "name_desc"},
},
{
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,
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand Down