pyvcloud.vcd.role module¶
-
class
pyvcloud.vcd.role.
Role
(client, href=None, resource=None)¶ Bases:
object
-
add_rights
(rights, org)¶ Adds list of rights to a given role.
Parameters: - rights (list) – right names as a list of strings.
- org (pyvcloud.vcd.org.Org) – organization to which the role belongs.
Returns: an object containing EntityType.ROLE XML data which represents the updated role.
Return type: lxml.objectify.ObjectifiedElement
-
link
()¶ Links the role to its template.
-
list_rights
()¶ List rights associated with the role.
Returns: names of rights for a given role. Return type: list
-
remove_rights
(rights)¶ Removes list of rights from a given role.
Parameters: rights (list) – right names as a list of strings. Returns: an object containing EntityType.ROLE XML data which represents the updated role. Return type: lxml.objectify.ObjectifiedElement
-
unlink
()¶ Unlinks the role from its template.
-