public class Group extends PoolElement
client, id, xml, xpath
Modifier | Constructor | Description |
---|---|---|
|
Group(int id,
Client client) |
Creates a new Group representation.
|
protected |
Group(org.w3c.dom.Node xmlElement,
Client client) |
Modifier and Type | Method | Description |
---|---|---|
OneResponse |
addAdmin(int uid) |
Adds a User to the Group administrators set
|
static OneResponse |
addAdmin(Client client,
int id,
int uid) |
Adds a User to the Group administrators set
|
static OneResponse |
allocate(Client client,
java.lang.String name) |
Allocates a new group in OpenNebula
|
boolean |
contains(int uid) |
Returns whether or not the user is part of this group
|
boolean |
containsAdmin(int uid) |
Returns whether or not the user is an admin of this group
|
OneResponse |
delAdmin(int uid) |
Removes a User from the Group administrators set
|
static OneResponse |
delAdmin(Client client,
int id,
int uid) |
Removes a User from the Group administrators set
|
OneResponse |
delete() |
Deletes the group from OpenNebula.
|
static OneResponse |
delete(Client client,
int id) |
Deletes a group from OpenNebula.
|
OneResponse |
info() |
Loads the xml representation of the group.
|
static OneResponse |
info(Client client,
int id) |
Retrieves the information of the given group.
|
static OneResponse |
info(Client client,
int id,
boolean decrypt) |
Retrieves the information of the given Group.
|
OneResponse |
setQuota(java.lang.String quota_template) |
Replaces the group quota template contents.
|
static OneResponse |
setQuota(Client client,
int id,
java.lang.String quota_template) |
Replaces the group quota template contents.
|
OneResponse |
update(java.lang.String new_template) |
Replaces the template contents.
|
OneResponse |
update(java.lang.String new_template,
boolean append) |
Replaces the template contents.
|
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append) |
Replaces the template contents.
|
public Group(int id, Client client)
id
- The group id.client
- XML-RPC Client.protected Group(org.w3c.dom.Node xmlElement, Client client)
PoolElement
public static OneResponse allocate(Client client, java.lang.String name)
client
- XML-RPC Client.name
- Name for the new group.public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The group id.public static OneResponse info(Client client, int id, boolean decrypt)
client
- XML-RPC Client.id
- The Group id for the Group to retrieve the information fromdecrypt
- If true decrypt sensitive attributespublic static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The group id.public static OneResponse setQuota(Client client, int id, java.lang.String quota_template)
client
- XML-RPC Client.id
- The group id of the target group we want to modify.quota_template
- New quota template contents.public static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
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 templatepublic static OneResponse addAdmin(Client client, int id, int uid)
client
- XML-RPC Client.id
- The group id of the target group we want to modify.uid
- User IDpublic static OneResponse delAdmin(Client client, int id, int uid)
client
- XML-RPC Client.id
- The group id of the target group we want to modify.uid
- User IDpublic OneResponse info()
info(Client, int)
public OneResponse delete()
delete(Client, int)
public OneResponse setQuota(java.lang.String quota_template)
quota_template
- New quota template contents.public OneResponse update(java.lang.String new_template)
new_template
- New template contentspublic OneResponse update(java.lang.String new_template, boolean append)
new_template
- New template contentsappend
- True to append new attributes instead of replace the whole templatepublic OneResponse addAdmin(int uid)
uid
- User IDpublic OneResponse delAdmin(int uid)
uid
- User IDpublic boolean contains(int uid)
uid
- The user ID.public boolean containsAdmin(int uid)
uid
- The user ID.Visit OpenNebula.org
Copyright 2002-2019 ©
OpenNebula Project, OpenNebula Systems.