Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

An example of NETCONF infrastructure usage is getting and setting controllers on a device. These operations are defined in an ONOS Behaviour, in our case the NetconfControllerConfig.java, that implements ControllerConfig general behaviour. To do in the Behaviour you are creating the operations on the devices, you need the NetconfController, which you can obtain through the DriverHandler. The NetconfController instance now gives you access to all the device or a single device. Once you have the device you are interested in based upon the deviceId you can get the NetconfSession object to comunicate with the device and do operations on the physical devices, like getting the configuration in in the get controllers methods or setting a pre-built new one for the setControllers. XmlConfigParser.java offers a method to extract the wanted desired information from an XML configuration received from the device devices's XML response and another method to produce the correct XML to set one or more controller on a specific device.

...

To test locally (not on real switches) the NETCONF implementation you need the Mininet machine with of-config installed (link to mininet machine). of-config is wrapper for an openvswitch instance, that uses NETCONF protocol and translates it to OVSDB protocol in order to use that database implementation. 

...

There is much room for improvement and testing, this is only a basic skeleton of the infrastructure. The improvement should be focused on extracting the XML out of that is now encoded in the NetconfSessionImpl's methods and testing each operation. In the future the XML can be generated through YANG models.

...