Skip to content

Commit 54b599f

Browse files
authored
feat(webhosting): add hosting updating status and free subdomain support (#4935)
1 parent cf0b40e commit 54b599f

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[email] Contact email for the Web Hosting client
1212
[tags.{index}] List of tags for the Web Hosting plan
1313
[domain] Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand
14+
[subdomain] The name prefix to use as a free subdomain (for example, `mysite`) assigned to the Web Hosting plan. The full domain will be automatically created by adding it to the fixed base domain (e.g. `mysite.scw.site`). You do not need to include the base domain yourself.
1415
[offer-options.{index}.id] Offer option ID
1516
[offer-options.{index}.quantity] The option requested quantity to set for the Web Hosting plan
1617
[language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ EXAMPLES:
1212
ARGS:
1313
[order-by] Sort order for Web Hosting plans in the response (created_at_asc | created_at_desc)
1414
[tags.{index}] Tags to filter for, only Web Hosting plans with matching tags will be returned
15-
[statuses.{index}] Statuses to filter for, only Web Hosting plans with matching statuses will be returned (unknown_status | delivering | ready | deleting | error | locked | migrating)
15+
[statuses.{index}] Statuses to filter for, only Web Hosting plans with matching statuses will be returned (unknown_status | delivering | ready | deleting | error | locked | migrating | updating)
1616
[domain] Domain to filter for, only Web Hosting plans associated with this domain will be returned
1717
[project-id] Project ID to filter for, only Web Hosting plans from this Project will be returned
1818
[control-panels.{index}] Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned
19+
[subdomain] Optional free subdomain linked to the Web Hosting plan
1920
[organization-id] Organization ID to filter for, only Web Hosting plans from this Organization will be returned
2021
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
2122

docs/commands/webhosting.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ scw webhosting hosting create [arg=value ...]
504504
| email | | Contact email for the Web Hosting client |
505505
| tags.{index} | | List of tags for the Web Hosting plan |
506506
| domain | | Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand |
507+
| subdomain | | The name prefix to use as a free subdomain (for example, `mysite`) assigned to the Web Hosting plan. The full domain will be automatically created by adding it to the fixed base domain (e.g. `mysite.scw.site`). You do not need to include the base domain yourself. |
507508
| offer-options.{index}.id | | Offer option ID |
508509
| offer-options.{index}.quantity | | The option requested quantity to set for the Web Hosting plan |
509510
| language | One of: `unknown_language_code`, `en_US`, `fr_FR`, `de_DE` | Default language for the control panel interface |
@@ -618,10 +619,11 @@ scw webhosting hosting list [arg=value ...]
618619
|------|---|-------------|
619620
| order-by | One of: `created_at_asc`, `created_at_desc` | Sort order for Web Hosting plans in the response |
620621
| tags.{index} | | Tags to filter for, only Web Hosting plans with matching tags will be returned |
621-
| statuses.{index} | One of: `unknown_status`, `delivering`, `ready`, `deleting`, `error`, `locked`, `migrating` | Statuses to filter for, only Web Hosting plans with matching statuses will be returned |
622+
| statuses.{index} | One of: `unknown_status`, `delivering`, `ready`, `deleting`, `error`, `locked`, `migrating`, `updating` | Statuses to filter for, only Web Hosting plans with matching statuses will be returned |
622623
| domain | | Domain to filter for, only Web Hosting plans associated with this domain will be returned |
623624
| project-id | | Project ID to filter for, only Web Hosting plans from this Project will be returned |
624625
| control-panels.{index} | | Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned |
626+
| subdomain | | Optional free subdomain linked to the Web Hosting plan |
625627
| organization-id | | Organization ID to filter for, only Web Hosting plans from this Organization will be returned |
626628
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
627629

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250729162034-8db00eaf9654
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250804081430-2c6fa2495d96
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250729162034-8db00eaf9654 h1:G5/4vYAsx2lv3FKJFho58m9aE3wgBrbyn7Z/Fds4opU=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250729162034-8db00eaf9654/go.mod h1:fw6BmcfYRs2BEHYW0c3/rR0JgZHvdx6uMYqpeUJx3Bc=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250804081430-2c6fa2495d96 h1:zEsk3ZJxbQ0eZptCv+flRAMmzO52fVTEj5C6aRfpojE=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250804081430-2c6fa2495d96/go.mod h1:fw6BmcfYRs2BEHYW0c3/rR0JgZHvdx6uMYqpeUJx3Bc=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/webhosting/v1/webhosting_cli.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,13 @@ func webhostingHostingCreate() *core.Command {
10171017
Deprecated: false,
10181018
Positional: false,
10191019
},
1020+
{
1021+
Name: "subdomain",
1022+
Short: `The name prefix to use as a free subdomain (for example, ` + "`" + `mysite` + "`" + `) assigned to the Web Hosting plan. The full domain will be automatically created by adding it to the fixed base domain (e.g. ` + "`" + `mysite.scw.site` + "`" + `). You do not need to include the base domain yourself.`,
1023+
Required: false,
1024+
Deprecated: false,
1025+
Positional: false,
1026+
},
10201027
{
10211028
Name: "offer-options.{index}.id",
10221029
Short: `Offer option ID`,
@@ -1169,6 +1176,7 @@ func webhostingHostingList() *core.Command {
11691176
"error",
11701177
"locked",
11711178
"migrating",
1179+
"updating",
11721180
},
11731181
},
11741182
{
@@ -1192,6 +1200,13 @@ func webhostingHostingList() *core.Command {
11921200
Deprecated: false,
11931201
Positional: false,
11941202
},
1203+
{
1204+
Name: "subdomain",
1205+
Short: `Optional free subdomain linked to the Web Hosting plan`,
1206+
Required: false,
1207+
Deprecated: false,
1208+
Positional: false,
1209+
},
11951210
{
11961211
Name: "organization-id",
11971212
Short: `Organization ID to filter for, only Web Hosting plans from this Organization will be returned`,

0 commit comments

Comments
 (0)