Fix ovirt4.py inventory file for oVirt 4.3 (#54338)
ovirt4.py inventory file fails with oVirt 4.3 with the following error: Traceback (most recent call last): File "inventory/ovirt", line 259, in <module> main() File "inventory/ovirt", line 250, in main vm_name=args.host, File "inventory/ovirt", line 209, in get_data vms[name] = get_dict_of_struct(connection, vm) File "inventory/ovirt", line 178, in get_dict_of_struct (stat.name, stat.values[0].datum) for stat in stats File "inventory/ovirt", line 178, in <genexpr> (stat.name, stat.values[0].datum) for stat in stats IndexError: list index out of range
This commit is contained in:
parent
43514e9d93
commit
eebebb1a83
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ def get_dict_of_struct(connection, vm):
|
||||||
if vm.name in [vm.name for vm in connection.follow_link(group.vms)]
|
if vm.name in [vm.name for vm in connection.follow_link(group.vms)]
|
||||||
],
|
],
|
||||||
'statistics': dict(
|
'statistics': dict(
|
||||||
(stat.name, stat.values[0].datum) for stat in stats
|
(stat.name, stat.values[0].datum) for stat in stats if stat.values
|
||||||
),
|
),
|
||||||
'devices': dict(
|
'devices': dict(
|
||||||
(device.name, [ip.address for ip in device.ips]) for device in devices if device.ips
|
(device.name, [ip.address for ip in device.ips]) for device in devices if device.ips
|
||||||
|
|
Loading…
Reference in a new issue