Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #345 from packethost/operating_system_reinstall_op…
Browse files Browse the repository at this point in the history
…tion

added operating_system field to reinstall action
  • Loading branch information
displague authored Sep 2, 2022
2 parents 2edef8d + 0c16b92 commit b4897c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,9 @@ type DeviceDeleteRequest struct {
Force bool `json:"force_delete"`
}
type DeviceReinstallFields struct {
PreserveData bool `json:"preserve_data,omitempty"`
DeprovisionFast bool `json:"deprovision_fast,omitempty"`
OperatingSystem string `json:"operating_system,omitempty"`
PreserveData bool `json:"preserve_data,omitempty"`
DeprovisionFast bool `json:"deprovision_fast,omitempty"`
}

type DeviceReinstallRequest struct {
Expand Down
5 changes: 4 additions & 1 deletion devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ func TestAccDeviceReinstall(t *testing.T) {

waitDeviceActive(t, c, dID)

rf := DeviceReinstallFields{DeprovisionFast: true}
rf := DeviceReinstallFields{
DeprovisionFast: true,
OperatingSystem: "ubuntu_20_04",
}

_, err = c.Devices.Reinstall(dID, &rf)
if err != nil {
Expand Down

0 comments on commit b4897c2

Please sign in to comment.