-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Hello,
I am encountering an issue when attempting to generate Python bindings using pyangbind with the --deviation flag. The command runs without errors when generating the tree output, but fails during the binding generation step.
Environment
pyang version: 2.6.1
pyangbind version: 0.8.5
Python version: 3.11.9
Operating System: Ubuntu 22.04.2 LTS
Steps to Reproduce
- Generate Tree Output:
This command runs without any errors and produces the correct tree output:
pyang -V -p ./EOS-4.22.1F -f tree --strict \
--deviation ./EOS-4.22.1F/arista-intf-deviations.yang \
--deviation ./EOS-4.22.1F/arista-intf-augments.yang \
./EOS-4.22.1F/openconfig-interfaces.yang
- Generate Python Bindings:
This command fails with errors:
pyang -V -p ./EOS-4.22.1F -f pybind --strict \
--plugindir ~/.pyang/plugins \
--deviation ./EOS-4.22.1F/arista-intf-deviations.yang \
--deviation ./EOS-4.22.1F/arista-intf-augments.yang \
-o oc-interfaces.py \
./EOS-4.22.1F/openconfig-interfaces.yang
Error Message
Here is the error message I receive when attempting to generate the bindings:
# module search path: ./EOS-4.22.1F:.:/home/ubuntu/.cache/pypoetry/virtualenvs/eos-py-lKpwrY1E-py3.11/share/yang/modules
# read ./EOS-4.22.1F/openconfig-interfaces.yang (CL)
# read EOS-4.22.1F/ietf-interfaces.yang
# read /home/ubuntu/.cache/pypoetry/virtualenvs/eos-py-lKpwrY1E-py3.11/share/yang/modules/ietf/ietf-interfaces.yang
# read EOS-4.22.1F/ietf-yang-types.yang
# read /home/ubuntu/.cache/pypoetry/virtualenvs/eos-py-lKpwrY1E-py3.11/share/yang/modules/ietf/ietf-yang-types.yang
# read EOS-4.22.1F/openconfig-yang-types.yang
# read EOS-4.22.1F/openconfig-extensions.yang
# read EOS-4.22.1F/openconfig-types.yang
# READ EOS-4.22.1F/openconfig-interfaces.yang
# read EOS-4.22.1F/openconfig-if-ethernet.yang
# read EOS-4.22.1F/iana-if-type.yang
# read /home/ubuntu/.cache/pypoetry/virtualenvs/eos-py-lKpwrY1E-py3.11/share/yang/modules/iana/iana-if-type.yang
# read EOS-4.22.1F/openconfig-if-aggregate.yang
# read EOS-4.22.1F/openconfig-if-types.yang
# read EOS-4.22.1F/openconfig-vlan.yang
# read EOS-4.22.1F/openconfig-vlan-types.yang
# read EOS-4.22.1F/openconfig-if-ip.yang
# read EOS-4.22.1F/openconfig-inet-types.yang
# read EOS-4.22.1F/openconfig-if-tunnel.yang
./EOS-4.22.1F/arista-intf-augments.yang:159: warning: node "openconfig-interfaces::type" is not found in "openconfig-vlan::config"
./EOS-4.22.1F/arista-intf-augments.yang:169: warning: node "openconfig-interfaces::type" is not found in "openconfig-vlan::config"
EOS-4.22.1F/openconfig-if-aggregate.yang:205: warning: node "openconfig-interfaces::state" is config false and is not part of the accessible tree
EOS-4.22.1F/openconfig-if-ethernet.yang:427: warning: node "openconfig-interfaces::state" is config false and is not part of the accessible tree
INFO: encountered (<pyang.error.Position object at 0x7f8917312840>, 'XPATH_NODE_NOT_FOUND1', ('openconfig-interfaces', 'type', 'openconfig-vlan', 'config'))
FATAL: pyangbind cannot build module that pyang has found errors with.
Request
I am seeking assistance in understanding why the pyangbind command fails despite no errors being reported in the tree validation step. Any insights or guidance on how to resolve this issue would be greatly appreciated.
Thank you for your help!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels