Skip to content

Commit 1899440

Browse files
scaleway-botyfodil
andauthored
feat(webhosting): add control panels field in public list hostings request (#3520)
Co-authored-by: Yacine Fodil <[email protected]>
1 parent 89a3c86 commit 1899440

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

cmd/scw/testdata/test-all-usage-webhosting-offer-list-usage.golden

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ EXAMPLES:
1616
scw webhosting offer list only-options=true
1717

1818
ARGS:
19-
[order-by] Sort order of offers in the response (price_asc)
20-
[without-options] Defines whether the response should consist of offers only, without options
21-
[only-options] Defines whether the response should consist of options only, without offers
22-
[hosting-id] ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan)
23-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
19+
[order-by] Sort order of offers in the response (price_asc)
20+
[without-options] Defines whether the response should consist of offers only, without options
21+
[only-options] Defines whether the response should consist of options only, without offers
22+
[hosting-id] ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan)
23+
[control-panels.{index}] Name of the control panel to filter for
24+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
2425

2526
FLAGS:
2627
-h, --help help for list

docs/commands/webhosting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ scw webhosting offer list [arg=value ...]
283283
| without-options | | Defines whether the response should consist of offers only, without options |
284284
| only-options | | Defines whether the response should consist of options only, without offers |
285285
| hosting-id | | ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan) |
286+
| control-panels.{index} | | Name of the control panel to filter for |
286287
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config |
287288

288289

internal/namespaces/webhosting/v1alpha1/webhosting_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,13 @@ func webhostingOfferList() *core.Command {
471471
Deprecated: false,
472472
Positional: false,
473473
},
474+
{
475+
Name: "control-panels.{index}",
476+
Short: `Name of the control panel to filter for`,
477+
Required: false,
478+
Deprecated: false,
479+
Positional: false,
480+
},
474481
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
475482
},
476483
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)