Merge branch 'master' of git.opennebula.org:one

This commit is contained in:
Daniel Molina committed 2011-10-31 17:49:21 +01:00
commit da823fa657
4 files changed
+23 -6

No files matched your search

+1 -1
View File
@@ -160,7 +160,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
chtype_desc = <<-EOT.unindent
Changes the Image group
Changes the Image's type
EOT
command :chtype, chtype_desc,[:range, :imageid_list], :type do
+1 -1
View File
@@ -173,7 +173,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
end
driver = options[:driver] || OpenNebula::User::CORE
driver = options[:driver] || OpenNebula::User::CORE_AUTH
helper.create_resource(options) do |user|
user.allocate(args[0], pass, driver)
+20 -1
View File
@@ -287,6 +287,7 @@ int ImageManager::enable_image(int iid, bool to_enable)
int ImageManager::delete_image(int iid)
{
Image * img;
string source;
img = ipool->get(iid,true);
@@ -324,7 +325,25 @@ int ImageManager::delete_image(int iid)
return -1;
}
imd->rm(img->get_oid(),img->get_source());
source = img->get_source();
if (source.empty())
{
string err_str;
int rc;
rc = ipool->drop(img, err_str);
if ( rc < 0 )
{
NebulaLog::log("ImM",Log::ERROR,
"Image could not be removed from DB");
}
}
else
{
imd->rm(img->get_oid(),img->get_source());
}
img->unlock();
+1 -3
View File
@@ -223,9 +223,7 @@ void ImageManagerDriver::protocol(
{
int rc;
string tmp_error;
source = image->get_source();
rc = ipool->drop(image, tmp_error);
if ( rc < 0 )