End User Portal¶
Table of Contents
Instantiate a Services Portal object¶
-
class
cterasdk.object.Portal.
ServicesPortal
(host, port=443, https=True) Main class for Service operations on a Portal
-
__init__
(host, port=443, https=True) Parameters: - host (str) – The fully qualified domain name, hostname or an IPv4 address of the Portal
- port (int,optional) – Set a custom port number (0 - 65535), defaults to 443
- https (bool,optional) – Set to True to require HTTPS, defaults to True
-
user = ServicesPortal('chopin.ctera.com') # will use HTTPS over port 443
Warning
for any certificate related error, this library will prompt for your consent in order to proceed. to avoid the prompt, you may configure chopin-core to automatically trust the server’s certificate, using: config.http['ssl'] = 'Trust'
Logging in¶
-
ServicesPortal.
test
() Verification check to ensure the target host is a Portal.
user.test()
-
ServicesPortal.
login
(username, password) Log in
Parameters: - username (str) – User name to log in
- password (str) – User password
user.login('admin', 'G3neralZ0d!')
-
ServicesPortal.
logout
() Log out
user.logout()