# Values of typedef enumeration not appearing in \*\_ns.py file

**URL:** <https://dmap-community.ductus.global/t/values-of-typedef-enumeration-not-appearing-in--ns-py-file/1427>\
**Category:** General\
**Created:** [July 25, 2017, 8:32am UTC](https://dmap-community.ductus.global/t/values-of-typedef-enumeration-not-appearing-in--ns-py-file/1427 "2017-07-25T08:32:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rick\_r](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rick\_r](https://dmap-community.ductus.global/u/rick_r)\
**Post date:** [July 25, 2017, 8:32am UTC](https://dmap-community.ductus.global/t/values-of-typedef-enumeration-not-appearing-in--ns-py-file/1427/1 "2017-07-25T08:32:29Z")

</div>

Hi,

So I I’m using confd 6.0 and I noticed a behaviour I can’t explain.

Let’s say I have a.yang and b.yang. In a.yang I define a **typedef** with an enumeration and a grouping that uses such typedef. In b.yang I simply use that grouping.

What happens is that the generated **b\_ns.py** will never contain the values defined in the enumeration unless I remove the typedef and insert the numeration directly under the type of the leaf.

On the other hand, the generated a\_ns.py file will always contain the values of the enumeration.

For instance, this won’t work:

```
typedef mytype {
    type enumeration {
        enum value1;
        enum value2;
        enum value3;
      }
}

grouping mygrouping {
    leaf myleaf {
      type mytype;
    }
}

```

While this will work:

```
grouping mygrouping {
    leaf myleaf {
       type enumeration {
           enum value1;
           enum value2;
           enum value3;
      }
    }
}

```

Is this a bug or am I missing something?

Thanks!
