pyangbind icon indicating copy to clipboard operation
pyangbind copied to clipboard

leafref which is must be integer but error as string

Open nkaliape opened this issue 6 years ago • 1 comments

In the below snippet the leaf subinterface is leafref pointing to the index which(also leafref) points to the config/index to "uint32" data type.

But the pybind class generated for this - calls this as "leafref" (string) which adds quotes and becomes string.

This breaks the YANG compliance where this data MUST be "uint32".

Note: jtox plugin works fine. Same issue is with xsl as well.

leaf subinterface type leafref path /oc-if:interfaces/oc-if:interface[oc-if:name=current()/../interface]/oc-if:subinterfaces/oc-if:subinterface/oc-if:index description Reference to a subinterface -- this requires the base interface to be specified using the interface leaf in this container. If only a reference to a base interface is requuired, this leaf should not be set.

nkaliape avatar Jul 18 '18 23:07 nkaliape

Hi,

Could you please try again with a recent / latest release of pyangbind?

JoseIgnacioTamayo avatar Feb 22 '24 21:02 JoseIgnacioTamayo