ServerConfig#
- class cegalprizm.hub.ServerConfig#
The global Hub Server configuration for communicating with a Cegal Hub Server. This is used primarily with ConnectionParameters objects. When a ConnectionParameters object is created but no values are provided, the ConnectionParameters object will rely on the ClientConfig and ServerConfig global configurations for defaults.
Functions
__init__
()get_host
()Get the host address of a Cegal Hub Server.
Get the URL of the Cegal Keystone Secure Token Server.
get_port
()Gets the port on which to talk to a Cegal Hub Server.
Get whether or not to use Transport level Security (TLS) when talking to a Cegal Hub Server.
set_host
(host)Update the host address of the Cegal Hub Server
set_keystone_url
(url)Update the URL for the Cegal Keystone Secure Token Server.
set_port
(port)Update the port on which to talk to a Cegal Hub Server.
set_use_tls
(use_tls)Set whether or not to use Transport Level Security (TLS) when talking to a Cegal Hub Server
- static get_host()#
Get the host address of a Cegal Hub Server. By default it will look for an environment variable called CEGAL_HUB_HOST
- Returns
The address of the Cegal Hub Server.
- Return type
[str]
- static get_keystone_url()#
Get the URL of the Cegal Keystone Secure Token Server.
- Returns
The URL of the Cegal Keystone Secure Token Server.
- Return type
[str]
- static get_port()#
Gets the port on which to talk to a Cegal Hub Server. By default it will look for an environment variable called CEGAL_HUB_PORT
- Returns
The port on which to talk to a Cegal Hub Server.
- Return type
[int]
- static get_use_tls()#
Get whether or not to use Transport level Security (TLS) when talking to a Cegal Hub Server. By default it will look for an environment variable called CEGAL_HUB_USE_TLS
- Returns
True if using TLS, False otherwise.
- Return type
[bool]
- static set_host(host: str)#
Update the host address of the Cegal Hub Server
- Parameters
host (str) – The host address of the Cegal Hub Server
- static set_keystone_url(url: str)#
Update the URL for the Cegal Keystone Secure Token Server. Typically only used by Cegal development teams.
- Parameters
url (str) – The URL to the Cegal Keystone Secure Token Server.
- static set_port(port: int)#
Update the port on which to talk to a Cegal Hub Server.
- Parameters
port (int) – The port to talk to a Cegal Hub Server.
- static set_use_tls(use_tls: bool)#
Set whether or not to use Transport Level Security (TLS) when talking to a Cegal Hub Server
- Parameters
use_tls (bool) – True if using TLS, False otherwise.