Home | Trees | Indices | Help |
|
---|
|
DiscoveryListener provides an interface to the application to define the action that has to be taken when ONEP Service sets are enabled or disabled. If the application wants to be notified of ONEP service set state changes in the network element, it invokes the add_discovery_listener L{NetworkElement<onep.element.NetworkElement>} API to receive notification. See L{DiscoveryEvent<onep.discovery.DiscoveryEvent>} See L{DiscoveryFilter<onep.discovery.DiscoveryFilter>} The following code shows how to define and add service set discovery listener to the network element. 1. Implement the DiscoveryListener interface: class MyDiscoveryListener(DiscoveryListener): def handle_event(e, clientData): print "Following service sets changed" + e.description + "change in state" + str(e.state) 2. Add MyDiscoveryListener instance to NetworkElement: myDiscoveryListener = MyDiscoveryListener() filter = DiscoveryFilter() networkelement.add_discovery_listener(myDiscoveryListener, filter, clientData) Warning: This Sample Code Has Not Been Verified
Instance Methods | |||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
Invoked when an event is received from the network element.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 18 09:17:27 2014 | http://epydoc.sourceforge.net |