-
Notifications
You must be signed in to change notification settings - Fork 32
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
Issue with Generating Python Bindings Using –deviation Flag #146
Comments
hi @ndmitri basically you need to do something like this get all yang files including 3rd party ones: git clone https://github.com/openconfig/public.git
cp public/release/models/*.yang yang_modules/.
cp -R public/release/models/*/*.yang yang_modules/.
cp public/third_party/ietf/*.yang yang_modules/. gen tree output: pyang -V -p ./EOS-4.32.1F -f tree --strict \
--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 \
./EOS-4.32.1F/openconfig/public/release/models/interfaces/openconfig-interfaces.yang Generate Python Bindings 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/iana-if-type.yang ../yang_modules/ietf-yang-types.yang HTH! |
I tried following your steps and for the EOS-4.32.1F release a get a different error.
Any ideas what could be wrong? Thank you! |
oh yes, it looks like I'm hitting the same, not yet sure what could be wrong, looks like similar to: robshakir/pyangbind#8
now I'm getting |
Why do you believe it is necessary to include all other files for pyangbind to work? From the logs, we can see that all other models, which are part of the imports, are loaded by pyang.
|
I don't see the same, for instance for me it cannot find the modules, if I omit the
so after adding all of them that it needed it now complains about |
I appreciate your support. Could someone on your team take a look at this issue? Thank you. |
to us it looks like this could be an issue on pyangbind, the |
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
This command runs without any errors and produces the correct tree output:
This command fails with errors:
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!
The text was updated successfully, but these errors were encountered: