Container is not returned by get-config although when statement is fulfilled

Hi,

We have a container in a yang file that looks like this:

           container TestA {

                when
"/test:network-element/file:parameters/file:feature/file:in-use='true'";

               uses setting;

            }

In our case, when the above when statement was
first fulfilled, confd returned the empty container. Then we
changed the config, and so the when statement was not fulfilled and the container
was deleted.
Finally, we changed configuration again so that the when statement was again fulfilled,
but the container did not reappear in the response from the confd.

Is this expected?

Well, yes and no.

No: if the when-expression is true, container TestA exist in the data model.

Yes: if something is changed so that the when-expression becomes false, the parent node (of the when-expression) is automatically deleted from the data store not merely hidden.

This means that if the when-expression again becomes true TestA will exist in the model but will not contain any of data that might previously have existed and get-config won’t have anything to return.