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:
parent
7d96dc654d
commit
b3466572fa
@ -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(){};
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user