1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

feature #200: Some minor fixes

This commit is contained in:
Tino Vázquez 2010-06-28 12:17:21 +02:00
parent 7d96dc654d
commit b3466572fa
3 changed files with 16 additions and 7 deletions

View File

@ -797,7 +797,7 @@ private:
upool(_upool)
{
_signature="A:sib";
_help="Removes image attribute";
_help="Publish/Unpublish the Image";
};
~ImagePublish(){};
@ -822,7 +822,7 @@ private:
upool(_upool)
{
_signature="A:sib";
_help="Removes image attribute";
_help="Enables/Disables the Image";
};
~ImageEnable(){};

View File

@ -73,7 +73,7 @@ module OpenNebula
end
def remove_attr(name)
super(IMAGE_METHODS[:rmattr], name)
do_rm_attr(name)
end
def enable
@ -143,11 +143,20 @@ module OpenNebula
def set_publish(published)
return Error.new('ID not defined') if !@pe_id
rc = @client.call(IMAGE_METHODS[:publish], @pe_id, published)
rc = @client.call(IMAGE_METHODS[:publish], @pe_id, publish)
rc = nil if !OpenNebula.is_error?(rc)
return rc
end
def do_rm_attr(name)
return Error.new('ID not defined') if !@pe_id
rc = @client.call(IMAGE_METHODS[:rmattr], @pe_id, name)
rc = nil if !OpenNebula.is_error?(rc)
return rc
end
end
end

View File

@ -74,7 +74,7 @@ void RequestManager::ImageEnable::execute(
if ( rc < 0 )
{
goto error_remove_attribute;
goto error_enable;
}
@ -106,7 +106,7 @@ error_authorization:
" attributes, aborting call.";
goto error_common;
error_remove_attribute:
error_enable:
oss << "[ImageEnable] Cannot enable/disable image [" << iid << "]";
goto error_common;