fixed storage node bug
This commit is contained in:
parent
bb0083b60d
commit
763b4404ef
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue