From 4a6e3fb2dae78fd8b1a48bf80775877afb68de2a Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 7 Jul 2021 11:19:46 +0000 Subject: [PATCH 1/4] feat: update generated cli --- .../namespaces/baremetal/v1/baremetal_cli.go | 28 +- .../baremetal/v2beta1/baremetal_cli.go | 811 ++++++++++++++++++ internal/namespaces/lb/v1/lb_cli.go | 18 +- 3 files changed, 841 insertions(+), 16 deletions(-) create mode 100644 internal/namespaces/baremetal/v2beta1/baremetal_cli.go diff --git a/internal/namespaces/baremetal/v1/baremetal_cli.go b/internal/namespaces/baremetal/v1/baremetal_cli.go index bb9451b4b5..76678878b4 100644 --- a/internal/namespaces/baremetal/v1/baremetal_cli.go +++ b/internal/namespaces/baremetal/v1/baremetal_cli.go @@ -129,7 +129,7 @@ func baremetalServerList() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.ListServersRequest) @@ -169,7 +169,7 @@ func baremetalServerGet() *core.Command { Deprecated: false, Positional: true, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.GetServerRequest) @@ -246,7 +246,7 @@ func baremetalServerCreate() *core.Command { Positional: false, }, core.OrganizationIDArgSpec(), - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.CreateServerRequest) @@ -303,7 +303,7 @@ func baremetalServerUpdate() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.UpdateServerRequest) @@ -354,7 +354,7 @@ func baremetalServerInstall() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.InstallServerRequest) @@ -404,7 +404,7 @@ func baremetalServerDelete() *core.Command { Deprecated: false, Positional: true, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.DeleteServerRequest) @@ -448,7 +448,7 @@ func baremetalServerReboot() *core.Command { Positional: false, EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.RebootServerRequest) @@ -496,7 +496,7 @@ func baremetalServerStart() *core.Command { Positional: false, EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.StartServerRequest) @@ -536,7 +536,7 @@ func baremetalServerStop() *core.Command { Deprecated: false, Positional: true, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.StopServerRequest) @@ -581,7 +581,7 @@ The BMC (Baseboard Management Controller) access is available one hour after the Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.StartBMCAccessRequest) @@ -611,7 +611,7 @@ func baremetalBmcGet() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.GetBMCAccessRequest) @@ -641,7 +641,7 @@ func baremetalBmcStop() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.StopBMCAccessRequest) @@ -677,7 +677,7 @@ func baremetalOsList() *core.Command { Deprecated: false, Positional: false, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.ListOSRequest) @@ -711,7 +711,7 @@ func baremetalOsGet() *core.Command { Deprecated: false, Positional: true, }, - core.ZoneArgSpec(scw.ZoneFrPar2), + core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*baremetal.GetOSRequest) diff --git a/internal/namespaces/baremetal/v2beta1/baremetal_cli.go b/internal/namespaces/baremetal/v2beta1/baremetal_cli.go new file mode 100644 index 0000000000..a969078dc4 --- /dev/null +++ b/internal/namespaces/baremetal/v2beta1/baremetal_cli.go @@ -0,0 +1,811 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +package baremetal + +import ( + "context" + "reflect" + + "github.com/scaleway/scaleway-cli/internal/core" + "github.com/scaleway/scaleway-sdk-go/api/baremetal/v2beta1" + "github.com/scaleway/scaleway-sdk-go/scw" +) + +// always import dependencies +var ( + _ = scw.RegionFrPar +) + +func GetGeneratedCommands() *core.Commands { + return core.NewCommands( + baremetalRoot(), + baremetalServer(), + baremetalImage(), + baremetalBmc(), + baremetalPartitioning(), + baremetalServerList(), + baremetalServerGet(), + baremetalServerCreate(), + baremetalServerUpdate(), + baremetalServerInstall(), + baremetalServerDelete(), + baremetalServerReboot(), + baremetalServerStart(), + baremetalServerStop(), + baremetalBmcStart(), + baremetalBmcGet(), + baremetalBmcStop(), + baremetalPartitioningGet(), + baremetalImageList(), + baremetalImageGet(), + ) +} +func baremetalRoot() *core.Command { + return &core.Command{ + Short: `Baremetal API`, + Long: ``, + Namespace: "baremetal", + } +} + +func baremetalServer() *core.Command { + return &core.Command{ + Short: `Server management commands`, + Long: `A server is a denomination of a type of instances provided by Scaleway`, + Namespace: "baremetal", + Resource: "server", + } +} + +func baremetalImage() *core.Command { + return &core.Command{ + Short: `Image management commands`, + Long: `A disk image is a computer file containing the complete contents and structure of a storage medium. When it is transferred onto a boot device it allows the associated hardware to boot. The image usually includes the operating system`, + Namespace: "baremetal", + Resource: "image", + } +} + +func baremetalBmc() *core.Command { + return &core.Command{ + Short: `Baseboard Management Controller (BMC) management commands`, + Long: `Baseboard Management Controller (BMC) allows you to remotely access the low-level parameters of your dedicated server. +For instance, your KVM-IP management console could be accessed with it. +`, + Namespace: "baremetal", + Resource: "bmc", + } +} + +func baremetalPartitioning() *core.Command { + return &core.Command{ + Short: `Partitioning management commands`, + Long: `Partitioning is use to create specifics zones on the disk. In this zones the data will be save with a specific configuration of RAID, filesystem, …`, + Namespace: "baremetal", + Resource: "partitioning", + } +} + +func baremetalServerList() *core.Command { + return &core.Command{ + Short: `List baremetal servers for organization`, + Long: `List baremetal servers for organization.`, + Namespace: "baremetal", + Resource: "server", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.ListServersRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "order-by", + Short: `Order of the servers`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"created_at_asc", "created_at_desc"}, + }, + { + Name: "tags.{index}", + Short: `Filter servers by tags`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "status.{index}", + Short: `Filter servers by status`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "name", + Short: `Filter servers by name`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "project-id", + Short: `Filter servers by project ID`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "organization-id", + Short: `Filter servers by organization ID`, + Required: false, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.ListServersRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + resp, err := api.ListServers(request, scw.WithAllPages()) + if err != nil { + return nil, err + } + return resp.Servers, nil + + }, + Examples: []*core.Example{ + { + Short: "List all servers on your default zone", + ArgsJSON: `null`, + }, + }, + } +} + +func baremetalServerGet() *core.Command { + return &core.Command{ + Short: `Get a specific baremetal server`, + Long: `Get the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.GetServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server`, + Required: true, + Deprecated: false, + Positional: true, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.GetServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.GetServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Get a given server", + ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + }, + } +} + +func baremetalServerCreate() *core.Command { + return &core.Command{ + Short: `Create a baremetal server`, + Long: `Create a new baremetal server. Once the server is created, you probably want to install an image.`, + Namespace: "baremetal", + Resource: "server", + Verb: "create", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.CreateServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "offer-id", + Short: `Offer ID of the new server`, + Required: true, + Deprecated: false, + Positional: false, + }, + core.ProjectIDArgSpec(), + { + Name: "name", + Short: `Name of the server (≠hostname)`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "description", + Short: `Description associated to the server, max 255 characters`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "tags.{index}", + Short: `Tags to associate to the server`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "install.image-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "install.partitioning-schema-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "install.hostname", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "install.ssh-key-ids.{index}", + Required: false, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.CreateServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.CreateServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Create instance a default baremetal instance", + ArgsJSON: `null`, + }, + }, + } +} + +func baremetalServerUpdate() *core.Command { + return &core.Command{ + Short: `Update a baremetal server`, + Long: `Update the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "update", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.UpdateServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server to update`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "name", + Short: `Name of the server (≠hostname), not updated if null`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "description", + Short: `Description associated to the server, max 255 characters, not updated if null`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "tags.{index}", + Short: `Tags associated to the server, not updated if null`, + Required: false, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.UpdateServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.UpdateServer(request) + + }, + } +} + +func baremetalServerInstall() *core.Command { + return &core.Command{ + Short: `Install a baremetal server`, + Long: `Install an image on the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "install", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.InstallServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `Server ID to install`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "image-id", + Short: `ID of the image to install on the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "hostname", + Short: `Hostname of the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "ssh-key-ids.{index}", + Short: `SSH key IDs authorized on the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "partitioning-schema-id", + Short: `The ID of the partitioning schema`, + Required: false, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.InstallServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.InstallServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Install an image on a given server with a particular SSH key ID", + ArgsJSON: `{"image_id":"11111111-1111-1111-1111-111111111111","server_id":"11111111-1111-1111-1111-111111111111","ssh_key_ids":["11111111-1111-1111-1111-111111111111"]}`, + }, + }, + SeeAlsos: []*core.SeeAlso{ + { + Command: "scw account ssh-key list", + Short: "List all SSH keys", + }, + { + Command: "scw baremetal images list", + Short: "List images (useful to get all images IDs)", + }, + { + Command: "scw baremetal server create", + Short: "Create a baremetal server", + }, + }, + } +} + +func baremetalServerDelete() *core.Command { + return &core.Command{ + Short: `Delete a baremetal server`, + Long: `Delete the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.DeleteServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server to delete`, + Required: true, + Deprecated: false, + Positional: true, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.DeleteServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.DeleteServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Delete a baremetal server", + ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + }, + } +} + +func baremetalServerReboot() *core.Command { + return &core.Command{ + Short: `Reboot a baremetal server`, + Long: `Reboot the server associated with the given ID, use boot param to reboot in rescue.`, + Namespace: "baremetal", + Resource: "server", + Verb: "reboot", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.RebootServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server to reboot`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "boot-type", + Short: `The type of boot`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.RebootServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.RebootServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Reboot a server using the same image", + ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + { + Short: "Reboot a server in rescue mode", + ArgsJSON: `{"boot_type":"rescue","server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + }, + } +} + +func baremetalServerStart() *core.Command { + return &core.Command{ + Short: `Start a baremetal server`, + Long: `Start the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "start", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.StartServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server to start`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "boot-type", + Short: `The type of boot`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.StartServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.StartServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Start a baremetal server", + ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + { + Short: "Start a server in rescue mode", + ArgsJSON: `{"boot_type":"rescue","server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + }, + } +} + +func baremetalServerStop() *core.Command { + return &core.Command{ + Short: `Stop a baremetal server`, + Long: `Stop the server associated with the given ID.`, + Namespace: "baremetal", + Resource: "server", + Verb: "stop", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.StopServerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server to stop`, + Required: true, + Deprecated: false, + Positional: true, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.StopServerRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.StopServer(request) + + }, + Examples: []*core.Example{ + { + Short: "Stop a baremetal server", + ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, + }, + }, + } +} + +func baremetalBmcStart() *core.Command { + return &core.Command{ + Short: `Start BMC (Baseboard Management Controller) access for a given baremetal server`, + Long: `Start BMC (Baseboard Management Controller) access associated with the given ID. +The BMC (Baseboard Management Controller) access is available one hour after the installation of the server. +`, + Namespace: "baremetal", + Resource: "bmc", + Verb: "start", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.StartBMCAccessRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + { + Name: "ip", + Short: `The IP authorized to connect to the given server`, + Required: true, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.StartBMCAccessRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.StartBMCAccess(request) + + }, + } +} + +func baremetalBmcGet() *core.Command { + return &core.Command{ + Short: `Get BMC (Baseboard Management Controller) access for a given baremetal server`, + Long: `Get the BMC (Baseboard Management Controller) access associated with the given ID.`, + Namespace: "baremetal", + Resource: "bmc", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.GetBMCAccessRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.GetBMCAccessRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.GetBMCAccess(request) + + }, + } +} + +func baremetalBmcStop() *core.Command { + return &core.Command{ + Short: `Stop BMC (Baseboard Management Controller) access for a given baremetal server`, + Long: `Stop BMC (Baseboard Management Controller) access associated with the given ID.`, + Namespace: "baremetal", + Resource: "bmc", + Verb: "stop", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.StopBMCAccessRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "server-id", + Short: `ID of the server`, + Required: true, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.StopBMCAccessRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + e = api.StopBMCAccess(request) + if e != nil { + return nil, e + } + return &core.SuccessResult{ + Resource: "bmc", + Verb: "stop", + }, nil + }, + } +} + +func baremetalPartitioningGet() *core.Command { + return &core.Command{ + Short: `Get partitioning with a given offerID and imageID`, + Long: `Return default partitioning for the given offerID and imageID.`, + Namespace: "baremetal", + Resource: "partitioning", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.GetPartitioningSchemaRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "partitioning-schema-id", + Short: `ID of the partitioning, use 'default' in id to have the default template`, + Required: true, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.GetPartitioningSchemaRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.GetPartitioningSchema(request) + + }, + Examples: []*core.Example{ + { + Short: "Get a partitioning", + ArgsJSON: `{}`, + }, + }, + } +} + +func baremetalImageList() *core.Command { + return &core.Command{ + Short: `List all available images that can be install on a baremetal server`, + Long: `List all available images that can be install on a baremetal server.`, + Namespace: "baremetal", + Resource: "image", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.ListImagesRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "offer-id", + Short: `Filter images by offer ID`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "name", + Short: `Filter images by name`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "version-name", + Short: `Filter images by version name`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "version-number", + Short: `Filter images by version number`, + Required: false, + Deprecated: false, + Positional: false, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.ListImagesRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + resp, err := api.ListImages(request, scw.WithAllPages()) + if err != nil { + return nil, err + } + return resp.Images, nil + + }, + } +} + +func baremetalImageGet() *core.Command { + return &core.Command{ + Short: `Get an image with a given ID`, + Long: `Return specific image for the given ID.`, + Namespace: "baremetal", + Resource: "image", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(baremetal.GetImageRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "image-id", + Short: `ID of the image`, + Required: true, + Deprecated: false, + Positional: true, + }, + core.ZoneArgSpec(scw.ZoneFrPar2), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*baremetal.GetImageRequest) + + client := core.ExtractClient(ctx) + api := baremetal.NewAPI(client) + return api.GetImage(request) + + }, + Examples: []*core.Example{ + { + Short: "Get a specific image ID", + ArgsJSON: `{}`, + }, + }, + } +} diff --git a/internal/namespaces/lb/v1/lb_cli.go b/internal/namespaces/lb/v1/lb_cli.go index 80bd16a84a..9ba8b5b327 100644 --- a/internal/namespaces/lb/v1/lb_cli.go +++ b/internal/namespaces/lb/v1/lb_cli.go @@ -1649,7 +1649,7 @@ func lbACLCreate() *core.Command { Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"}, + EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"}, }, { Name: "match.http-filter-value.{index}", @@ -1658,6 +1658,13 @@ func lbACLCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "match.http-filter-option", + Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "match.invert", Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`, @@ -1760,7 +1767,7 @@ func lbACLUpdate() *core.Command { Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"}, + EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"}, }, { Name: "match.http-filter-value.{index}", @@ -1769,6 +1776,13 @@ func lbACLUpdate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "match.http-filter-option", + Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "match.invert", Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`, From 10348ea5b9a3c7eaf37547440a5d5c30707f3bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Wed, 7 Jul 2021 13:42:48 +0200 Subject: [PATCH 2/4] Fix --- .../baremetal/v2beta1/baremetal_cli.go | 811 ------------------ internal/namespaces/lb/v1/lb_cli.go | 18 +- 2 files changed, 2 insertions(+), 827 deletions(-) delete mode 100644 internal/namespaces/baremetal/v2beta1/baremetal_cli.go diff --git a/internal/namespaces/baremetal/v2beta1/baremetal_cli.go b/internal/namespaces/baremetal/v2beta1/baremetal_cli.go deleted file mode 100644 index a969078dc4..0000000000 --- a/internal/namespaces/baremetal/v2beta1/baremetal_cli.go +++ /dev/null @@ -1,811 +0,0 @@ -// This file was automatically generated. DO NOT EDIT. -// If you have any remark or suggestion do not hesitate to open an issue. - -package baremetal - -import ( - "context" - "reflect" - - "github.com/scaleway/scaleway-cli/internal/core" - "github.com/scaleway/scaleway-sdk-go/api/baremetal/v2beta1" - "github.com/scaleway/scaleway-sdk-go/scw" -) - -// always import dependencies -var ( - _ = scw.RegionFrPar -) - -func GetGeneratedCommands() *core.Commands { - return core.NewCommands( - baremetalRoot(), - baremetalServer(), - baremetalImage(), - baremetalBmc(), - baremetalPartitioning(), - baremetalServerList(), - baremetalServerGet(), - baremetalServerCreate(), - baremetalServerUpdate(), - baremetalServerInstall(), - baremetalServerDelete(), - baremetalServerReboot(), - baremetalServerStart(), - baremetalServerStop(), - baremetalBmcStart(), - baremetalBmcGet(), - baremetalBmcStop(), - baremetalPartitioningGet(), - baremetalImageList(), - baremetalImageGet(), - ) -} -func baremetalRoot() *core.Command { - return &core.Command{ - Short: `Baremetal API`, - Long: ``, - Namespace: "baremetal", - } -} - -func baremetalServer() *core.Command { - return &core.Command{ - Short: `Server management commands`, - Long: `A server is a denomination of a type of instances provided by Scaleway`, - Namespace: "baremetal", - Resource: "server", - } -} - -func baremetalImage() *core.Command { - return &core.Command{ - Short: `Image management commands`, - Long: `A disk image is a computer file containing the complete contents and structure of a storage medium. When it is transferred onto a boot device it allows the associated hardware to boot. The image usually includes the operating system`, - Namespace: "baremetal", - Resource: "image", - } -} - -func baremetalBmc() *core.Command { - return &core.Command{ - Short: `Baseboard Management Controller (BMC) management commands`, - Long: `Baseboard Management Controller (BMC) allows you to remotely access the low-level parameters of your dedicated server. -For instance, your KVM-IP management console could be accessed with it. -`, - Namespace: "baremetal", - Resource: "bmc", - } -} - -func baremetalPartitioning() *core.Command { - return &core.Command{ - Short: `Partitioning management commands`, - Long: `Partitioning is use to create specifics zones on the disk. In this zones the data will be save with a specific configuration of RAID, filesystem, …`, - Namespace: "baremetal", - Resource: "partitioning", - } -} - -func baremetalServerList() *core.Command { - return &core.Command{ - Short: `List baremetal servers for organization`, - Long: `List baremetal servers for organization.`, - Namespace: "baremetal", - Resource: "server", - Verb: "list", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.ListServersRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "order-by", - Short: `Order of the servers`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"created_at_asc", "created_at_desc"}, - }, - { - Name: "tags.{index}", - Short: `Filter servers by tags`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "status.{index}", - Short: `Filter servers by status`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "name", - Short: `Filter servers by name`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "project-id", - Short: `Filter servers by project ID`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "organization-id", - Short: `Filter servers by organization ID`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.ListServersRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - resp, err := api.ListServers(request, scw.WithAllPages()) - if err != nil { - return nil, err - } - return resp.Servers, nil - - }, - Examples: []*core.Example{ - { - Short: "List all servers on your default zone", - ArgsJSON: `null`, - }, - }, - } -} - -func baremetalServerGet() *core.Command { - return &core.Command{ - Short: `Get a specific baremetal server`, - Long: `Get the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "get", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.GetServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server`, - Required: true, - Deprecated: false, - Positional: true, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.GetServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.GetServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Get a given server", - ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - }, - } -} - -func baremetalServerCreate() *core.Command { - return &core.Command{ - Short: `Create a baremetal server`, - Long: `Create a new baremetal server. Once the server is created, you probably want to install an image.`, - Namespace: "baremetal", - Resource: "server", - Verb: "create", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.CreateServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "offer-id", - Short: `Offer ID of the new server`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.ProjectIDArgSpec(), - { - Name: "name", - Short: `Name of the server (≠hostname)`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "description", - Short: `Description associated to the server, max 255 characters`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "tags.{index}", - Short: `Tags to associate to the server`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "install.image-id", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "install.partitioning-schema-id", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "install.hostname", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "install.ssh-key-ids.{index}", - Required: false, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.CreateServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.CreateServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Create instance a default baremetal instance", - ArgsJSON: `null`, - }, - }, - } -} - -func baremetalServerUpdate() *core.Command { - return &core.Command{ - Short: `Update a baremetal server`, - Long: `Update the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "update", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.UpdateServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server to update`, - Required: true, - Deprecated: false, - Positional: true, - }, - { - Name: "name", - Short: `Name of the server (≠hostname), not updated if null`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "description", - Short: `Description associated to the server, max 255 characters, not updated if null`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "tags.{index}", - Short: `Tags associated to the server, not updated if null`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.UpdateServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.UpdateServer(request) - - }, - } -} - -func baremetalServerInstall() *core.Command { - return &core.Command{ - Short: `Install a baremetal server`, - Long: `Install an image on the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "install", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.InstallServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `Server ID to install`, - Required: true, - Deprecated: false, - Positional: true, - }, - { - Name: "image-id", - Short: `ID of the image to install on the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "hostname", - Short: `Hostname of the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "ssh-key-ids.{index}", - Short: `SSH key IDs authorized on the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "partitioning-schema-id", - Short: `The ID of the partitioning schema`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.InstallServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.InstallServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Install an image on a given server with a particular SSH key ID", - ArgsJSON: `{"image_id":"11111111-1111-1111-1111-111111111111","server_id":"11111111-1111-1111-1111-111111111111","ssh_key_ids":["11111111-1111-1111-1111-111111111111"]}`, - }, - }, - SeeAlsos: []*core.SeeAlso{ - { - Command: "scw account ssh-key list", - Short: "List all SSH keys", - }, - { - Command: "scw baremetal images list", - Short: "List images (useful to get all images IDs)", - }, - { - Command: "scw baremetal server create", - Short: "Create a baremetal server", - }, - }, - } -} - -func baremetalServerDelete() *core.Command { - return &core.Command{ - Short: `Delete a baremetal server`, - Long: `Delete the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "delete", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.DeleteServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server to delete`, - Required: true, - Deprecated: false, - Positional: true, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.DeleteServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.DeleteServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Delete a baremetal server", - ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - }, - } -} - -func baremetalServerReboot() *core.Command { - return &core.Command{ - Short: `Reboot a baremetal server`, - Long: `Reboot the server associated with the given ID, use boot param to reboot in rescue.`, - Namespace: "baremetal", - Resource: "server", - Verb: "reboot", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.RebootServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server to reboot`, - Required: true, - Deprecated: false, - Positional: true, - }, - { - Name: "boot-type", - Short: `The type of boot`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.RebootServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.RebootServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Reboot a server using the same image", - ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - { - Short: "Reboot a server in rescue mode", - ArgsJSON: `{"boot_type":"rescue","server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - }, - } -} - -func baremetalServerStart() *core.Command { - return &core.Command{ - Short: `Start a baremetal server`, - Long: `Start the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "start", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.StartServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server to start`, - Required: true, - Deprecated: false, - Positional: true, - }, - { - Name: "boot-type", - Short: `The type of boot`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"unknown_boot_type", "normal", "rescue"}, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.StartServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.StartServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Start a baremetal server", - ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - { - Short: "Start a server in rescue mode", - ArgsJSON: `{"boot_type":"rescue","server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - }, - } -} - -func baremetalServerStop() *core.Command { - return &core.Command{ - Short: `Stop a baremetal server`, - Long: `Stop the server associated with the given ID.`, - Namespace: "baremetal", - Resource: "server", - Verb: "stop", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.StopServerRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server to stop`, - Required: true, - Deprecated: false, - Positional: true, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.StopServerRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.StopServer(request) - - }, - Examples: []*core.Example{ - { - Short: "Stop a baremetal server", - ArgsJSON: `{"server_id":"11111111-1111-1111-1111-111111111111"}`, - }, - }, - } -} - -func baremetalBmcStart() *core.Command { - return &core.Command{ - Short: `Start BMC (Baseboard Management Controller) access for a given baremetal server`, - Long: `Start BMC (Baseboard Management Controller) access associated with the given ID. -The BMC (Baseboard Management Controller) access is available one hour after the installation of the server. -`, - Namespace: "baremetal", - Resource: "bmc", - Verb: "start", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.StartBMCAccessRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "ip", - Short: `The IP authorized to connect to the given server`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.StartBMCAccessRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.StartBMCAccess(request) - - }, - } -} - -func baremetalBmcGet() *core.Command { - return &core.Command{ - Short: `Get BMC (Baseboard Management Controller) access for a given baremetal server`, - Long: `Get the BMC (Baseboard Management Controller) access associated with the given ID.`, - Namespace: "baremetal", - Resource: "bmc", - Verb: "get", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.GetBMCAccessRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.GetBMCAccessRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.GetBMCAccess(request) - - }, - } -} - -func baremetalBmcStop() *core.Command { - return &core.Command{ - Short: `Stop BMC (Baseboard Management Controller) access for a given baremetal server`, - Long: `Stop BMC (Baseboard Management Controller) access associated with the given ID.`, - Namespace: "baremetal", - Resource: "bmc", - Verb: "stop", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.StopBMCAccessRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "server-id", - Short: `ID of the server`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.StopBMCAccessRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - e = api.StopBMCAccess(request) - if e != nil { - return nil, e - } - return &core.SuccessResult{ - Resource: "bmc", - Verb: "stop", - }, nil - }, - } -} - -func baremetalPartitioningGet() *core.Command { - return &core.Command{ - Short: `Get partitioning with a given offerID and imageID`, - Long: `Return default partitioning for the given offerID and imageID.`, - Namespace: "baremetal", - Resource: "partitioning", - Verb: "get", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.GetPartitioningSchemaRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "partitioning-schema-id", - Short: `ID of the partitioning, use 'default' in id to have the default template`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.GetPartitioningSchemaRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.GetPartitioningSchema(request) - - }, - Examples: []*core.Example{ - { - Short: "Get a partitioning", - ArgsJSON: `{}`, - }, - }, - } -} - -func baremetalImageList() *core.Command { - return &core.Command{ - Short: `List all available images that can be install on a baremetal server`, - Long: `List all available images that can be install on a baremetal server.`, - Namespace: "baremetal", - Resource: "image", - Verb: "list", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.ListImagesRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "offer-id", - Short: `Filter images by offer ID`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "name", - Short: `Filter images by name`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "version-name", - Short: `Filter images by version name`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "version-number", - Short: `Filter images by version number`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.ListImagesRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - resp, err := api.ListImages(request, scw.WithAllPages()) - if err != nil { - return nil, err - } - return resp.Images, nil - - }, - } -} - -func baremetalImageGet() *core.Command { - return &core.Command{ - Short: `Get an image with a given ID`, - Long: `Return specific image for the given ID.`, - Namespace: "baremetal", - Resource: "image", - Verb: "get", - // Deprecated: false, - ArgsType: reflect.TypeOf(baremetal.GetImageRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "image-id", - Short: `ID of the image`, - Required: true, - Deprecated: false, - Positional: true, - }, - core.ZoneArgSpec(scw.ZoneFrPar2), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*baremetal.GetImageRequest) - - client := core.ExtractClient(ctx) - api := baremetal.NewAPI(client) - return api.GetImage(request) - - }, - Examples: []*core.Example{ - { - Short: "Get a specific image ID", - ArgsJSON: `{}`, - }, - }, - } -} diff --git a/internal/namespaces/lb/v1/lb_cli.go b/internal/namespaces/lb/v1/lb_cli.go index 9ba8b5b327..80bd16a84a 100644 --- a/internal/namespaces/lb/v1/lb_cli.go +++ b/internal/namespaces/lb/v1/lb_cli.go @@ -1649,7 +1649,7 @@ func lbACLCreate() *core.Command { Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"}, + EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"}, }, { Name: "match.http-filter-value.{index}", @@ -1658,13 +1658,6 @@ func lbACLCreate() *core.Command { Deprecated: false, Positional: false, }, - { - Name: "match.http-filter-option", - Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`, - Required: false, - Deprecated: false, - Positional: false, - }, { Name: "match.invert", Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`, @@ -1767,7 +1760,7 @@ func lbACLUpdate() *core.Command { Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"}, + EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"}, }, { Name: "match.http-filter-value.{index}", @@ -1776,13 +1769,6 @@ func lbACLUpdate() *core.Command { Deprecated: false, Positional: false, }, - { - Name: "match.http-filter-option", - Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`, - Required: false, - Deprecated: false, - Positional: false, - }, { Name: "match.invert", Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`, From d905437b2d63562694e5a6279f13203bee333814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Wed, 7 Jul 2021 13:45:56 +0200 Subject: [PATCH 3/4] Fix --- cmd/scw/testdata/test-all-usage-baremetal-bmc-get-usage.golden | 2 +- .../testdata/test-all-usage-baremetal-bmc-start-usage.golden | 2 +- cmd/scw/testdata/test-all-usage-baremetal-bmc-stop-usage.golden | 2 +- cmd/scw/testdata/test-all-usage-baremetal-os-get-usage.golden | 2 +- cmd/scw/testdata/test-all-usage-baremetal-os-list-usage.golden | 2 +- .../test-all-usage-baremetal-server-create-usage.golden | 2 +- .../test-all-usage-baremetal-server-delete-usage.golden | 2 +- .../testdata/test-all-usage-baremetal-server-get-usage.golden | 2 +- .../test-all-usage-baremetal-server-install-usage.golden | 2 +- .../testdata/test-all-usage-baremetal-server-list-usage.golden | 2 +- .../test-all-usage-baremetal-server-reboot-usage.golden | 2 +- .../testdata/test-all-usage-baremetal-server-start-usage.golden | 2 +- .../testdata/test-all-usage-baremetal-server-stop-usage.golden | 2 +- .../test-all-usage-baremetal-server-update-usage.golden | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-baremetal-bmc-get-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-bmc-get-usage.golden index 48b77d4bf2..5de14e8cc1 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-bmc-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-bmc-get-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: server-id ID of the server - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for get diff --git a/cmd/scw/testdata/test-all-usage-baremetal-bmc-start-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-bmc-start-usage.golden index 210a979f5f..1c4c6fc621 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-bmc-start-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-bmc-start-usage.golden @@ -9,7 +9,7 @@ USAGE: ARGS: server-id ID of the server ip The IP authorized to connect to the given server - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for start diff --git a/cmd/scw/testdata/test-all-usage-baremetal-bmc-stop-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-bmc-stop-usage.golden index ee06d48c7d..5b80504107 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-bmc-stop-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-bmc-stop-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: server-id ID of the server - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for stop diff --git a/cmd/scw/testdata/test-all-usage-baremetal-os-get-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-os-get-usage.golden index 2382b91c52..18e165d64d 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-os-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-os-get-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: os-id ID of the OS - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for get diff --git a/cmd/scw/testdata/test-all-usage-baremetal-os-list-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-os-list-usage.golden index d9438311d8..d22657dc0d 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-os-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-os-list-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: [offer-id] Filter OS by offer ID - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for list diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-create-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-create-usage.golden index 253104ca4e..0549dbda0c 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-create-usage.golden @@ -22,7 +22,7 @@ ARGS: [install.hostname] [install.ssh-key-ids.{index}] [organization-id] Organization ID to use. If none is passed the default organization ID will be used - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for create diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-delete-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-delete-usage.golden index 68541d5e12..7976875f94 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-delete-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: server-id ID of the server to delete - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for delete diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-get-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-get-usage.golden index 720644eb14..e13f2e8b57 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-get-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: server-id ID of the server - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for get diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-install-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-install-usage.golden index 3c73666328..2dd75459d5 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-install-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-install-usage.golden @@ -15,7 +15,7 @@ ARGS: hostname Hostname of the server [all-ssh-keys] Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids) ssh-key-ids.{index} SSH key IDs authorized on the server (cannot be used with all-ssh-keys) - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for install diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-list-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-list-usage.golden index 9e1d1b07c6..be3d68c113 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-list-usage.golden @@ -16,7 +16,7 @@ ARGS: [name] Filter servers by name [project-id] Filter servers by project ID [organization-id] Filter servers by organization ID - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for list diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-reboot-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-reboot-usage.golden index 5e91b6964d..b1db450bf9 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-reboot-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-reboot-usage.golden @@ -15,7 +15,7 @@ EXAMPLES: ARGS: server-id ID of the server to reboot [boot-type=normal] The type of boot (unknown_boot_type | normal | rescue) - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for reboot diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-start-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-start-usage.golden index 339829b47a..97d8ffff3b 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-start-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-start-usage.golden @@ -15,7 +15,7 @@ EXAMPLES: ARGS: server-id ID of the server to start [boot-type] The type of boot (unknown_boot_type | normal | rescue) - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for start diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-stop-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-stop-usage.golden index e7509d5926..14d105d1e3 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-stop-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-stop-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: server-id ID of the server to stop - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for stop diff --git a/cmd/scw/testdata/test-all-usage-baremetal-server-update-usage.golden b/cmd/scw/testdata/test-all-usage-baremetal-server-update-usage.golden index 44fe965ab3..67575dd5ff 100644 --- a/cmd/scw/testdata/test-all-usage-baremetal-server-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-baremetal-server-update-usage.golden @@ -10,7 +10,7 @@ ARGS: [name] Name of the server (≠hostname), not updated if null [description] Description associated to the server, max 255 characters, not updated if null [tags.{index}] Tags associated to the server, not updated if null - [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2) + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1) FLAGS: -h, --help help for update From d143f7c2820de59bda897d952ea8a3a9721399c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Wed, 7 Jul 2021 13:48:07 +0200 Subject: [PATCH 4/4] Fix --- docs/commands/baremetal.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/commands/baremetal.md b/docs/commands/baremetal.md index c77abde3af..d6611347d0 100644 --- a/docs/commands/baremetal.md +++ b/docs/commands/baremetal.md @@ -45,7 +45,7 @@ scw baremetal bmc get [arg=value ...] | Name | | Description | |------|---|-------------| | server-id | Required | ID of the server | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | @@ -68,7 +68,7 @@ scw baremetal bmc start [arg=value ...] |------|---|-------------| | server-id | Required | ID of the server | | ip | Required | The IP authorized to connect to the given server | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | @@ -88,7 +88,7 @@ scw baremetal bmc stop [arg=value ...] | Name | | Description | |------|---|-------------| | server-id | Required | ID of the server | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | @@ -113,7 +113,7 @@ scw baremetal os get [arg=value ...] | Name | | Description | |------|---|-------------| | os-id | Required | ID of the OS | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -143,7 +143,7 @@ scw baremetal os list [arg=value ...] | Name | | Description | |------|---|-------------| | offer-id | | Filter OS by offer ID | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | @@ -176,7 +176,7 @@ scw baremetal server create [arg=value ...] | install.hostname | | | | install.ssh-key-ids.{index} | | | | organization-id | | Organization ID to use. If none is passed the default organization ID will be used | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -211,7 +211,7 @@ scw baremetal server delete [arg=value ...] | Name | | Description | |------|---|-------------| | server-id | Required | ID of the server to delete | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -241,7 +241,7 @@ scw baremetal server get [arg=value ...] | Name | | Description | |------|---|-------------| | server-id | Required | ID of the server | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -275,7 +275,7 @@ scw baremetal server install [arg=value ...] | hostname | Required | Hostname of the server | | all-ssh-keys | | Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids) | | ssh-key-ids.{index} | Required | SSH key IDs authorized on the server (cannot be used with all-ssh-keys) | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -310,7 +310,7 @@ scw baremetal server list [arg=value ...] | name | | Filter servers by name | | project-id | | Filter servers by project ID | | organization-id | | Filter servers by organization ID | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -341,7 +341,7 @@ scw baremetal server reboot [arg=value ...] |------|---|-------------| | server-id | Required | ID of the server to reboot | | boot-type | Default: `normal`
One of: `unknown_boot_type`, `normal`, `rescue` | The type of boot | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -377,7 +377,7 @@ scw baremetal server start [arg=value ...] |------|---|-------------| | server-id | Required | ID of the server to start | | boot-type | One of: `unknown_boot_type`, `normal`, `rescue` | The type of boot | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -412,7 +412,7 @@ scw baremetal server stop [arg=value ...] | Name | | Description | |------|---|-------------| | server-id | Required | ID of the server to stop | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config | **Examples:** @@ -445,7 +445,7 @@ scw baremetal server update [arg=value ...] | name | | Name of the server (≠hostname), not updated if null | | description | | Description associated to the server, max 255 characters, not updated if null | | tags.{index} | | Tags associated to the server, not updated if null | -| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1` | Zone to target. If none is passed will use default zone from the config |