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

M #-: Add missing OpenNebula:: module name (#746)

This commit is contained in:
Jan Orel 2021-02-04 12:55:07 +01:00 committed by GitHub
parent d07bceef03
commit fcc73ebcdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
require 'securerandom'
# Module to decorate Template class with additional helpers not directly
# exposed through the OpenNebula XMLRPC API. The extensions include
# - mp_import helper that imports a template into a marketplace
@ -159,7 +161,7 @@ module OpenNebula::TemplateExt
NAME ="#{name}"
ORIGIN_ID ="-1\"
TYPE ="VMTEMPLATE"
VERSION ="#{VERSION}"
VERSION ="#{OpenNebula::VERSION}"
APPTEMPLATE64 ="#{Base64.strict_encode64(template_str)}"
EOT
@ -203,9 +205,9 @@ module OpenNebula::TemplateExt
def create_mp_app_template(id, name, idx = 0)
# Find image information, from ID or NAME
if id
image = Image.new_with_id(id, @client)
image = OpenNebula::Image.new_with_id(id, @client)
else
image_pool = ImagePool.new(@client)
image_pool = OpenNebula::ImagePool.new(@client)
image_pool.info
name.gsub!('"', '')
@ -227,7 +229,7 @@ module OpenNebula::TemplateExt
NAME ="#{app_name}"
ORIGIN_ID ="#{image['ID']}"
TYPE ="IMAGE"
VERSION ="#{VERSION}"
VERSION ="#{OpenNebula::VERSION}"
APPTEMPLATE64 = "#{Base64.strict_encode64(template64)}"
EOT