Try connection

This commit is contained in:
Modulos 2017-05-14 12:44:36 +02:00
parent dec1ccd180
commit 0353f72676

View file

@ -84,8 +84,11 @@ class OpenNebulaManager():
vm_pool.info()
except AttributeError:
logger.info('Could not connect via client, using oneadmin instead')
vm_pool = oca.VirtualMachinePool(self.oneadmin_client)
vm_pool.info(filter=-2)
try:
vm_pool = oca.VirtualMachinePool(self.oneadmin_client)
vm_pool.info(filter=-2)
except:
raise ConnectionRefusedError
except ConnectionRefusedError:
logger.info('Could not connect to host: {host} via protocol {protocol}'.format(