Confd will not send notification for default loading on parameter which is controlled by 'when' rule in yang

Hi Community,

We faced one interesting issue, i recalled that some pepole ever reported the same in “” years ago but i did not find it. So, i would like to share the story here. Please share your thought. And thanks a lot for your time in advance.

In yang, we defined two leaves A and B. And we added the ‘when’ rule in yang to make ‘leaf A’ to control ‘leaf B’. More precisely, A is boolean flag and B is integer parameter with range [0, 100] and default is 5.

leaf A
        type boolean;
        default "false";
      leaf B
        when "../A= 'true'";
        type uint8{
          range "0..100";
        default "5"; 

With cmserver, we do below operation.

  1. As A is disabled originally, then B is frozen and will not show up. (A is false, and B is nothing)
  2. Now, we enable A, then B will be activated and show up, and its default value 5 will be loaded automatically on cmserver. (A is true, and B is 5)

As you see, this is normal behavior against ‘when’ logic in yang, right?
However, in #2 step above, it seems that confd only sent notification for A’s config change (false => true). But for B, notification is not triggered (from nothing to default 5.)

So why confd does not send this notification for B? We do not think that is reasonable.
Could you please check this? any comments/answer will be highly appreciated.

No expert can answer this issue?

Are you referring to a CDB subscriber notification?

A ConfD 8.0.11 CDB subscriber reading config changes using diff iterate:

$ confd_cmd -c 'subwait_iter "/" 0 2' &

$ confd_cli -u admin -C <<< "config; A true; commit"
/ /B set ( -> 5)
/ /A set (false -> true)
Commit complete.

$ confd_cli -u admin -C <<< "config; no A; commit"
/ /B deleted
/ /A set (true -> false)
Commit complete.