Package onep :: Package cdp :: Module CDPEvent :: Class CDPEvent
[frames] | no frames]

Class CDPEvent


An event which indicates that a CDP event occurred in a Network Element.

A CDP event occurs when the neighbor is connected or disconnected, or its capabilities are updated on the neighbor.

Instance Methods
 
__init__(self, sourceNE, eventHandle, ni, notifyType, deviceId, holdTime, mgmtDomain, platform, version, capabilities, inetAddr, neighborIntfName)
Constructor - used internally
 
do_event(self, ne)
This method specifies what action to do when an event is processed.

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

Class Variables
  CDPEventNotifyType = enum(ONEP_CDP_ADD= 1, ONEP_CDP_UPDATE= 2,...
  log = None

Inherited from core.event.AsyncMsg.AsyncMsg: OnepAsyncMsgType

Instance Variables

Inherited from core.event.EventObject.EventObject: event_handle, event_type

Inherited from core.event.AsyncMsg.AsyncMsg: src_ne

Properties

Inherited from object: __class__

Method Details

__init__(self, sourceNE, eventHandle, ni, notifyType, deviceId, holdTime, mgmtDomain, platform, version, capabilities, inetAddr, neighborIntfName)
(Constructor)

 

Constructor - used internally

Parameters:
  • event_handle (int) - Registered event identifier.
  • intf (NetworkInterface) - Interface on which the CDP event was received
  • notify_type (int) - CDP notification type add/update/delete
  • device_id (int) - Device ID from which the CDP event was received
  • hold_time (int) - CDP event hold time associated with this event
  • mgmt_domain (str) - VTP management domain of the neighbor interface that caused this CDP
  • platform (str) - Platform type of the neighbor that caused this CDP event
  • version (str) - OS version running on the neighbor that caused this CDP event
  • capabilities (PolicyCapabilities) - Capabilities
  • inet_addr (str) - Network address
  • neighbor_intf_name (str) - Neighbor interface name
Overrides: object.__init__

do_event(self, ne)

 

This method specifies what action to do when an event is processed.

For CDPEvent, the action is invoking the client's event listener.

Parameters:
  • ne - The source of the event. For CDPEvent, the source in an instance of NetworkElement.
Overrides: core.event.AsyncMsg.AsyncMsg.do_event

Class Variable Details

CDPEventNotifyType

Value:
enum(ONEP_CDP_ADD= 1, ONEP_CDP_UPDATE= 2, ONEP_CDP_DELETE= 3, ONEP_CDP\
_ALL= 4)