Skip to content

Commit 5ac2209

Browse files
feat(account): deprecate account v2 (#3284)
Co-authored-by: jaime Bernabe <[email protected]>
1 parent eb167e4 commit 5ac2209

7 files changed

+30
-15
lines changed

cmd/scw/testdata/test-all-usage-account-project-create-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Deprecated in favor of Account API v3.
34
Generate a new Project for an Organization, specifying its configuration including name and description.
45

56
USAGE:

cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Deprecated in favor of Account API v3.
34
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.
45

56
USAGE:

cmd/scw/testdata/test-all-usage-account-project-get-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Deprecated in favor of Account API v3.
34
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.
45

56
USAGE:

cmd/scw/testdata/test-all-usage-account-project-list-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Deprecated in favor of Account API v3.
34
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.
45

56
USAGE:

cmd/scw/testdata/test-all-usage-account-project-update-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Deprecated in favor of Account API v3.
34
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
45

56
USAGE:

docs/commands/account.md

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Project management commands.
1717

1818
### Create a new Project for an Organization
1919

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

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

3940
### Delete an existing Project
4041

42+
Deprecated in favor of Account API v3.
4143
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.
4244

4345
**Usage:**
@@ -57,6 +59,7 @@ scw account project delete [arg=value ...]
5759

5860
### Get an existing Project
5961

62+
Deprecated in favor of Account API v3.
6063
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.
6164

6265
**Usage:**
@@ -76,6 +79,7 @@ scw account project get [arg=value ...]
7679

7780
### List all Projects of an Organization
7881

82+
Deprecated in favor of Account API v3.
7983
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.
8084

8185
**Usage:**
@@ -98,6 +102,7 @@ scw account project list [arg=value ...]
98102

99103
### Update Project
100104

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

103108
**Usage:**

internal/namespaces/account/v2/account_cli.go

+20-15
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ func accountProject() *core.Command {
4747

4848
func accountProjectCreate() *core.Command {
4949
return &core.Command{
50-
Short: `Create a new Project for an Organization`,
51-
Long: `Generate a new Project for an Organization, specifying its configuration including name and description.`,
50+
Short: `Create a new Project for an Organization`,
51+
Long: `Deprecated in favor of Account API v3.
52+
Generate a new Project for an Organization, specifying its configuration including name and description.`,
5253
Namespace: "account",
5354
Resource: "project",
5455
Verb: "create",
55-
// Deprecated: false,
56+
// Deprecated: true,
5657
ArgsType: reflect.TypeOf(account.CreateProjectRequest{}),
5758
ArgSpecs: core.ArgSpecs{
5859
{
@@ -85,12 +86,13 @@ func accountProjectCreate() *core.Command {
8586

8687
func accountProjectList() *core.Command {
8788
return &core.Command{
88-
Short: `List all Projects of an Organization`,
89-
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.`,
89+
Short: `List all Projects of an Organization`,
90+
Long: `Deprecated in favor of Account API v3.
91+
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.`,
9092
Namespace: "account",
9193
Resource: "project",
9294
Verb: "list",
93-
// Deprecated: false,
95+
// Deprecated: true,
9496
ArgsType: reflect.TypeOf(account.ListProjectsRequest{}),
9597
ArgSpecs: core.ArgSpecs{
9698
{
@@ -135,12 +137,13 @@ func accountProjectList() *core.Command {
135137

136138
func accountProjectGet() *core.Command {
137139
return &core.Command{
138-
Short: `Get an existing Project`,
139-
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.`,
140+
Short: `Get an existing Project`,
141+
Long: `Deprecated in favor of Account API v3.
142+
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.`,
140143
Namespace: "account",
141144
Resource: "project",
142145
Verb: "get",
143-
// Deprecated: false,
146+
// Deprecated: true,
144147
ArgsType: reflect.TypeOf(account.GetProjectRequest{}),
145148
ArgSpecs: core.ArgSpecs{
146149
core.ProjectIDArgSpec(),
@@ -158,12 +161,13 @@ func accountProjectGet() *core.Command {
158161

159162
func accountProjectDelete() *core.Command {
160163
return &core.Command{
161-
Short: `Delete an existing Project`,
162-
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.`,
164+
Short: `Delete an existing Project`,
165+
Long: `Deprecated in favor of Account API v3.
166+
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.`,
163167
Namespace: "account",
164168
Resource: "project",
165169
Verb: "delete",
166-
// Deprecated: false,
170+
// Deprecated: true,
167171
ArgsType: reflect.TypeOf(account.DeleteProjectRequest{}),
168172
ArgSpecs: core.ArgSpecs{
169173
core.ProjectIDArgSpec(),
@@ -187,12 +191,13 @@ func accountProjectDelete() *core.Command {
187191

188192
func accountProjectUpdate() *core.Command {
189193
return &core.Command{
190-
Short: `Update Project`,
191-
Long: `Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.`,
194+
Short: `Update Project`,
195+
Long: `Deprecated in favor of Account API v3.
196+
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.`,
192197
Namespace: "account",
193198
Resource: "project",
194199
Verb: "update",
195-
// Deprecated: false,
200+
// Deprecated: true,
196201
ArgsType: reflect.TypeOf(account.UpdateProjectRequest{}),
197202
ArgSpecs: core.ArgSpecs{
198203
core.ProjectIDArgSpec(),

0 commit comments

Comments
 (0)