Package onep :: Package interfaces :: Module InterfaceStatisticsEvent :: Class InterfaceStatisticsEvent
[frames] | no frames]

Class InterfaceStatisticsEvent


This class represents data related to statistical events detected on network interfaces.

Instance Methods
 
__init__(self, elem, event_handle, ni, param, increment, value, delta, exit_event)
Constructor of InterfaceStatisticsEvent class.
 
do_event(self, network_element)
This method specifies what action to do when a event is processed in the event queue.

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

Class Variables

Inherited from core.event.AsyncMsg.AsyncMsg: OnepAsyncMsgType

Instance Variables
NetworkElement network_element = None
The network element.
NetworkInterface interface = None
Gets the network interface on which this event occurred.
InterfaceStatisticsParameter parameter = None
Gets the parameter ID that triggered this event.
int value = 0
The incremental/decremental difference compared to the last event triggered or the absolute value of the parameter being monitored, depending on the interface statistics type specified in the registration.
int delta_value = 0
Gets the change in value.
bool is_increment = False
Indicates whether this is an increment value event.
bool is_exit_event = False
Indicates whether this event is an exist event.
int event_handle = None
A unique ID to identify which event listener should receive the event.

Inherited from core.event.EventObject.EventObject: event_type

Inherited from core.event.AsyncMsg.AsyncMsg: src_ne

Properties

Inherited from object: __class__

Method Details

__init__(self, elem, event_handle, ni, param, increment, value, delta, exit_event)
(Constructor)

 

Constructor of InterfaceStatisticsEvent class.

Parameters:
  • eventHandle - A unique ID to identify which event listener should receive the event .
  • event_type - The type of the event.
Overrides: object.__init__

do_event(self, network_element)

 

This method specifies what action to do when a event is processed in the event queue. For InterfaceStatisticsEvent, the action is invoking client's event listener.

Parameters:
  • element (NetworkElement) - The Network Element at which the event is generated.
Overrides: core.event.AsyncMsg.AsyncMsg.do_event

Instance Variable Details

value

The incremental/decremental difference compared to the last event triggered or the absolute value of the parameter being monitored, depending on the interface statistics type specified in the registration.

For example, if ONEP_INTERFACE_STATISTICS_TYPE_INCREMENT was specified in the InterfaceStatisticsFilter, the value returned will be the incremental/decremental difference.

Type:
int
Value:
0

delta_value

Gets the change in value. If the type specified in event registration was ONEP_INTERFACE_STATISTICS_TYPE_RATE, the delta_value gets the difference between the current parameter value and the sample taken at the last poll interval.

Otherwise the return value is the difference between the current parameter value and the value taken when the event last triggered.

Type:
int
Value:
0

is_increment

Indicates whether this is an increment value event. This variable is applicable only in cases where ONEP_INTERFACE_STATISTICS_TYPE_INCREMENT is specified in InterfaceStatisticsFilter criteria.
Type:
bool
Value:
False

is_exit_event

Indicates whether this event is an exist event. This event is triggered due to an exit criteria match.
Type:
bool
Value:
False