Skip to content
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
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-config-set-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARGS:
[default-organization-id] A default Scaleway organization id
[default-project-id] A default Scaleway project id
[default-region] A default Scaleway region (fr-par | nl-ams | pl-waw)
[default-zone] A default Scaleway zone (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
[default-zone] A default Scaleway zone (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
[send-telemetry] Set to false to disable telemetry

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARGS:
[order-by] Define the order of the returned hostings (price_asc)
[without-options] Select only offers, no options
[only-options] Select only options
[hosting-id] Define a specific hosting id (optional)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ scw config set [arg=value ...]
| default-organization-id | | A default Scaleway organization id |
| default-project-id | | A default Scaleway project id |
| default-region | One of: `fr-par`, `nl-ams`, `pl-waw` | A default Scaleway region |
| default-zone | One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | A default Scaleway zone |
| default-zone | One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | A default Scaleway zone |
| send-telemetry | | Set to false to disable telemetry |


Expand Down
1 change: 1 addition & 0 deletions docs/commands/webhosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ scw webhosting offer list [arg=value ...]
| order-by | One of: `price_asc` | Define the order of the returned hostings |
| without-options | | Select only offers, no options |
| only-options | | Select only options |
| hosting-id | | Define a specific hosting id (optional) |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.17
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13.0.20230306133533-4d68c6d85168
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13.0.20230306133533-4d68c6d85168 h1:bUf4bR8Ye8gjF6i7ZyPLmmIQ9C4U2G/5PopVCY0LYUo=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13.0.20230306133533-4d68c6d85168/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
Expand Down
9 changes: 8 additions & 1 deletion internal/namespaces/webhosting/v1alpha1/webhosting_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,13 @@ func webhostingOfferList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "hosting-id",
Short: `Define a specific hosting id (optional)`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand All @@ -399,7 +406,7 @@ func webhostingOfferList() *core.Command {
Examples: []*core.Example{
{
Short: "List all offers available for purchase",
ArgsJSON: `{"only_options":false,"without_options":false}`,
ArgsJSON: `{"hosting_id":"a3244331-5d32-4e36-9bf9-b60233e201c7","only_options":false,"without_options":false}`,
},
{
Short: "List only offers, no options",
Expand Down