diff --git a/PVE-Zabbix.py b/PVE-Zabbix.py index 50ba065..7be9e72 100755 --- a/PVE-Zabbix.py +++ b/PVE-Zabbix.py @@ -52,10 +52,9 @@ def exec_storage(**kwargs): # Initiate instances stors = conn.get_cluster_storagelist(nodelist) - # FIXME consider node name to avoid random results from duplicate storage names if kwargs['name'] is not None and kwargs['listing'] is False: try: - stor = next(v for v in stors if v.name == kwargs['name']) + stor = next(v for v in stors if (v.name == kwargs['name'] and v.node == NODE.name)) print stor.get_storageinfo(kwargs['param']) except StopIteration: print "No such VM found. Possible VMs: " + str(VM.get_vmnames(NODE))