Skip to content

Commit

Permalink
Add nvme support to disk wipe
Browse files Browse the repository at this point in the history
This gives vogelkop the ability to actually wipe a drive now. Will be
adding more device types/features soon.
  • Loading branch information
mmlb committed Jun 11, 2024
1 parent adc5f7a commit 75497c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/disk_wipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/bmc-toolbox/common"
"github.com/metal-toolbox/ironlib"
"github.com/metal-toolbox/ironlib/actions"
"github.com/metal-toolbox/ironlib/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -72,6 +73,11 @@ func init() {

// Pick the most appropriate wipe based on the disk type and/or features supported
var wiper actions.DriveWiper
switch drive.Protocol {

Check failure on line 76 in cmd/disk_wipe.go

View workflow job for this annotation

GitHub Actions / golangci

singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
case "nvme":
wiper = utils.NewNvmeCmd(verbose)
}

if wiper == nil {
l.Fatal("failed find appropriate wiper drive")
}
Expand Down

0 comments on commit 75497c7

Please sign in to comment.