oca.user

class oca.User(xml, client)

Bases: oca.pool.PoolElement

ELEMENT_NAME = 'USER'
METHODS = {'info': 'user.info', 'passwd': 'user.passwd', 'chgrp': 'user.chgrp', 'allocate': 'user.allocate', 'delete': 'user.delete'}
XML_TYPES = {'name': <type 'str'>, 'enabled': <type 'bool'>, 'gid': <type 'int'>, 'gname': <type 'str'>, 'password': <type 'str'>, 'id': <type 'int'>}
static allocate(client, user, password)

allocates a new user in OpenNebula

user
username for the new user
password
password for the new user
change_passwd(new_password)

Changes the password for the given user.

new_password
The new password
chgrp(gid)

Changes the main group

gid
New group id. Set to -1 to leave the current one
delete()

Deletes current object from the pool

info(*args)
classmethod new_with_id(client, element_id)

Retrives object which id equals `id`.

Arguments

`client`
oca.Client object.
`element_id
object id.
class oca.UserPool(client)

Bases: oca.pool.Pool

METHODS = {'info': 'userpool.info'}

Previous topic

oca.virtualnetwork

Next topic

oca.group

This Page