# Issue using maapi diff iterate in tailf:validate

**URL:** <https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456>\
**Category:** CDB and CDB API\
**Created:** [August 8, 2017, 6:45am UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456 "2017-08-08T06:45:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkannadassan](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkannadassan](https://dmap-community.ductus.global/u/bkannadassan)\
**Post date:** [August 8, 2017, 6:45am UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456/1 "2017-08-08T06:45:03Z")

</div>

Hi All!

I have a model as below…

list node {  
key name;  
leafref name {  
path “/profile/access/name”  
}  
}

container profile {  
list access {  
tailf:validate vpoint {  
tailf:dependency ".’;  
}  
key name;  
leaf name {  
type string;  
}  
}  
}

With above code my expectation is validation vpoint when I call and do diff iterate I will get only those entries of this list. But I was surprised on doing load merge of the saved config it iterates through full config including the aaa authentication…

/aaa/authentication/users/user{admin} was one of the iteration element for this diff iterate. So the issue here is because its iterating the complete config we are blocked for 5 secs… Any pointers on the same would be helpful…

rgds  
Balaji Kamal Kannadassan

---

<div class="post-metadata">

**Author:** ![jhu](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jhu](https://dmap-community.ductus.global/u/jhu)\
**Post date:** [September 6, 2017, 7:19am UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456/2 "2017-09-06T07:19:32Z")

</div>

@bkannadassan, Do you find a solution? I have also this issue using when statement.

---

<div class="post-metadata">

**Author:** ![bkannadassan](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkannadassan](https://dmap-community.ductus.global/u/bkannadassan)\
**Post date:** [September 6, 2017, 10:02am UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456/3 "2017-09-06T10:02:02Z")

</div>

nope note yet jhu, as of now I am trying to tweak my application code. But It would be good if their is someway to do the same. Lets wait for some response on the same…

---

<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:** [September 6, 2017, 2:04pm UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456/4 "2017-09-06T14:04:39Z")

</div>

Hi,  
From the `confd_lib_maapi(3)` man page on `maapi_diff_iterate()`:

“The purpose of the function is to iterate through the transaction diff”

So the diff in the **transaction** is iterated.  
If you want to iterate through the changes below a specific path, see `maapi_keypath_diff_iterate()`

---

<div class="post-metadata">

**Author:** ![bkannadassan](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkannadassan](https://dmap-community.ductus.global/u/bkannadassan)\
**Post date:** [September 6, 2017, 3:49pm UTC](https://dmap-community.ductus.global/t/issue-using-maapi-diff-iterate-in-tailf-validate/1456/5 "2017-09-06T15:49:25Z")

</div>

> [@cohult](#):
>
> From the confd\_lib\_maapi(3) man page on maapi\_diff\_iterate():
> 
> “The purpose of the function is to iterate through the transaction diff”
> 
> So the diff in the transaction is iterated.If you want to iterate through the changes below a specific path, see maapi\_keypath\_diff\_iterate()

Thanks this should help, will test the same and update you…
