From 63a78a537e1300e393f6fcf54aae799210618264 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 8 Jun 2019 04:25:55 +0200 Subject: [PATCH] Use infoextended for fallback case also --- opennebula_api/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opennebula_api/models.py b/opennebula_api/models.py index a333aa23..a951349e 100644 --- a/opennebula_api/models.py +++ b/opennebula_api/models.py @@ -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