Skip to content

Commit 42701a8

Browse files
authored
Merge pull request #1 from kernel/add-device-flag
Add --device flag to ds install command
2 parents 9fe8c56 + feef38a commit 42701a8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/cmd/dedicated_servers.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ var dsInstallCmd = cli.Command{
438438
Name: "hostname",
439439
Usage: "Server hostname",
440440
},
441+
&cli.StringFlag{
442+
Name: "device",
443+
Usage: "Boot device (SATA_SAS, NVME, or a disk set ID)",
444+
},
441445
},
442446
Action: handleDSInstall,
443447
HideHelpCommand: true,
@@ -458,6 +462,9 @@ func handleDSInstall(ctx context.Context, cmd *cli.Command) error {
458462
if h := cmd.String("hostname"); h != "" {
459463
payload["hostname"] = h
460464
}
465+
if d := cmd.String("device"); d != "" {
466+
payload["device"] = d
467+
}
461468
body, _ := json.Marshal(payload)
462469
res, err := client.PostJSON(ctx, "/bareMetals/v2/servers/"+args[0]+"/install", body)
463470
if err != nil {

0 commit comments

Comments
 (0)