Skip to content

Commit

Permalink
feat: update generated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot committed Jul 12, 2023
1 parent 8bd6672 commit c8ebacb
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 29 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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230705084246-74eb7cf1a708
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230710160943-efc922e1f661
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230705084246-74eb7cf1a708 h1:2Et0Li+UBOluBBdBonMTB1rqwiW17UAcloghjGTOCDY=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230705084246-74eb7cf1a708/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230710160943-efc922e1f661 h1:/FNBbwxEzMriXGudqXTGOg0nIeNO+0xpqXChZk6auBE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.18.0.20230710160943-efc922e1f661/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Offers:
ID BILLING OPERATION PATH PRICE AVAILABLE QUOTA WARNINGS
e500237a-a9e9-11ec-b909-0242ac120002 /webhosting/backup/fr-par € 2.99 true []
f5c2ae8f-7625-4bca-b711-b44bb3d08694 /webhosting/lite/fr-par € 5.99 true []
d86c61a0-a9e9-11ec-b909-0242ac120002 /webhosting/personal/fr-par € 9.99 true []
de2426b4-a9e9-11ec-b909-0242ac120002 /webhosting/professional/fr-par € 18.99 true []
e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99 true []
ID BILLING OPERATION PATH PRICE AVAILABLE QUOTA WARNINGS END OF LIFE
e500237a-a9e9-11ec-b909-0242ac120002 /webhosting/backup/fr-par € 2.99 true [] false
f5c2ae8f-7625-4bca-b711-b44bb3d08694 /webhosting/lite/fr-par € 5.99 true [] false
d86c61a0-a9e9-11ec-b909-0242ac120002 /webhosting/personal/fr-par € 9.99 true [] false
de2426b4-a9e9-11ec-b909-0242ac120002 /webhosting/professional/fr-par € 18.99 true [] false
e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99 true [] false
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"offers": [
Expand All @@ -30,7 +30,8 @@ e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99
"nanos": 990000000
},
"available": true,
"quota_warnings": []
"quota_warnings": [],
"end_of_life": false
},
{
"id": "f5c2ae8f-7625-4bca-b711-b44bb3d08694",
Expand All @@ -52,7 +53,8 @@ e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99
"nanos": 990000000
},
"available": true,
"quota_warnings": []
"quota_warnings": [],
"end_of_life": false
},
{
"id": "d86c61a0-a9e9-11ec-b909-0242ac120002",
Expand All @@ -74,7 +76,8 @@ e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99
"nanos": 990000000
},
"available": true,
"quota_warnings": []
"quota_warnings": [],
"end_of_life": false
},
{
"id": "de2426b4-a9e9-11ec-b909-0242ac120002",
Expand All @@ -96,7 +99,8 @@ e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99
"nanos": 990000000
},
"available": true,
"quota_warnings": []
"quota_warnings": [],
"end_of_life": false
},
{
"id": "e1c1e6c6-a9e9-11ec-b909-0242ac120002",
Expand All @@ -118,7 +122,8 @@ e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99
"nanos": 990000000
},
"available": true,
"quota_warnings": []
"quota_warnings": [],
"end_of_life": false
}
]
}

0 comments on commit c8ebacb

Please sign in to comment.