From feef38a591f04d31e5b21ce39f2ce0a8d22fab29 Mon Sep 17 00:00:00 2001 From: Hiro Tamada Date: Thu, 5 Mar 2026 14:38:53 -0500 Subject: [PATCH] Add --device flag to ds install command The Leaseweb API supports a `device` parameter on the install endpoint to specify the boot device (SATA_SAS, NVME, or a disk set ID). NVMe-only servers fail with "Requested boot device SATA_SAS is not present" without this flag since the API defaults to SATA_SAS. Made-with: Cursor --- pkg/cmd/dedicated_servers.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cmd/dedicated_servers.go b/pkg/cmd/dedicated_servers.go index 7a9cc45..05d0c2c 100644 --- a/pkg/cmd/dedicated_servers.go +++ b/pkg/cmd/dedicated_servers.go @@ -438,6 +438,10 @@ var dsInstallCmd = cli.Command{ Name: "hostname", Usage: "Server hostname", }, + &cli.StringFlag{ + Name: "device", + Usage: "Boot device (SATA_SAS, NVME, or a disk set ID)", + }, }, Action: handleDSInstall, HideHelpCommand: true, @@ -458,6 +462,9 @@ func handleDSInstall(ctx context.Context, cmd *cli.Command) error { if h := cmd.String("hostname"); h != "" { payload["hostname"] = h } + if d := cmd.String("device"); d != "" { + payload["device"] = d + } body, _ := json.Marshal(payload) res, err := client.PostJSON(ctx, "/bareMetals/v2/servers/"+args[0]+"/install", body) if err != nil {