1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

B #1666: Return -1 if the app has no vmtemplate associated

This commit is contained in:
Alejandro Huertas Herrero 2019-03-21 11:52:51 +01:00 committed by Ruben S. Montero
parent 0789815de0
commit 7d71609dfd

View File

@ -297,7 +297,7 @@ module OpenNebula
# @return [Integer, OpenNebula::Error] template id or error
# TODO this method needs to be extended to support [image_ids]
def create_vmtemplate(options, image_id = nil)
return if self['TEMPLATE/VMTEMPLATE64'].nil?
return -1 if self['TEMPLATE/VMTEMPLATE64'].nil?
tmpl = Base64.decode64(self['TEMPLATE/VMTEMPLATE64'])