-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
If the Yang module contains a Yang 1.1 action statement then pyang bind fails with a TypeError.
For example, running pyang bind on the ietf-routing.yang module in RFC 8349 fails as follows:
$ pyang --plugindir $PYBINDPLUGIN -f pybind -o ietf-routing.py ietf-routing.yang
Traceback (most recent call last):
File "/usr/bin/pyang", line 444, in <module>
run()
File "/usr/bin/pyang", line 413, in run
emit_obj.emit(ctx, modules, fd)
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 203, in emit
build_pybind(ctx, modules, fd)
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 419, in build_pybind
get_children(ctx, fd, children, m, m)
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 1456, in get_element
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 1456, in get_element
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 1456, in get_element
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 1456, in get_element
register_paths=register_paths,
File "/data/npw/tmp/pyangbind/pyangbind/plugin/pybind.py", line 820, in get_children
raise TypeError("unhandled keyword with children %s at %s" % (parent.keyword, parent.pos))
TypeError: unhandled keyword with children action at ietf-routing.yang:469
[This output is from running pyangbind master commit bcb1d86]
It would be preferable to ignore action statements and generate the rest of the Python code, or to support action statements in a similar fashion to RPCs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels