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

OCCI support for DATABLOCKS

This commit is contained in:
Tino Vázquez 2010-11-03 12:17:05 +01:00
parent e6de7f0cee
commit 59ae65fb4d
2 changed files with 4 additions and 2 deletions

View File

@ -113,10 +113,11 @@ class CloudServer
# metadata:: Additional metadata for the file
# [return] _Image_ Newly created image object
def add_image(image, file=nil)
template = image.to_one_template
if file
if file[:tempfile]
file_path = file[:tempfile].path
template = image.to_one_template
template << "\nPATH = #{file_path}"
else
error_msg = "Image not present, aborting."
@ -127,7 +128,7 @@ class CloudServer
rc = @img_repo.create(image, template)
file[:tempfile].unlink
file[:tempfile].unlink if file
if OpenNebula.is_error?(rc)
return rc

View File

@ -1,5 +1,6 @@
require 'OpenNebula/Image'
require 'fileutils'
require 'CommandManager'
module OpenNebula