Enable logging custom modules

This commit is contained in:
M.Ravi 2017-11-29 06:45:09 +01:00
commit 137b45c12c
2 changed files with 65 additions and 19 deletions

View file

@ -301,12 +301,14 @@ class OpenNebulaManager():
</CONTEXT>
</TEMPLATE>
"""
vm_id = self.client.call(oca.VmTemplate.METHODS['instantiate'],
template.id,
'',
True,
vm_specs,
False)
try:
vm_id = self.client.call(
oca.VmTemplate.METHODS['instantiate'], template.id, '', True,
vm_specs, False
)
except OpenNebulaException as err:
logger.error("OpenNebulaException: {0}".format(err))
return None
self.oneadmin_client.call(
oca.VirtualMachine.METHODS['action'],