NVME inventory fix.
The inventory crash with default nvme-cli version 1.8.1 on Centos7.
This commit is contained in:
parent
51efa8edba
commit
794f9787f0
1 changed files with 4 additions and 1 deletions
|
@ -104,7 +104,10 @@ class LSHW():
|
|||
d['product'] = device["ModelNumber"]
|
||||
d['serial'] = device["SerialNumber"]
|
||||
d["version"] = device["Firmware"]
|
||||
d['size'] = device["UsedSize"]
|
||||
if "UsedSize" in device:
|
||||
d['size'] = device["UsedSize"]
|
||||
if "UsedBytes" in device:
|
||||
d['size'] = device["UsedBytes"]
|
||||
d['description'] = "NVME Disk"
|
||||
|
||||
self.disks.append(d)
|
||||
|
|
Loading…
Reference in a new issue