Try connection
This commit is contained in:
parent
dec1ccd180
commit
0353f72676
1 changed files with 5 additions and 2 deletions
|
@ -84,8 +84,11 @@ class OpenNebulaManager():
|
||||||
vm_pool.info()
|
vm_pool.info()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
logger.info('Could not connect via client, using oneadmin instead')
|
logger.info('Could not connect via client, using oneadmin instead')
|
||||||
vm_pool = oca.VirtualMachinePool(self.oneadmin_client)
|
try:
|
||||||
vm_pool.info(filter=-2)
|
vm_pool = oca.VirtualMachinePool(self.oneadmin_client)
|
||||||
|
vm_pool.info(filter=-2)
|
||||||
|
except:
|
||||||
|
raise ConnectionRefusedError
|
||||||
|
|
||||||
except ConnectionRefusedError:
|
except ConnectionRefusedError:
|
||||||
logger.info('Could not connect to host: {host} via protocol {protocol}'.format(
|
logger.info('Could not connect to host: {host} via protocol {protocol}'.format(
|
||||||
|
|
Loading…
Reference in a new issue