# MOP subscription for Config Changes

**URL:** <https://dmap-community.ductus.global/t/mop-subscription-for-config-changes/1501>\
**Category:** CDB and CDB API\
**Created:** [August 29, 2017, 5:45pm UTC](https://dmap-community.ductus.global/t/mop-subscription-for-config-changes/1501 "2017-08-29T17:45:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prasanth](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@Prasanth](https://dmap-community.ductus.global/u/Prasanth)\
**Post date:** [August 29, 2017, 5:45pm UTC](https://dmap-community.ductus.global/t/mop-subscription-for-config-changes/1501/1 "2017-08-29T17:45:51Z")

</div>

Hello,  
I need some clarification for following use case:  
Yang example is as follows.  
List A {  
Leaf 1; (key)  
Leaf 2;

List B {  
Leaf 3; (key)  
Leaf 4;  
}  
}

In above set, i am trying to perform config delete for a list entry (B) - lets say B1. What kind of MOP subscriptions callbacks can be expected?  
a) Only MOP Deleted - List B entry?  
b) MOP Deleted - List B entry (B1) and MOP Modified - List A entry(A1). --\> B1 (List B) is sublist entry for list entry A1(List A)?

Confd Version - 4.0.7.1

Thanks,  
Prasanth.T

---

<div class="post-metadata">

**Author:** ![mnovak](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mnovak/32/183_2.png) [@mnovak](https://dmap-community.ductus.global/u/mnovak)\
**Post date:** [August 31, 2017, 8:29am UTC](https://dmap-community.ductus.global/t/mop-subscription-for-config-changes/1501/2 "2017-08-31T08:29:16Z")

</div>

Hello,

you will get both, `MOP Modified` for `List A` and then `MOP delete` for `List B`.

To illustrate, I have created small example (code can be downloaded here [https://cisco.box.com/s/29dggdzv66zqdvt8080rx78ygvyvd6u0](https://cisco.box.com/s/29dggdzv66zqdvt8080rx78ygvyvd6u0))

Yang:

```auto
list A {
    key l1;
    leaf l1 {
        type uint32;
    }
    leaf l2 {
        type uint32;
    }

    list B {
        key l3;
        leaf l3{
            type uint32;
        }
        leaf l4{
            type uint32;
        }
    }

}

```

CLI commands to create config

```nohighlight
config
A 1 l2 2 B 3 l4 4
top
commit

```

Output

```nohighlight
$ TRACE CDB_SUBSCRIPTION_EVENT --> 6
*** Config updated
TRACE CDB_SUB_ITERATE 6
Create: /tag<1312404142>{1}
Value Set: /tag<1312404142>{1}/tag<23924317> --> (1)
Value Set: /tag<1312404142>{1}/tag<544849882> --> (2)
Create: /tag<1312404142>{1}/tag<921542422>{3}
Value Set: /tag<1312404142>{1}/tag<921542422>{3}/tag<557783674> --> (3)
Value Set: /tag<1312404142>{1}/tag<921542422>{3}/tag<47702429> --> (4)
TRACE CDB_SYNC_SUB CDB_DONE_PRIORITY --> CONFD_OK

```

CLI commands to delete list B

```nohighlight
no A 1 B 3
commit

```

Output

```nohighlight
$ TRACE CDB_SUBSCRIPTION_EVENT --> 6
*** Config updated
TRACE CDB_SUB_ITERATE 6
Modified: /tag<1312404142>{1}
Delete: /tag<1312404142>{1}/tag<921542422>{3}
TRACE CDB_SYNC_SUB CDB_DONE_PRIORITY --> CONFD_OK

```
