Skip to content

Add --device flag to ds install command - #1

Merged
hiroTamada merged 1 commit into
mainfrom
add-device-flag
Mar 5, 2026
Merged

hiroTamada merged 1 commit into
mainfrom
add-device-flag

Conversation

@hiroTamada

@hiroTamada hiroTamada commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds --device flag to lw ds install to specify the boot device (e.g., SATA_SAS, NVME, or a disk set ID)
  • NVMe-only servers (like HP DL385 G11) fail with "Requested boot device SATA_SAS is not present" because the API defaults to SATA_SAS when no device is specified
  • The Leaseweb API already supports this parameter — we just weren't passing it through

Usage

lw ds install <server-id> --os DEBIAN_12_64BIT --hostname my-host --device NVME

Test plan

  • lw ds install --help shows the new --device flag
  • Verified against Leaseweb API docs: device field supports SATA_SAS, NVME, or disk set IDs
  • Successfully used device: NVME via direct API call to install on NVMe-only HP DL385 G11 servers

Made with Cursor


Note

Low Risk
Low risk: adds an optional CLI flag that only affects ds install requests when explicitly provided, forwarding an extra field to the existing API call.

Overview
Adds an optional --device flag to lw ds install and forwards it as device in the /bareMetals/v2/servers/{id}/install payload, allowing callers to choose the boot device (e.g., SATA_SAS, NVME, or a disk set ID) instead of relying on the API default.

Written by Cursor Bugbot for commit feef38a. This will update automatically on new commits. Configure here.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Low risk.

Evidence from diff:

  • Single file changed: pkg/cmd/dedicated_servers.go
  • Small, scoped change (+7/-0): adds one CLI flag (--device) and conditionally forwards it into existing install payload
  • No infrastructure/auth/permission/schema/shared-platform changes
  • No broad refactor or cross-cutting behavior changes

Decision:

  • Code review assignment not required for Low risk under policy
  • Approving this PR

Open in Web View Automation 

@hiroTamada
hiroTamada merged commit 42701a8 into main Mar 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant