From 77fbf91592fc559e57108d8776cf1b607e6e83e3 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Tue, 11 Jun 2024 16:39:10 -0400 Subject: [PATCH] Add nvme support to disk wipe This gives vogelkop the ability to actually wipe a drive now. Will be adding more device types/features soon. --- cmd/disk_wipe.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/disk_wipe.go b/cmd/disk_wipe.go index 7dae379..dc89cba 100644 --- a/cmd/disk_wipe.go +++ b/cmd/disk_wipe.go @@ -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" ) @@ -72,6 +73,12 @@ func init() { // Pick the most appropriate wipe based on the disk type and/or features supported var wiper actions.DriveWiper + // nolint:gocritic // will have more cases soon, remove nolint then + switch drive.Protocol { + case "nvme": + wiper = utils.NewNvmeCmd(verbose) + } + if wiper == nil { l.Fatal("failed find appropriate wiper drive") }