End User Portal

Instantiate a Services Portal object

class cterasdk.object.Portal.ServicesPortal(host, port=None, https=True)

Main class for Service operations on a Portal

__init__(host, port=None, 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), If not set defaults to 80 for http and 443 for https

  • https (bool,optional) – Set to True to require HTTPS, defaults to True

user = ServicesPortal('portal.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('walice', 'G3neralZ0d!')
ServicesPortal.logout()

Log out

user.logout()