@ -100,7 +100,7 @@ func (d *Detect) smartCtlInfo(device *models.Device) error {
Oui: availableDeviceInfo.Wwn.Oui,
Id: availableDeviceInfo.Wwn.ID,
}
device.WWN = wwn.ToString()
device.WWN = strings.ToLower(wwn.ToString())
d.Logger.Debugf("NAA: %d OUI: %d Id: %d => WWN: %s", wwn.Naa, wwn.Oui, wwn.Id, device.WWN)
} else {
d.Logger.Info("Using WWN Fallback")
@ -105,4 +105,7 @@ func (d *Detect) wwnFallback(detectedDevice *models.Device) {
d.Logger.Debugf("WWN is empty, falling back to serial number: %s", detectedDevice.SerialNumber)
detectedDevice.WWN = detectedDevice.SerialNumber
//wwn must always be lowercase.
detectedDevice.WWN = strings.ToLower(detectedDevice.WWN)
@ -42,4 +42,7 @@ func (d *Detect) wwnFallback(detectedDevice *models.Device) {
@ -26,4 +26,7 @@ func (d *Detect) wwnFallback(detectedDevice *models.Device) {
if len(detectedDevice.WWN) == 0 {
@ -2,6 +2,7 @@ package detect
import (
"fmt"
"strings"
)
type Wwn struct {
@ -54,5 +55,5 @@ func (wwn *Wwn) ToString() string {
//TODO: may need to support additional versions in the future.
return fmt.Sprintf("%#x", wwnBuffer)
return strings.ToLower(fmt.Sprintf("%#x", wwnBuffer))