Create callback for subcontainer

Hi,

We have in our yang model container A and sub-container B.
When the sub container is being configured, we don’t receive the callback “create” for that since it is not a list (is a leaf). The “create” is received only to the container.
We would like to create that leaf in our external DB only when B is configured and not when A.
Is there a way to define the sub-container B, so we will receive “create” callback when it is configured, and not just set_elem?

thanks
Inbal

Please, can you paste sample of the data model and mark where callback is attached?
I’m not sure if I understand where mentioned leaf is located in the containers.

From ConfD User guide (The external database API -> 7.4. Data Callbacks):

create() - This callback creates a new list entry. In the case of the smp.yang module above, this function needs to create a new empty "server" entry. Once the entry is created, it will be populated with values through a series of calls to set_elem().

remove() - This callback needs to remove an entire list entry and all its subelements.

set_elem() - This callback sets the value of a leaf.