Showing results for 
Search instead for 
Did you mean: 

YDK Dynamic API


Hi, I am new to ydk. I got good understanding of ydk (9) NANOG 68 Ok We Got YANG Data Models Now What - YouTube. In the presentation (dated back in 2016) , it was mentioned "dynamic API generation" as an up coming feature. I could not find related documentation? Is it available? ydk approach as I understood is programmatic, end of the day your program has to make use of generated class hierarchy. But when yang models change or there are new yang models are introduced, it requires code-build-deploy cycle. Is there any approach with ydk where u can drop in yang model, get & edit config operations are available without coding?!!! Avoid code-build-deploy cycle. Something like yang suite does?

1 Reply 1

Rising star
Rising star

Hi @podilam

I started working on YDK in 2017 and in my development did not hear about "dynamic API generation". It is possible that in early development there were some plans to do thins feature, but it has never got to actual implementation. And the reason is that following YDK releases (starting from 0.6.0) used libyang library to build internal view of the model from YANG models directly. The data models then built using Path API, which does not require pregenerated model API. I suggest you to read this YDK documentation to get familiar with Path API, and browse the unit tests for examples.

Although Path API method does not require pregenerated model API, it is still require knowledge of the YANG model that you are about to use in your application. Luckily some models like IETF, OpenConfig and Tail-f are very stable and actually preferred to be used by external users. Hence the programmatic way of monitoring and controlling the devices getting momentum.

The Yang Suit seems very convenient tool to build and execute RPCs with use of Netconf protocol. This could be helpful for issuing single RPCs, but it does not have programmatic approach that YDK is offers. Please correct me, if I am wrong. The YDK can be easily used in the way the YangSuite is working. You just need to have user defined XML payload and then build and issue RPC using YDK Executor Service. Examples of this approach you can find here.

I also wanted to mention Cisco developed ATOM tool, which dynamically learns the generated API and builds RPCs for testing XR devices. That is unique tool, which programmatically tests the devices without changing the core program, something that you are looking for.

Yan Gorelik
YDK Solutions
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: