Merge pull request #239 from Solvik/fix/inventory-disk-issue
Inventory disk issue
This commit is contained in:
commit
042a6fcf35
1 changed files with 2 additions and 1 deletions
|
@ -321,6 +321,7 @@ class Inventory():
|
||||||
'virtual' in product.lower() or \
|
'virtual' in product.lower() or \
|
||||||
'logical' in product.lower() or \
|
'logical' in product.lower() or \
|
||||||
'volume' in description.lower() or \
|
'volume' in description.lower() or \
|
||||||
|
'dvd-ram' in description.lower() or \
|
||||||
description == 'SCSI Enclosure' or \
|
description == 'SCSI Enclosure' or \
|
||||||
(size is None and logicalname is None):
|
(size is None and logicalname is None):
|
||||||
return True
|
return True
|
||||||
|
@ -341,7 +342,7 @@ class Inventory():
|
||||||
for disk in self.lshw.get_hw_linux("storage"):
|
for disk in self.lshw.get_hw_linux("storage"):
|
||||||
if self.is_virtual_disk(disk, raid_devices):
|
if self.is_virtual_disk(disk, raid_devices):
|
||||||
continue
|
continue
|
||||||
size =int(disk.get('size', 0)) / 1073741824
|
size = int(getattr(disk, "size", 0)) / 1073741824
|
||||||
d = {
|
d = {
|
||||||
"name": "",
|
"name": "",
|
||||||
'Size': '{} GB'.format(size),
|
'Size': '{} GB'.format(size),
|
||||||
|
|
Loading…
Reference in a new issue