cterasdk.core.users module¶
-
class
cterasdk.core.users.
Users
(portal)¶ Bases:
cterasdk.core.base_command.BaseCommand
Portal User Management APIs
-
add
(name, email, first_name, last_name, password, role, company=None, comment=None)¶ Add a portal user
Parameters: - name (str) – User name for the new user
- email (str) – E-mail address of the new user
- first_name (str) – The first name of the new user
- last_name (str) – The last name of the new user
- password (str) – Password for the new user
- role (cterasdk.core.enum.Role) – User role of the new user
- company (str,optional) – The name of the company of the new user, defaults to None
- comment (str,optional) – Additional comment for the new user, defaults to None
-
delete
(name)¶ Delete an existing user
Parameters: name (str) – The user name to delete
-
get
(user_account, include=None)¶ Get a user account
Parameters: - user_account (cterasdk.core.types.UserAccount) – User account, including the user directory and user name
- include (list[str]) – List of fields to retrieve, defaults to [‘name’]
Returns: The user account, including the requested fields
-
list_domain_users
(domain, include=None)¶ List all the users in the domain
Parameters: include (list[str]) – List of fields to retrieve, defaults to [‘name’] Returns: Iterator for all the domain users Return type: cterasdk.lib.iterator.Iterator
-
list_domains
()¶ List all domains
Return list: List of all domains
-
list_local_users
(include=None)¶ List all local users
Parameters: include (list[str]) – List of fields to retrieve, defaults to [‘name’] Returns: Iterator for all local users Return type: cterasdk.lib.iterator.Iterator
-