Merge pull request 'Fix disk size inventory' (#310) from ribetm/disk_size into main
Reviewed-on: #310
This commit is contained in:
commit
4242832396
1 changed files with 1 additions and 1 deletions
|
@ -354,7 +354,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(getattr(disk, "size", 0)) / 1073741824
|
size = round(int(disk.get("size", 0)) / 1073741824, 1)
|
||||||
d = {
|
d = {
|
||||||
"name": "",
|
"name": "",
|
||||||
"Size": "{} GB".format(size),
|
"Size": "{} GB".format(size),
|
||||||
|
|
Loading…
Reference in a new issue