cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
334
Views
0
Helpful
0
Replies
Cisco Employee

Why a NETCONF Service in YDK?

ydk-logo-64.png

YDK uses an extensible set of services to allow you to act on modeled data.  So far, the apps in the ydk-py-samples repository have focused on three services:

  • Codec - Provides encode and decode methods to convert YANG validated data to and from different encodings (e.g. XML or JSON)

  • Executor - Provides a method to execute YANG-defined RPCs.

In general, YDK aims to abstract data models, encodings and protocols as much as possible.  These abstractions facilitate the implementation of network automation for both the network engineer with limited programming experience and for the seasoned developer.

So, if YDK intends to abstract YANG models, encodings and protocols, why a NETCONF service in YDK?  The reason is simple, abstractions are great when simplicity is desired.  However, in some scenarios, full protocol control is needed and you may want to have full access to the NETCONF operations. For instance, the CRUD service is insufficient if you want to implement configuration management following a strict replacement approach. Similarly, the CRUD service is insufficient if you want to manage a device in-band/in-network and want to make sure that config changes don't break access to the device.  The CRUD service gives you simplicity, the NETCONF service gives you control.  Note that both services rely on the underlying NETCONF service provider.  So, regardless of your choice of service, the service provider will take care of exchanging the proper NETCONF messages with the device.

At this point you may wonder, if there are already open source packages and libraries providing NETCONF client support, why would I use the NETCONF service in YDK?  There are multiple reasons for that. The most important one is that YDK will provide proper data validation against data models.  YDK is YANG aware.  Data validation is extremely comprehensive.  It includes type, value and multiple semantic validations.  All happening automatically.  Since the validation is local to the client, it is dramatically faster and results in more reliable, efficient and responsive automation.  In addition to validation, YDK takes care of proper encoding.  That means, no need to manipulate XML or JSON directly.  Last, YDK provides multiple language support.  You experience the same abstraction across different programming languages.

And that's why we have a NETCONF service in YDK!

Content for Community-Ad
FusionCharts will render here
This widget could not be displayed.