ConfD User Community

Single callpoint for multiple YANG files

Hi,

In order to implement common framework, can we have single callpoint, handling different keypaths of the YANG.

What will be consequences of such design, will it be difficult to identify the keypaths.

Note: This callpoint is used for config data, which needs to be stored in external database

Thanks,
Deepak

This is totally up to you. But as you noticed, there are disadvantages:

  1. You have to identify the keypath as the first step in the callback processing; this is not terribly difficult, but it might add some complexity.
  2. You lose any flexibility in what callbacks you implement. If you decide you need a callback get_next_object for a node A, this callback needs to be able to handle all nodes annotated with your callpoint, not just A.

You may want to consider an alternative: keep multiple callpoints, but register them in one daemon. This way you can still reuse one callback implementation for multiple nodes, but if you need the flexibility in 2., it is still available.