# Leaf list creation

**URL:** <https://dmap-community.ductus.global/t/leaf-list-creation/991>\
**Category:** YANG\
**Created:** [February 1, 2017, 1:25pm UTC](https://dmap-community.ductus.global/t/leaf-list-creation/991 "2017-02-01T13:25:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![InbalAmram](https://avatars.discourse-cdn.com/v4/letter/i/0ea827/32.png) [@InbalAmram](https://dmap-community.ductus.global/u/InbalAmram)\
**Post date:** [February 1, 2017, 1:25pm UTC](https://dmap-community.ductus.global/t/leaf-list-creation/991/1 "2017-02-01T13:25:43Z")

</div>

Hi,

we have leaf list inside list.  
while testing we observed that no “create” call back is called, only set\_elem.

Do we suppose to get “create” for the leaf list?  
Is there a way to receive it?

thanks  
Inbal

---

<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 1, 2017, 1:30pm UTC](https://dmap-community.ductus.global/t/leaf-list-creation/991/2 "2017-02-01T13:30:43Z")

</div>

See for example:

> [@How to add the support of the leaf-list to the 5-c-stats example?](http://discuss.tail-f.com/t/how-to-add-the-support-of-the-leaf-list-to-the-5-c-stats-example/949/2):
>
> Hello, The leaf-list request is serviced via get\_elem() callback. (leaf-list is type definition of one specific leaf, The get-next() is invoked for list keys only…) The confd\_value\_t data of type C\_LIST represents this. Thus, you’ll need macros like CONFD\_SET\_LIST() / CONFD\_GET\_LIST(), CONFD\_GET\_LISTSIZE()when working with the data in C application… best regards, Joseph ps: Theoretically, if you have one of the keys of some “list” with the type leaf-list - you will of course need to build…

---

<div class="post-metadata">

**Author:** ![josephm](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@josephm](https://dmap-community.ductus.global/u/josephm)\
**Post date:** [February 1, 2017, 2:13pm UTC](https://dmap-community.ductus.global/t/leaf-list-creation/991/3 "2017-02-01T14:13:32Z")

</div>

Agree with Conny’s response.  
The linked example was written with regard to config false data provider, but the root idea stays the same:  
leaf-list is single instance entity, and get-elem()/set-elem() callbacks apply - showing/setting all it’s contents at once. It does not have/need any relation to the get-next()/create() callbacks
