1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

Feature #407, #662: Change one.user.chown method name to .chgrp

This commit is contained in:
Carlos Martín 2011-06-09 17:16:53 +02:00
parent c48db468e1
commit dba0e8c1ee
3 changed files with 10 additions and 5 deletions

View File

@ -32,7 +32,7 @@ public class User extends PoolElement{
private static final String INFO = METHOD_PREFIX + "info";
private static final String DELETE = METHOD_PREFIX + "delete";
private static final String PASSWD = METHOD_PREFIX + "passwd";
private static final String CHOWN = METHOD_PREFIX + "chown";
private static final String CHGRP = METHOD_PREFIX + "chgrp";
private static final String ADDGROUP = METHOD_PREFIX + "addgroup";
private static final String DELGROUP = METHOD_PREFIX + "delgroup";
@ -124,7 +124,7 @@ public class User extends PoolElement{
*/
public static OneResponse chgrp(Client client, int id, int gid)
{
return client.call(CHOWN, id, -1, gid);
return client.call(CHGRP, id, gid);
}
/**

View File

@ -26,7 +26,7 @@ module OpenNebula
:allocate => "user.allocate",
:delete => "user.delete",
:passwd => "user.passwd",
:chown => "user.chown",
:chgrp => "user.chgrp",
:addgroup => "user.addgroup",
:delgroup => "user.delgroup"
}
@ -96,7 +96,12 @@ module OpenNebula
# gid:: _Integer_ the new group id. Set to -1 to leave the current one
# [return] nil in case of success or an Error object
def chgrp(gid)
chown(USER_METHODS[:chown], -1, gid)
return Error.new('ID not defined') if !@pe_id
rc = @client.call(USER_METHODS[:chgrp],@pe_id, gid)
rc = nil if !OpenNebula.is_error?(rc)
return rc
end
# Adds a secondary group

View File

@ -367,7 +367,7 @@ void RequestManager::register_xml_methods()
RequestManagerRegistry.addMethod("one.user.addgroup", user_add_group);
RequestManagerRegistry.addMethod("one.user.delgroup", user_del_group);
RequestManagerRegistry.addMethod("one.user.passwd", user_change_password);
RequestManagerRegistry.addMethod("one.user.chown", user_chown);
RequestManagerRegistry.addMethod("one.user.chgrp", user_chown);
RequestManagerRegistry.addMethod("one.userpool.info", userpool_info);