public class User extends PoolElement
client, id, xml, xpath
Modifier | Constructor and Description |
---|---|
|
User(int id,
Client client)
Creates a new User representation.
|
protected |
User(org.w3c.dom.Node xmlElement,
Client client) |
Modifier and Type | Method and Description |
---|---|
static OneResponse |
addgroup(Client client,
int id,
int gid)
Adds the User to a secondary group
|
OneResponse |
addgroup(int gid)
Adds the User to a secondary group
|
static OneResponse |
allocate(Client client,
java.lang.String username,
java.lang.String password)
Allocates a new user in OpenNebula.
|
static OneResponse |
allocate(Client client,
java.lang.String username,
java.lang.String password,
java.lang.String auth)
Allocates a new user in OpenNebula.
|
static OneResponse |
chauth(Client client,
int id,
java.lang.String auth,
java.lang.String password)
Changes the auth driver and the password of the given user
|
OneResponse |
chauth(java.lang.String auth)
Changes the auth driver of the given user
|
OneResponse |
chauth(java.lang.String auth,
java.lang.String password)
Changes the auth driver and the password of the given user
|
static OneResponse |
chgrp(Client client,
int id,
int gid)
Changes the main group of the given user
|
OneResponse |
chgrp(int gid)
Changes the main group of the given user
|
OneResponse |
delete()
Deletes the user from OpenNebula.
|
static OneResponse |
delete(Client client,
int id)
Deletes a user from OpenNebula.
|
static OneResponse |
delgroup(Client client,
int id,
int gid)
Removes the User from a secondary group.
|
OneResponse |
delgroup(int gid)
Removes the User from a secondary group.
|
OneResponse |
info()
Loads the xml representation of the user.
|
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given user.
|
boolean |
isEnabled()
Returns true if the user is enabled.
|
static OneResponse |
passwd(Client client,
int id,
java.lang.String password)
Changes the password for the given user.
|
OneResponse |
passwd(java.lang.String password)
Changes the password for the user.
|
static OneResponse |
setQuota(Client client,
int id,
java.lang.String quota_template)
Replaces the user quota template contents.
|
OneResponse |
setQuota(java.lang.String quota_template)
Replaces the user quota template contents.
|
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append)
Replaces the user template contents.
|
OneResponse |
update(java.lang.String new_template)
Replaces the user template contents.
|
OneResponse |
update(java.lang.String new_template,
boolean append)
Replaces the user template contents.
|
public User(int id, Client client)
id
- The user id (uid).client
- XML-RPC Client.protected User(org.w3c.dom.Node xmlElement, Client client)
PoolElement
public static OneResponse allocate(Client client, java.lang.String username, java.lang.String password)
client
- XML-RPC Client.username
- Username for the new user.password
- Password for the new userpublic static OneResponse allocate(Client client, java.lang.String username, java.lang.String password, java.lang.String auth)
client
- XML-RPC Client.username
- Username for the new user.password
- Password for the new userauth
- Auth driver for the new user.public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The user id (uid) for the user to
retrieve the information from.public static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to delete.public static OneResponse passwd(Client client, int id, java.lang.String password)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to modify.password
- The new password.public static OneResponse chgrp(Client client, int id, int gid)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to modify.gid
- The new group ID.public static OneResponse addgroup(Client client, int id, int gid)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to modify.gid
- The new group ID.public static OneResponse delgroup(Client client, int id, int gid)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to modify.gid
- The group ID.public static OneResponse chauth(Client client, int id, java.lang.String auth, java.lang.String password)
client
- XML-RPC Client.id
- The user id (uid) of the target user we want to modify.auth
- The new auth driver.password
- The new password. If it is an empty string,
the user password is not changedpublic static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
client
- XML-RPC Client.id
- The user id of the target user we want to modify.new_template
- New template contents.append
- True to append new attributes instead of replace the whole templatepublic static OneResponse setQuota(Client client, int id, java.lang.String quota_template)
client
- XML-RPC Client.id
- The user id of the target user we want to modify.quota_template
- New quota template contents.public OneResponse info()
info(Client, int)
public OneResponse delete()
delete(Client, int)
public OneResponse passwd(java.lang.String password)
password
- The new password.public OneResponse chgrp(int gid)
gid
- The new group ID.public OneResponse addgroup(int gid)
gid
- The new group ID.public OneResponse delgroup(int gid)
gid
- The group ID.public OneResponse chauth(java.lang.String auth, java.lang.String password)
auth
- The new auth driver.password
- The new password. If it is an empty string,
the user password is not changedpublic OneResponse chauth(java.lang.String auth)
auth
- The new auth driver.public OneResponse update(java.lang.String new_template)
new_template
- New template contents.public OneResponse update(java.lang.String new_template, boolean append)
new_template
- New template contents.append
- True to append new attributes instead of replace the whole templatepublic OneResponse setQuota(java.lang.String quota_template)
quota_template
- New quota template contents.public boolean isEnabled()
Visit OpenNebula.org
Copyright 2002-2013 ©
OpenNebula Project (OpenNebula.org), C12G Labs.