Package org.opennebula.client.group
Class Group
java.lang.Object
org.opennebula.client.PoolElement
org.opennebula.client.group.Group
This class represents an OpenNebula group.
It also offers static XML-RPC call wrappers.
-
Field Summary
Fields inherited from class org.opennebula.client.PoolElement
client, id, xml, xpath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAdmin
(int uid) Adds a User to the Group administrators setstatic OneResponse
Adds a User to the Group administrators setstatic OneResponse
Allocates a new group in OpenNebulaboolean
contains
(int uid) Returns whether or not the user is part of this groupboolean
containsAdmin
(int uid) Returns whether or not the user is an admin of this groupdelAdmin
(int uid) Removes a User from the Group administrators setstatic OneResponse
Removes a User from the Group administrators setdelete()
Deletes the group from OpenNebula.static OneResponse
Deletes a group from OpenNebula.info()
Loads the xml representation of the group.static OneResponse
Retrieves the information of the given group.static OneResponse
Retrieves the information of the given Group.Replaces the group quota template contents.static OneResponse
Replaces the group quota template contents.Replaces the template contents.Replaces the template contents.static OneResponse
Replaces the template contents.
-
Constructor Details
-
Group
Creates a new Group representation.- Parameters:
id
- The group id.client
- XML-RPC Client.
-
Group
- See Also:
-
-
Method Details
-
allocate
Allocates a new group in OpenNebula- Parameters:
client
- XML-RPC Client.name
- Name for the new group.- Returns:
- If successful the message contains the associated id generated for this group.
-
info
Retrieves the information of the given group.- Parameters:
client
- XML-RPC Client.id
- The group id.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
info
Retrieves the information of the given Group.- Parameters:
client
- XML-RPC Client.id
- The Group id for the Group to retrieve the information fromdecrypt
- If true decrypt sensitive attributes- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
Deletes a group from OpenNebula.- Parameters:
client
- XML-RPC Client.id
- The group id.- Returns:
- A encapsulated response.
-
setQuota
Replaces the group quota template contents.- Parameters:
client
- XML-RPC Client.id
- The group id of the target group we want to modify.quota_template
- New quota template contents.- Returns:
- If successful the message contains the group id.
-
update
Replaces the template contents.- Parameters:
client
- XML-RPC Client.id
- The group id of the target group we want to modify.new_template
- New template contentsappend
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the group id.
-
addAdmin
Adds a User to the Group administrators set- Parameters:
client
- XML-RPC Client.id
- The group id of the target group we want to modify.uid
- User ID- Returns:
- If successful the message contains the group id.
-
delAdmin
Removes a User from the Group administrators set- Parameters:
client
- XML-RPC Client.id
- The group id of the target group we want to modify.uid
- User ID- Returns:
- If successful the message contains the group id.
-
info
Loads the xml representation of the group. The info is also stored internally.- See Also:
-
delete
Deletes the group from OpenNebula.- See Also:
-
setQuota
Replaces the group quota template contents.- Parameters:
quota_template
- New quota template contents.- Returns:
- If successful the message contains the group id.
-
update
Replaces the template contents.- Parameters:
new_template
- New template contents- Returns:
- If successful the message contains the group id.
-
update
Replaces the template contents.- Parameters:
new_template
- New template contentsappend
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the group id.
-
addAdmin
Adds a User to the Group administrators set- Parameters:
uid
- User ID- Returns:
- If successful the message contains the group id.
-
delAdmin
Removes a User from the Group administrators set- Parameters:
uid
- User ID- Returns:
- If successful the message contains the group id.
-
contains
public boolean contains(int uid) Returns whether or not the user is part of this group- Parameters:
uid
- The user ID.- Returns:
- Whether or not the user is part of this group.
-
containsAdmin
public boolean containsAdmin(int uid) Returns whether or not the user is an admin of this group- Parameters:
uid
- The user ID.- Returns:
- Whether or not the user is an admin of this group
-