As explained in this draft on IETF NETCONF Monitoring , a NETCONF data model (YANG) can be used to monitor the NETCONF protocol. The monitoring data model includes information about NETCONF datastores, sessions, locks and statistics. This data facilitates the management of a NETCONF server (a NETCONF server is a device that supports NETCONF operations).
A NETCONF client can discover the data models supported by a NETCONF server and <get-schema> operation can be used to retrieve these data models.
To verify that a NETCONF Server (device) supports NETCONF Monitoring, check the hello message received from the server. The device should advertise IETF netconf monitoring capability as below:
1 |
"urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04" |
When NETCONF Monitoring is supported by the device, YANG files are downloaded from the device using <get-schema> operation to retrieve device information.
OpenDaylight & NETCONF Protocol Plug-in
With respect to OpenDaylight’s NETCONF Protocol Plug-in, it seems to work fine when the device supports IETF NETCONF Monitoring. For the cases, where device doesn’t support NETCONF Monitoring, we need to write our own YANG files representing the device and place these files in a special folder
\\odl-controller\opendaylight\distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\cache\schema
FilesystemSchemaCachingProvider.java is responsible for reading the YANG files placed in \cache\schema directory.
However, there is an existing bug due to which yang files are not read from \cache\schema directory.
Bug-628: Loading YANG files from local directory when netconf server does not support netconf monitoring
Subscribe to this question on ask.opendaylight.org to get latest updates:
Hi Kanika,
I’m using ODL’s Service Provider Ubuntu VM for testing the NETCONF client. Thus, my working directory is controller-sp/opendaylight/.
I followed your instructions on adding the YANG file into the cache/schema directory. I also looked up the above bug ‘Bug-628’, where Maros is saying in the commit message that “User can place yang files into cache/schema folder and set the capabilities for these modules into config attribute for netconf-connector.”
In which file do I add the above capabilities? and in the same post you’ve referenced your YANG file to a URI. How did you form this URI?
Regards,
Rahul Swaminathan
Hi Kanika,
I’m planning to start studying SDN technology, Could you please guide me on how should i start?
Thanks,
Abdullah
How do we write the yang module to detect device that does not have netconf-monitoring enabled?