Package onep :: Package element :: Module NetworkApplication :: Class NetworkApplication
[frames] | no frames]

Class NetworkApplication


NetworkApplication represents the network services consumer delegate and is the owner of onePK application-level property settings and statistics. Only one such instance exists (singleton instance). It is used to instantiate NetworkElements and keeps the collection of NetworkElements instantiated from it.

Instance Methods
 
create_network_element(self, address)
Instantiates a new NetworkElement.
 
get_network_element(self, elementAddress)
Gets an instance of the NetworkElement addressed by the elementAddress

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
get_instance(cls)
Gets the instance of the NetworkApplication singleton class.
Class Variables
  DEFAULT_RDWR_TIMEOUT = 180
Default Socket Read/Write timeout (seconds) This is only used for the API channel.
  instance_ = None
Default ROOT Certification file for TSL connection
  DEFAULT_ROOT_CA_CERTS = './nerootca.pem'
Properties
  name

Inherited from object: __class__

Method Details

get_instance(cls)
Class Method

 

Gets the instance of the NetworkApplication singleton class.

Returns:
The instance of the NetworkApplication singleton class.

create_network_element(self, address)

 

Instantiates a new NetworkElement.

Parameters:
  • address - Address of the NetworkElement
Returns:
The NetworkElement object.

get_network_element(self, elementAddress)

 

Gets an instance of the NetworkElement addressed by the elementAddress

Gets an instance of the NetworkElement addressed by the elementAddress, which is represented in the InetAddress format.

Instantiates a network element addressed by the elementAddress in the InetAddress format, if it does not exist yet. NetworkApplication can have only one session (connection) to a network element. If it exists already, the existing instance is returned. The newly instantiated network_element is in the initial DISCONNECTED state. Use NetworkElement connect() API to connect to the network element.

Parameters:
  • elementAddress - The element IP address
Returns:
An instance of the NetworkElement.
Raises:

Class Variable Details

DEFAULT_RDWR_TIMEOUT

Default Socket Read/Write timeout (seconds) This is only used for the API channel. Event channel does not have timeouts. This timeout prevents IDL calls from blocking if the connection is down.

Value:
180

Property Details

name

Get Method:
_get_name(self)
Set Method:
_set_name(self, name)