Skip to content

Commit fb7a771

Browse files
feat(applesilicon): add support for enable_vpc (scaleway#4367)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 776bd3c commit fb7a771

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
1111
[type] Create a server of the given type
1212
[os-id] Create a server with the given os_id
13+
[enable-vpc] Activate the Private Network feature for this server
1314
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
1415

1516
FLAGS:

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
@@ -9,6 +9,7 @@ ARGS:
99
server-id UUID of the server you want to update
1010
name Updated name for your server
1111
[schedule-deletion] Specify whether the server should be flagged for automatic deletion
12+
[enable-vpc] Activate or deactivate Private Network support for this server
1213
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-3)
1314

1415
FLAGS:

docs/commands/apple-silicon.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ scw apple-silicon server create [arg=value ...]
9090
| project-id | | Project ID to use. If none is passed the default project ID will be used |
9191
| type | | Create a server of the given type |
9292
| os-id | | Create a server with the given os_id |
93+
| enable-vpc | | Activate the Private Network feature for this server |
9394
| 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 |
9495

9596

@@ -238,6 +239,7 @@ scw apple-silicon server update <name ...> [arg=value ...]
238239
| server-id | Required | UUID of the server you want to update |
239240
| name | Required | Updated name for your server |
240241
| schedule-deletion | | Specify whether the server should be flagged for automatic deletion |
242+
| enable-vpc | | Activate or deactivate Private Network support for this server |
241243
| 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 |
242244

243245

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241212151423-0d220e058bfc
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241216132321-cd1f7447cd08
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

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.30.0.20241212151423-0d220e058bfc h1:TxTKg5QuwgdKZ3+i1xPgihahVMGoO4zlqkC6zh9aHp4=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241212151423-0d220e058bfc/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241216132321-cd1f7447cd08 h1:sOu+esOSHCtJToLHfByVz9yaE7osfdp573HrHl4YUmM=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241216132321-cd1f7447cd08/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
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
@@ -157,6 +157,13 @@ func appleSiliconServerCreate() *core.Command {
157157
Deprecated: false,
158158
Positional: false,
159159
},
160+
{
161+
Name: "enable-vpc",
162+
Short: `Activate the Private Network feature for this server`,
163+
Required: false,
164+
Deprecated: false,
165+
Positional: false,
166+
},
160167
core.ZoneArgSpec(scw.ZoneFrPar3),
161168
},
162169
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -361,6 +368,13 @@ func appleSiliconServerUpdate() *core.Command {
361368
Deprecated: false,
362369
Positional: false,
363370
},
371+
{
372+
Name: "enable-vpc",
373+
Short: `Activate or deactivate Private Network support for this server`,
374+
Required: false,
375+
Deprecated: false,
376+
Positional: false,
377+
},
364378
core.ZoneArgSpec(scw.ZoneFrPar3),
365379
},
366380
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)