Skip to content

Commit b51d357

Browse files
committed
feat: update generated APIs
1 parent ae44107 commit b51d357

File tree

39 files changed

+8100
-1053
lines changed

39 files changed

+8100
-1053
lines changed

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.20250408082303-4ecf08b8a1ef
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250408141409-fc62d133bcb2
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
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250408082303-4ecf08b8a1ef h1:e0aETjcCykw59oyfal17KonPnJjnIsYKt4y9GHrwYjM=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250408082303-4ecf08b8a1ef/go.mod h1:ILAZV9jmsf+YmJ8UGNpZ9rUnKtHs5EqnBFv47qqYcaU=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250408141409-fc62d133bcb2 h1:yKj3gxvkzh3I1TRhpa8mHCJluDsRDXdluqzumans2pw=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250408141409-fc62d133bcb2/go.mod h1:ILAZV9jmsf+YmJ8UGNpZ9rUnKtHs5EqnBFv47qqYcaU=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/account/v3/account_cli.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func GetGeneratedCommands() *core.Commands {
2828
accountProjectUpdate(),
2929
)
3030
}
31+
3132
func accountRoot() *core.Command {
3233
return &core.Command{
3334
Short: `This API allows you to manage your Scaleway Projects`,
@@ -77,6 +78,7 @@ func accountProjectCreate() *core.Command {
7778

7879
client := core.ExtractClient(ctx)
7980
api := account.NewProjectAPI(client)
81+
8082
return api.CreateProject(request)
8183
},
8284
}
@@ -105,7 +107,12 @@ func accountProjectList() *core.Command {
105107
Required: false,
106108
Deprecated: false,
107109
Positional: false,
108-
EnumValues: []string{"created_at_asc", "created_at_desc", "name_asc", "name_desc"},
110+
EnumValues: []string{
111+
"created_at_asc",
112+
"created_at_desc",
113+
"name_asc",
114+
"name_desc",
115+
},
109116
},
110117
{
111118
Name: "project-ids.{index}",
@@ -126,6 +133,7 @@ func accountProjectList() *core.Command {
126133
if err != nil {
127134
return nil, err
128135
}
136+
129137
return resp.Projects, nil
130138
},
131139
}
@@ -148,6 +156,7 @@ func accountProjectGet() *core.Command {
148156

149157
client := core.ExtractClient(ctx)
150158
api := account.NewProjectAPI(client)
159+
151160
return api.GetProject(request)
152161
},
153162
}
@@ -174,6 +183,7 @@ func accountProjectDelete() *core.Command {
174183
if e != nil {
175184
return nil, e
176185
}
186+
177187
return &core.SuccessResult{
178188
Resource: "project",
179189
Verb: "delete",
@@ -213,6 +223,7 @@ func accountProjectUpdate() *core.Command {
213223

214224
client := core.ExtractClient(ctx)
215225
api := account.NewProjectAPI(client)
226+
216227
return api.UpdateProject(request)
217228
},
218229
}

internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func GetGeneratedCommands() *core.Commands {
4141
appleSiliconPrivateNetworkDelete(),
4242
)
4343
}
44+
4445
func appleSiliconRoot() *core.Command {
4546
return &core.Command{
4647
Short: `Apple silicon API`,
@@ -107,6 +108,7 @@ func appleSiliconServerTypeList() *core.Command {
107108

108109
client := core.ExtractClient(ctx)
109110
api := applesilicon.NewAPI(client)
111+
110112
return api.ListServerTypes(request)
111113
},
112114
}
@@ -136,6 +138,7 @@ func appleSiliconServerTypeGet() *core.Command {
136138

137139
client := core.ExtractClient(ctx)
138140
api := applesilicon.NewAPI(client)
141+
139142
return api.GetServerType(request)
140143
},
141144
}
@@ -187,7 +190,11 @@ func appleSiliconServerCreate() *core.Command {
187190
Required: false,
188191
Deprecated: false,
189192
Positional: false,
190-
EnumValues: []string{"duration_24h", "renewed_monthly", "none"},
193+
EnumValues: []string{
194+
"duration_24h",
195+
"renewed_monthly",
196+
"none",
197+
},
191198
},
192199
core.ZoneArgSpec(scw.ZoneFrPar3),
193200
},
@@ -196,6 +203,7 @@ func appleSiliconServerCreate() *core.Command {
196203

197204
client := core.ExtractClient(ctx)
198205
api := applesilicon.NewAPI(client)
206+
199207
return api.CreateServer(request)
200208
},
201209
}
@@ -217,7 +225,10 @@ func appleSiliconServerList() *core.Command {
217225
Required: false,
218226
Deprecated: false,
219227
Positional: false,
220-
EnumValues: []string{"created_at_asc", "created_at_desc"},
228+
EnumValues: []string{
229+
"created_at_asc",
230+
"created_at_desc",
231+
},
221232
},
222233
{
223234
Name: "project-id",
@@ -233,7 +244,10 @@ func appleSiliconServerList() *core.Command {
233244
Deprecated: false,
234245
Positional: false,
235246
},
236-
core.ZoneArgSpec(scw.ZoneFrPar3, scw.Zone(core.AllLocalities)),
247+
core.ZoneArgSpec(
248+
scw.ZoneFrPar3,
249+
scw.Zone(core.AllLocalities),
250+
),
237251
},
238252
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
239253
request := args.(*applesilicon.ListServersRequest)
@@ -249,6 +263,7 @@ func appleSiliconServerList() *core.Command {
249263
if err != nil {
250264
return nil, err
251265
}
266+
252267
return resp.Servers, nil
253268
},
254269
}
@@ -278,7 +293,10 @@ func appleSiliconOsList() *core.Command {
278293
Deprecated: false,
279294
Positional: false,
280295
},
281-
core.ZoneArgSpec(scw.ZoneFrPar3, scw.Zone(core.AllLocalities)),
296+
core.ZoneArgSpec(
297+
scw.ZoneFrPar3,
298+
scw.Zone(core.AllLocalities),
299+
),
282300
},
283301
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
284302
request := args.(*applesilicon.ListOSRequest)
@@ -294,6 +312,7 @@ func appleSiliconOsList() *core.Command {
294312
if err != nil {
295313
return nil, err
296314
}
315+
297316
return resp.Os, nil
298317
},
299318
}
@@ -323,6 +342,7 @@ func appleSiliconOsGet() *core.Command {
323342

324343
client := core.ExtractClient(ctx)
325344
api := applesilicon.NewAPI(client)
345+
326346
return api.GetOS(request)
327347
},
328348
}
@@ -352,6 +372,7 @@ func appleSiliconServerGet() *core.Command {
352372

353373
client := core.ExtractClient(ctx)
354374
api := applesilicon.NewAPI(client)
375+
355376
return api.GetServer(request)
356377
},
357378
}
@@ -400,7 +421,11 @@ func appleSiliconServerUpdate() *core.Command {
400421
Required: false,
401422
Deprecated: false,
402423
Positional: false,
403-
EnumValues: []string{"duration_24h", "renewed_monthly", "none"},
424+
EnumValues: []string{
425+
"duration_24h",
426+
"renewed_monthly",
427+
"none",
428+
},
404429
},
405430
core.ZoneArgSpec(scw.ZoneFrPar3),
406431
},
@@ -409,6 +434,7 @@ func appleSiliconServerUpdate() *core.Command {
409434

410435
client := core.ExtractClient(ctx)
411436
api := applesilicon.NewAPI(client)
437+
412438
return api.UpdateServer(request)
413439
},
414440
}
@@ -442,6 +468,7 @@ func appleSiliconServerDelete() *core.Command {
442468
if e != nil {
443469
return nil, e
444470
}
471+
445472
return &core.SuccessResult{
446473
Resource: "server",
447474
Verb: "delete",
@@ -474,6 +501,7 @@ func appleSiliconServerReboot() *core.Command {
474501

475502
client := core.ExtractClient(ctx)
476503
api := applesilicon.NewAPI(client)
504+
477505
return api.RebootServer(request)
478506
},
479507
}
@@ -510,6 +538,7 @@ func appleSiliconServerReinstall() *core.Command {
510538

511539
client := core.ExtractClient(ctx)
512540
api := applesilicon.NewAPI(client)
541+
513542
return api.ReinstallServer(request)
514543
},
515544
}
@@ -546,13 +575,17 @@ func appleSiliconPrivateNetworkAdd() *core.Command {
546575
Deprecated: false,
547576
Positional: false,
548577
},
549-
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar3),
578+
core.ZoneArgSpec(
579+
scw.ZoneFrPar1,
580+
scw.ZoneFrPar3,
581+
),
550582
},
551583
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
552584
request := args.(*applesilicon.PrivateNetworkAPIAddServerPrivateNetworkRequest)
553585

554586
client := core.ExtractClient(ctx)
555587
api := applesilicon.NewPrivateNetworkAPI(client)
588+
556589
return api.AddServerPrivateNetwork(request)
557590
},
558591
}
@@ -582,13 +615,17 @@ func appleSiliconPrivateNetworkSet() *core.Command {
582615
Deprecated: false,
583616
Positional: false,
584617
},
585-
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar3),
618+
core.ZoneArgSpec(
619+
scw.ZoneFrPar1,
620+
scw.ZoneFrPar3,
621+
),
586622
},
587623
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
588624
request := args.(*applesilicon.PrivateNetworkAPISetServerPrivateNetworksRequest)
589625

590626
client := core.ExtractClient(ctx)
591627
api := applesilicon.NewPrivateNetworkAPI(client)
628+
592629
return api.SetServerPrivateNetworks(request)
593630
},
594631
}
@@ -610,7 +647,12 @@ func appleSiliconPrivateNetworkList() *core.Command {
610647
Required: false,
611648
Deprecated: false,
612649
Positional: false,
613-
EnumValues: []string{"created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc"},
650+
EnumValues: []string{
651+
"created_at_asc",
652+
"created_at_desc",
653+
"updated_at_asc",
654+
"updated_at_desc",
655+
},
614656
},
615657
{
616658
Name: "server-id",
@@ -647,7 +689,11 @@ func appleSiliconPrivateNetworkList() *core.Command {
647689
Deprecated: false,
648690
Positional: false,
649691
},
650-
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar3, scw.Zone(core.AllLocalities)),
692+
core.ZoneArgSpec(
693+
scw.ZoneFrPar1,
694+
scw.ZoneFrPar3,
695+
scw.Zone(core.AllLocalities),
696+
),
651697
},
652698
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
653699
request := args.(*applesilicon.PrivateNetworkAPIListServerPrivateNetworksRequest)
@@ -663,6 +709,7 @@ func appleSiliconPrivateNetworkList() *core.Command {
663709
if err != nil {
664710
return nil, err
665711
}
712+
666713
return resp.ServerPrivateNetworks, nil
667714
},
668715
}
@@ -692,7 +739,10 @@ func appleSiliconPrivateNetworkDelete() *core.Command {
692739
Deprecated: false,
693740
Positional: false,
694741
},
695-
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar3),
742+
core.ZoneArgSpec(
743+
scw.ZoneFrPar1,
744+
scw.ZoneFrPar3,
745+
),
696746
},
697747
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
698748
request := args.(*applesilicon.PrivateNetworkAPIDeleteServerPrivateNetworkRequest)
@@ -703,6 +753,7 @@ func appleSiliconPrivateNetworkDelete() *core.Command {
703753
if e != nil {
704754
return nil, e
705755
}
756+
706757
return &core.SuccessResult{
707758
Resource: "private-network",
708759
Verb: "delete",

0 commit comments

Comments
 (0)