NetConf notification handling
SDN-R is able to handle NetConf notification from connected NetConf Servers. To receive NetConf notifications a mountpoint object (network-topology/netconf/node) must exist in MD-SAL and its (clustered-)connection-status must be "connected".
There are in prinipal two ways to create a mountpoint within MD-SAL:
via a NetConf or RestConf message
via NetConf-Call-Home
The deviceManager component on SDN-R is listening to the connection-status changes for NetConf mountpoints. If the connection-status changes to "connected" the NetConf create-subscription message for netconf notifications is send to the NetConf-server. From now on the NetConf client service is sending NetConf notifications to SDN-R (ODL) devicemanager listener. Every listener on NetConf Notification for this NetConf-Server will trigger the specific handler to process the message.
There are two ODL Listerner interfaces used by devicemanger:
ODL Netconf Client related
After subscription of NetConf notification stream for mountPoint, using org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.NotificationsService, notifications are forwarded to the listener.
Related interface class: org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev170324.MicrowaveModelListener extends org.opendaylight.yangtools.yang.binding.NotificationListener extends java.util.EventListener
ODL MDSAL DataTree related
After regsitration of the listern, all Data Tree changes of related elements are forwarded to the listerner.
Object id for nodes is specified like this:
private static final InstanceIdentifier<Node> NETCONF_NODE_TOPO_IID = InstanceIdentifier
.create(NetworkTopology.class)
.child(Topology.class, new TopologyKey(new TopologyId(TopologyNetconf.QNAME.getLocalName())))
.child(Node.class);Related interface class: org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener<Node>
The PNF NetConf Server needs to support capabilites to provide notifications. The related YANG specs are:
<capability>urn:onf:params:xml:ns:yang:microwave-model?module=microwave-model&revision=2017-03-24&features=pure-ethernet,hybrid-microwave</capability>
<capability>urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14</capability>
Websocket (WS) based notifications, are provided by different services.
Via port 8185 the ODL MDSAL DataTree offers a WS service for changes in the DataTree, like Creation/Deletion/Change of a mountpoint.
Via port 8085 the