Use infoextended for fallback case also

This commit is contained in:
PCoder 2019-06-08 04:25:55 +02:00
parent 6ac9d2fb1e
commit 63a78a537e

View file

@ -212,7 +212,13 @@ class OpenNebulaManager():
'Could not connect via client, using oneadmin instead')
try:
vm_pool = oca.VirtualMachinePool(self.oneadmin_client)
vm_pool.info(filter=-2)
if infoextended:
vm_pool.infoextended(
filter=-1, # User's resources and any of his groups
vm_state=-1 # Look for VMs in any state, except DONE
)
else:
vm_pool.info(filter=-2)
return vm_pool
except:
raise ConnectionRefusedError