diff --git a/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden index c2dd2ce21d..4966a4316d 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden index 60ba230c6d..1b822f6b17 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden index e32a50be2a..38b6e16316 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden index caeb4ed68d..fcee274b56 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden index c3a6acdd0a..3dbdcdaf58 100644 --- a/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden @@ -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: diff --git a/docs/commands/account.md b/docs/commands/account.md index a2e6afbf87..a67c5fd00b 100644 --- a/docs/commands/account.md +++ b/docs/commands/account.md @@ -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:** @@ -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:** @@ -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:** @@ -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:** @@ -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:** diff --git a/go.mod b/go.mod index e163f9aa88..4cb3d80a4d 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 416662e463..771eef30ec 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/internal/namespaces/account/v2/account_cli.go b/internal/namespaces/account/v2/account_cli.go index 745cc799e8..cbf965280c 100644 --- a/internal/namespaces/account/v2/account_cli.go +++ b/internal/namespaces/account/v2/account_cli.go @@ -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{ { @@ -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{ { @@ -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(), @@ -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(), @@ -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(), diff --git a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden b/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden index b7bfce9c67..1254a1d788 100644 --- a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden +++ b/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden @@ -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": [ @@ -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", @@ -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", @@ -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", @@ -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", @@ -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 } ] }