Skip to content

Commit

Permalink
feat(account): deprecate account v2 (#3284)
Browse files Browse the repository at this point in the history
Co-authored-by: jaime Bernabe <6184069+Monitob@users.noreply.github.com>
  • Loading branch information
scaleway-bot and Monitob authored Jul 13, 2023
1 parent eb167e4 commit 5ac2209
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deprecated in favor of Account API v3.
Generate a new Project for an Organization, specifying its configuration including name and description.

USAGE:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deprecated in favor of Account API v3.
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 Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deprecated in favor of Account API v3.
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 Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deprecated in favor of Account API v3.
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 Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deprecated in favor of Account API v3.
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.

USAGE:
Expand Down
5 changes: 5 additions & 0 deletions docs/commands/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Project management commands.

### Create a new Project for an Organization

Deprecated in favor of Account API v3.
Generate a new Project for an Organization, specifying its configuration including name and description.

**Usage:**
Expand All @@ -38,6 +39,7 @@ scw account project create [arg=value ...]

### Delete an existing Project

Deprecated in favor of Account API v3.
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 @@ -57,6 +59,7 @@ scw account project delete [arg=value ...]

### Get an existing Project

Deprecated in favor of Account API v3.
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 @@ -76,6 +79,7 @@ scw account project get [arg=value ...]

### List all Projects of an Organization

Deprecated in favor of Account API v3.
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 @@ -98,6 +102,7 @@ scw account project list [arg=value ...]

### Update Project

Deprecated in favor of Account API v3.
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.

**Usage:**
Expand Down
35 changes: 20 additions & 15 deletions internal/namespaces/account/v2/account_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ func accountProject() *core.Command {

func accountProjectCreate() *core.Command {
return &core.Command{
Short: `Create a new Project for an Organization`,
Long: `Generate a new Project for an Organization, specifying its configuration including name and description.`,
Short: `Create a new Project for an Organization`,
Long: `Deprecated in favor of Account API v3.
Generate a new Project for an Organization, specifying its configuration including name and description.`,
Namespace: "account",
Resource: "project",
Verb: "create",
// Deprecated: false,
// Deprecated: true,
ArgsType: reflect.TypeOf(account.CreateProjectRequest{}),
ArgSpecs: core.ArgSpecs{
{
Expand Down Expand Up @@ -85,12 +86,13 @@ func accountProjectCreate() *core.Command {

func accountProjectList() *core.Command {
return &core.Command{
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.`,
Short: `List all Projects of an Organization`,
Long: `Deprecated in favor of Account API v3.
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",
// Deprecated: false,
// Deprecated: true,
ArgsType: reflect.TypeOf(account.ListProjectsRequest{}),
ArgSpecs: core.ArgSpecs{
{
Expand Down Expand Up @@ -135,12 +137,13 @@ func accountProjectList() *core.Command {

func accountProjectGet() *core.Command {
return &core.Command{
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.`,
Short: `Get an existing Project`,
Long: `Deprecated in favor of Account API v3.
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",
// Deprecated: false,
// Deprecated: true,
ArgsType: reflect.TypeOf(account.GetProjectRequest{}),
ArgSpecs: core.ArgSpecs{
core.ProjectIDArgSpec(),
Expand All @@ -158,12 +161,13 @@ func accountProjectGet() *core.Command {

func accountProjectDelete() *core.Command {
return &core.Command{
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.`,
Short: `Delete an existing Project`,
Long: `Deprecated in favor of Account API v3.
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",
// Deprecated: false,
// Deprecated: true,
ArgsType: reflect.TypeOf(account.DeleteProjectRequest{}),
ArgSpecs: core.ArgSpecs{
core.ProjectIDArgSpec(),
Expand All @@ -187,12 +191,13 @@ func accountProjectDelete() *core.Command {

func accountProjectUpdate() *core.Command {
return &core.Command{
Short: `Update Project`,
Long: `Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.`,
Short: `Update Project`,
Long: `Deprecated in favor of Account API v3.
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",
// Deprecated: false,
// Deprecated: true,
ArgsType: reflect.TypeOf(account.UpdateProjectRequest{}),
ArgSpecs: core.ArgSpecs{
core.ProjectIDArgSpec(),
Expand Down

0 comments on commit 5ac2209

Please sign in to comment.