-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bits typedef unable to resolve #155
Comments
The |
Thanks for your instant response. |
I believe the correct issue is #68. Is there any way to make pyangbind ignore building code for the bits type instead of it crashing? |
It's been around 2 years for this issue, wondering if there is any ongoing work related to support of YANG built-in
|
Support for bits type added in #315 |
Hi,
I am trying to create a typedef for bits, but pyangbind is throwing error. But for other types (i.e. enum.. ) it is working fine. Am I missing anything?
Here is the file "debug-type.yang"
module debug-type {
namespace "http://example.com/debug-type";
prefix "debug-type";
typedef DEBUG_T{
type bits {
bit encode { position 0; }
bit decode { position 1; }
}
}
}
Error:
root@instance-000001a0:~/yang# pyang --plugindir $PYBINDPLUGIN -f pybind -o binding.py debug-type.yang
could not find a match for debug-type:DEBUG_T type -> [u'bits']
Traceback (most recent call last):
File "/usr/local/bin/pyang", line 455, in
run()
File "/usr/local/bin/pyang", line 424, in run
emit_obj.emit(ctx, modules, fd)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 224, in emit
build_pybind(ctx, modules, fd)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 412, in build_pybind
build_typedefs(ctx, defn['typedef'])
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 563, in build_typedefs
raise TypeError("could not resolve typedefs %s" % error_ids)
TypeError: could not resolve typedefs [u'debug-type:DEBUG_T']
The text was updated successfully, but these errors were encountered: