Home | Trees | Indices | Help |
|
---|
|
SessionConfig contains the configuration that will be used for connecting to the network element.
SessionConfig provides a means to configure session attributes prior to connecting to a NetworkElement. The SessionConfig data is used at the NetworkElement.connect() time. On successful connection, the session attributes for that particular session can no longer be modified. However, the SessionConfig object can be modified as needed, and reused to NetworkElement.connect() to other network elements. To modify the session attributes for an active session, call NetworkElement.disconnect() and NetworkElement.connect() again passing in the modified attributes set in the SessionConfig object. If needed, the session attributes for an active session can be retrieved using the SessionHandle returned by NetworkElement.connect(). The SessionHandle holds the session attributes for an active session. The session attributes from the provided SessionConfig are copied to a SessionProperty as static property of the session.
The SessionConfig object is required only if the defaults need to be overridden. Passing a null for the SessionConfig in the connect() call will result in a TLS connection between the application and the network element using default values. See specific setter APIs for the defaults for each attribute.
Instance Methods | |||
|
|||
|
|||
Inherited from |
Class Variables | |
SessionTransportMode = enum('SOCKET', 'TLS', 'TIPC')
|
|
OnepEventDropMode = enum('ONEP_EVENT_DROP_NEW', 'ONEP_EVENT_DR
|
|
DEFAULT_TRANSPORT_MODE = 1
|
|
DEFAULT_PORT = 15002
|
|
DEFAULT_RECONNECT_TIMER = 0
|
|
DEFAULT_EVENT_QUEUE_SIZE = 200
|
|
DEFAULT_THREADPOOL_SIZE = 10
|
|
DEFAULT_EVENT_DROP_MODE = 0
|
|
DEFAULT_KEEPALIVE_IDLE_TIME = 60
|
|
MIN_KEEPALIVE_IDLE_TIME = 60
|
|
DEFAULT_KEEPALIVE_INTERVAL = 30
|
|
DEFAULT_KEEPALIVE_RETRY_COUNT = 2
|
|
MIN_STACK_SIZE = 32768
|
Instance Variables | |
str
|
ca_certs The Certification Authority certificates file location. |
str
|
certfile The client certificate file location. |
str
|
keyfile The client key file location. |
int
|
read_write_timeout Timeout of response to read or write request. |
string
|
vm_credential_file Virtual Machine credentials allowing for internal container connection. |
Properties | |
transportMode Transport type to be used for the session. |
|
reconnectTimer Reconnect timeout for the session. |
|
port Port number for the session. |
|
eventQueueSize The size of the local event queue in the range of 1 - 1000. |
|
eventThreadPool Specifies the number of dispatcher threads. |
|
eventDropMode Event drop mode type to be used for the session. |
|
keepAliveIdleTime The idle time in seconds. |
|
keepAliveInterval The interval between each retry in the unit of seconds. |
|
keepAliveRetryCount The retry count number of keepalive. |
|
thread_stack_size The thread stack size. |
|
tls_pinning_file The path of the pinning file to use. |
|
tls_unverified_element_handler The handler to use. |
|
Inherited from |
Method Details |
Constructor Keyword argument: transport Transport type to be used for the session. If the value is null, the default transport type will be used. The default transport is SessionTransportMode.TLS.
|
Sets the parameters for TLS pinning. Pinning is the process by which certain hosts can be whitelisted for TLS verification. If the presented certificate matches the known certificate for that host in the pinning file, that connection proceeds even if the certificate fails the customary TLS verification. Using a handler for unverified TLS hosts, an application may present a fingerprint of the unknown host to a user for manual verification.
|
Class Variable Details |
OnepEventDropMode
|
Instance Variable Details |
read_write_timeoutTimeout of response to read or write request. Default is 180 seconds
|
vm_credential_fileVirtual Machine credentials allowing for internal container connection. Credentials created from local file in container or constructed by container service set. Default "/cisco/onep/info.data"
|
Property Details |
transportModeTransport type to be used for the session. If the value is None, the default transport type will be used. The default transport is SessionConfig.SessionTransportMode.TLS
|
reconnectTimerReconnect timeout for the session. If the value is less than or equal to 0, there will be no timeout for reconnect.
|
portPort number for the session. If the value is equal to or less than 0, the default port will be used which is OnepConstants.ONEP_TLS_PORT |
eventQueueSizeThe size of the local event queue in the range of 1 - 1000. If the value is out of range, the default value 200 is used.
|
eventThreadPoolSpecifies the number of dispatcher threads. Any positive integer is allowed for the thread count. If the value equals or less than 0, the default value 10 is used. The upper bound for the thread pool depends on the following factors: 1. Available memory on the system where the application runs 2. The expected number of network elements that the application connects to. A separate thread pool is created for every connected NetworkElement object. 3. The expected rate of incoming events and the event queue size that the threads will service.
|
eventDropModeEvent drop mode type to be used for the session. If the value is null, the default will be SessionConfig.OnepEventDropMode.ONEP_EVENT_DROP_NEW. When the event queue is full, new event will be dropped by default. But if this value is set to ONEP_EVENT_DROP_OLD, oldest event in the queue is dropped to allow new event to be queued.
|
keepAliveIdleTimeThe idle time in seconds. Any value between SessionConfig.MIN_KEEPALIVE_IDLE_TIME and Integer.MAX_VALUE is allowed. If the value is out of this range, default value will be assigned. Default value is SessionConfig.DEFAULT_KEEPALIVE_IDLE_TIME seconds.
|
keepAliveIntervalThe interval between each retry in the unit of seconds. Any value between 0 and Integer.MAX_VALUE is allowed. If the value is out of this range, default value will be assigned. Default is SessionConfig.DEFAULT_KEEPALIVE_INTERVAL seconds.
|
keepAliveRetryCountThe retry count number of keepalive. Any value between 0 and Integer.MAX_VALUE is allowed. If the value is out of this range, default value SessionConfig.DEFAULT_KEEPALIVE_RETRY_COUNT will be assigned.
|
thread_stack_sizeThe thread stack size. Must be set before conneting. If set to 0, the value will be the OS default stack size. The minimum value is SessionConfig.MIN_STACK_SIZE
|
tls_pinning_fileThe path of the pinning file to use. If null, no pinning file will be used. By default, no pinning file is used.
|
tls_unverified_element_handlerThe handler to use. If null, the default action is taken which is to terminate the connection that is not verified.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 18 09:17:28 2014 | http://epydoc.sourceforge.net |