only the firmware can really change between scans. Lets slim down the metadata update.
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user