ConfD User Community

Confd with Netconf

Hi Team,

I am new to confd. Could you please explain how i can use confd as netconf server.

I am able to install confd and running confd.

From remote machine i am able to connect the confd netconf server and when i am able to do edit config on the candidate DB.

Below are my Questions and need your inputs
i am planning to add new yang file and able to store the yang file in yang directory and .fxs file in confd directory.

how to generate the corresponding C code to apply the config and in which location i have to copy the source code.

I tried understanding the examples, but not able to get clear idea.

Please do provide your inputs on things that we need to take care for adding new yang and applying the yang config on the device.

Thanks a lot for your help in advance.

Thanks,
Anki

ConfD provides a programmatic model rather than a code generation model. The need for code generation is low in the case of ConfD’s model driven approach. The auto-generated code portion as provided by some of the frameworks are already being provided by ConfD in its core engine.

This means that ConfD takes the compiled YANG model and automatically generate northbound interfaces and data base schemas for the data model. Your application then interact with configuration and operational state data through a powerful set of APIs which allows you to read and subscribe to changes of configuration data from CDB.

The best way to start learning how this works is to study Chapter 5. CDB - The ConfD XML Database in the Users Guide (especially Section 5.13. The full dhcpd example) and the intro/1-2-3-start-query-model example (the accompanying example code).

On a high level, what is going on in that example is:

  • Initialize the confd library
  • Create the socket used to subscribe for configuration changes from CDB
  • Set up a subscription for configuration changes to your YANG model
  • Read the initial configuration
  • Enter an infinite loop and wait for ConfD to notify you of changes and, when a change happens read the updated data from CDB

I am new in Confd and I want to set up confd and start the confd netconf server
please anyone help me to do this and please shere me all the process.

The ConfD Kick Start Guide is a good place to start. See Chapter 1 “GETTING STARTED WITH ConfD”


In the examples.confd/1-2-3-start-query-model example that is referred to from that chapter, take a look at the README file for NETCONF command guidance.

That covers your request, the below is a bonus:

The next example and README file to take a look at is the examples.confd/netconf_confirmed_commit. This transactions WP is a good companion: https://info.tail-f.com/managing-distributed-systems-using-netconf-and-restconf

Next, the main source of best practices is the YANG and NETCONF RFCs. Know them in your sleep and you are in a good place.

You would likely benefit from learning a bit of background too, e.g. why NETCONF & YANG is essential and the reason why the Tail-f company was founded in 2003 and why ConfD (2004) and NSO (2012) was developed.