Yang related Cli

162 views
Skip to first unread message

Ashwani Kumar

unread,
Jan 21, 2015, 8:28:54 AM1/21/15
to confd-us...@googlegroups.com

I am very much new in this technology

Once Yang model deployed in Confd server, How can i customize the CLI,Where i will get a C file related to Yang.

chriss

unread,
Jan 21, 2015, 12:31:10 PM1/21/15
to confd-us...@googlegroups.com
Hi Ashwani,
Based on your question I suspect you're not familiar with how ConfD implements the CLI. Once you've loaded the complied yang files into the Confd server (as .fxs files), ConfD auto-renders the CLI interface. When you say you want to "customize" I would usually  interpret this as "customize the user-facing behavior," i.e. the appearance and behavior of the CLI itself. You customize this through YANG directives and optional "CLI specs." There are other techniques as well. However, based on your second question "Where will I get a C file related to Yang" I suspect you want to know how to implement the system behavior related to the CLI.

ConfD will not produce "C files related to YANG." It won't produce code stubs, say like Net-SNMP. Instead you write a client daemon and register callbacks associated with the data objects and commands you want the system to perform. If you're just editing configuration objects and using built-in CDB database, you don't write any code - Confd does this for you. That's one of the big advantages. If you want to implement custom commands or access data outside of CDB (i.e. operational data such as status of hardware or statistical counters) then you implement callbacks. If you want the CDB data to be consumed by the system you register subscriptions. I think the best thing is to go into the examples code which comes with the Confd distribution and get a sense of how it works. Also look in the user guides.

One more thing to realize - once you implement these callbacks it will work for all northbound interfaces - CLI, webUI, REST, SNMOP, NetConf, maapi. That being said, you can still somewhat customize the look and feel of the CLI itself using tail-f yang extensions or CLI specs.

I hope this helps.
Reply all
Reply to author
Forward
0 new messages