Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(account): deprecate account v2 #3284

Merged
merged 2 commits into from
Jul 13, 2023
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,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