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

**URL:** <https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623>\
**Category:** NETCONF\
**Created:** [February 1, 2024, 7:35am UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623 "2024-02-01T07:35:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kxzyhtd](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/kxzyhtd/32/437_2.png) [@kxzyhtd](https://dmap-community.ductus.global/u/kxzyhtd)\
**Post date:** [February 1, 2024, 7:35am UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623/1 "2024-02-01T07:35:58Z")

</div>

Hi Community,

We faced one interesting issue, i recalled that some pepole ever reported the same in “[https://support.tail-f.com/](https://support.tail-f.com/)” 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.

```plaintext
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.

---

<div class="post-metadata">

**Author:** ![kxzyhtd](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/kxzyhtd/32/437_2.png) [@kxzyhtd](https://dmap-community.ductus.global/u/kxzyhtd)\
**Post date:** [February 23, 2024, 5:47am UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623/2 "2024-02-23T05:47:31Z")

</div>

No expert can answer this issue?

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [February 25, 2024, 7:25pm UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623/3 "2024-02-25T19:25:18Z")

</div>

Are you referring to a CDB subscriber notification?

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [February 26, 2024, 8:06am UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623/4 "2024-02-26T08:06:56Z")

</div>

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

```plaintext
$ confd_cmd -c 'subwait_iter "/" 0 2' &
SUBSCRIBED TO /

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

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

```

---

<div class="post-metadata">

**Author:** ![kxzyhtd](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/kxzyhtd/32/437_2.png) [@kxzyhtd](https://dmap-community.ductus.global/u/kxzyhtd)\
**Post date:** [June 26, 2024, 2:18am UTC](https://dmap-community.ductus.global/t/confd-will-not-send-notification-for-default-loading-on-parameter-which-is-controlled-by-when-rule-in-yang/4623/5 "2024-06-26T02:18:36Z")

</div>

Hi cohult,

Thanks a lot.  
I checked my confd version, it is “7.7.10”.  
Then, based on your info, that means this issue is caused by “confd version is too old”?
