only the firmware can really change between scans. Lets slim down the metadata update.

pull/38/head
Jason Kulatunga 4 years ago
parent 3deca46851
commit 66122778a3

@ -152,16 +152,6 @@ func (dv *Device) ApplyMetadataRules() error {
} }
func (dv *Device) UpdateFromCollectorSmartInfo(info collector.SmartInfo) error { func (dv *Device) UpdateFromCollectorSmartInfo(info collector.SmartInfo) error {
dv.InterfaceSpeed = info.InterfaceSpeed.Current.String
dv.Firmware = info.FirmwareVersion dv.Firmware = info.FirmwareVersion
dv.RotationSpeed = info.RotationRate
dv.Capacity = info.UserCapacity.Bytes
dv.FormFactor = info.FormFactor.Name
dv.DeviceProtocol = info.Device.Protocol
dv.DeviceType = info.Device.Type
if len(info.Vendor) > 0 {
dv.Manufacturer = info.Vendor
}
return nil return nil
} }

Loading…
Cancel
Save