Skip to content

Commit e3b4901

Browse files
feat(apple_silicon): add public bandwidth configuration feature (#4776)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 10d8adc commit e3b4901

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

cmd/scw/testdata/test-all-usage-apple-silicon-server-create-usage.golden

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ USAGE:
66
scw apple-silicon server create [arg=value ...]
77

88
ARGS:
9-
[name=<generated>] Create a server with this given name
10-
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[type] Create a server of the given type
12-
[os-id] Create a server with the given os_id
13-
[enable-vpc] Activate the Private Network feature for this server
14-
[commitment-type] Activate commitment for this server (duration_24h | renewed_monthly | none)
15-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
9+
[name=<generated>] Create a server with this given name
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[type] Create a server of the given type
12+
[os-id] Create a server with the given os_id
13+
[enable-vpc] Activate the Private Network feature for this server
14+
[commitment-type] Activate commitment for this server (duration_24h | renewed_monthly | none)
15+
[public-bandwidth-bps] Public bandwidth to configure for this server. Expressed in bits per second.
16+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
1617

1718
FLAGS:
1819
-h, --help help for create

cmd/scw/testdata/test-all-usage-apple-silicon-server-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[schedule-deletion] Specify whether the server should be flagged for automatic deletion
1212
[enable-vpc] Activate or deactivate Private Network support for this server
1313
[commitment-type.commitment-type] (duration_24h | renewed_monthly | none)
14+
[public-bandwidth-bps] Public bandwidth configured for this server
1415
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
1516

1617
FLAGS:

docs/commands/apple-silicon.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ scw apple-silicon server create [arg=value ...]
196196
| os-id | | Create a server with the given os_id |
197197
| enable-vpc | | Activate the Private Network feature for this server |
198198
| commitment-type | One of: `duration_24h`, `renewed_monthly`, `none` | Activate commitment for this server |
199+
| public-bandwidth-bps | | Public bandwidth to configure for this server. Expressed in bits per second. |
199200
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
200201

201202

@@ -346,6 +347,7 @@ scw apple-silicon server update <server-id ...> [arg=value ...]
346347
| schedule-deletion | | Specify whether the server should be flagged for automatic deletion |
347348
| enable-vpc | | Activate or deactivate Private Network support for this server |
348349
| commitment-type.commitment-type | One of: `duration_24h`, `renewed_monthly`, `none` | |
350+
| public-bandwidth-bps | | Public bandwidth configured for this server |
349351
| zone | Default: `fr-par-1`<br />One of: `fr-par-3` | Zone to target. If none is passed will use default zone from the config |
350352

351353

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.33.0.20250602160040-3f95edfa9580
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250604142943-e3903592ae13
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.6

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.33.0.20250602160040-3f95edfa9580 h1:EUotMDGXojmeZ5UNu6Hq7QfnibVKHLGBrWiSobZ1OVY=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250602160040-3f95edfa9580/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250604142943-e3903592ae13 h1:6wWqAtNYuykJyCFQDR2FfvMIcGbwXNLlyT2HNu5qauM=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250604142943-e3903592ae13/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
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/applesilicon/v1alpha1/applesilicon_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ func appleSiliconServerCreate() *core.Command {
196196
"none",
197197
},
198198
},
199+
{
200+
Name: "public-bandwidth-bps",
201+
Short: `Public bandwidth to configure for this server. Expressed in bits per second.`,
202+
Required: false,
203+
Deprecated: false,
204+
Positional: false,
205+
},
199206
core.ZoneArgSpec(scw.ZoneFrPar3),
200207
},
201208
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -427,6 +434,13 @@ func appleSiliconServerUpdate() *core.Command {
427434
"none",
428435
},
429436
},
437+
{
438+
Name: "public-bandwidth-bps",
439+
Short: `Public bandwidth configured for this server`,
440+
Required: false,
441+
Deprecated: false,
442+
Positional: false,
443+
},
430444
core.ZoneArgSpec(scw.ZoneFrPar3),
431445
},
432446
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)