Open ndmitri opened 1 month ago
For safety, pyangbind
treats warnings from pyang
as errors. The only two error types that are permitted are around invalid regexp patterns, and unused imports. You can edit this here but it is likely not guaranteed that code generation will succeed.
Alternatively, you can fix the models that are being used.
on the latest EOS version after referencing all the necessary files, e.g.:
pyang -V -p ./EOS-4.32.1F -f pybind --strict \
--plugindir /home/tamas/.local/lib/python3.12/site-packages/pyangbind/plugin \
--deviation ./EOS-4.32.1F/release/openconfig/models/interfaces/arista-intf-deviations.yang \
--deviation ./EOS-4.32.1F/release/openconfig/models/interfaces/arista-intf-augments.yang \
-o oc-interfaces.py \
./EOS-4.32.1F/openconfig/public/release/models/interfaces/openconfig-interfaces.yang \
../yang_modules/ietf-interfaces.yang \
../yang_modules/ietf-yang-types.yang \
../yang_modules/iana-if-type.yang \
./EOS-4.32.1F/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang \
./EOS-4.32.1F/openconfig/public/release/models/interfaces/openconfig-if-aggregate.yang \
./EOS-4.32.1F/openconfig/public/release/models/vlan/openconfig-vlan.yang \
./EOS-4.32.1F/openconfig/public/release/models/interfaces/openconfig-if-ip.yang
we are getting FATAL: unmapped type (arista-addr-type)
, that is now a deprecated type, that you might be aware of @robshakir , is it possible to add support for that in pyangbind? or is there an easy way to bypass that error?
I haven't spent enough time root causing this, but the public models do have deprecated leaves that generate bindings just fine. It may be a matter of how this is modeled that is triggering the error.
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
Error Message
Here is the error message I receive when attempting to generate the bindings:
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!