Handle updated templates

This commit is contained in:
PCoder 2020-05-25 11:10:41 +05:30
commit c1473fa374
2 changed files with 10 additions and 1 deletions

View file

@ -427,8 +427,12 @@ class OpenNebulaManager():
template_id = int(template_id)
try:
template_pool = self._get_template_pool()
if template_id in settings.UPDATED_TEMPLATES.keys():
template_id = settings.UPDATED_TEMPLATES[template_id]
return template_pool.get_by_id(template_id)
except:
except Exception as ex:
logger.debug("Template Id we are looking for : %s" % template_id)
logger.error(str(ex))
raise ConnectionRefusedError
def create_template(self, name, cores, memory, disk_size, core_price,