For the following YANG snippet:
...
prefix mgd;
...
leaf str-leaf {
type string;
default "";
}
I would expect the following hybrid schema element:
<element name="mgd:str-leaf" nma:default="">
<data type="string"/>
</element>
instead of what currently gets generated:
<element name="mgd:str-leaf">
<data type="string"/>
</element>
If this is a bug, then I suggest you take a look at function
dsdl.leaf_stmt(self, stmt, p_elem, pset)
where a check for a default statement is made. As far as I know python treats
empty strings as False when used in boolean expressions. You should check if
the value is not None instead of just casting to boolean.
Original issue reported on code.google.com by jernej.t...@gmail.com on 19 Jan 2012 at 1:23
Original issue reported on code.google.com by
jernej.t...@gmail.com
on 19 Jan 2012 at 1:23