Skip to content
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

too many files to convert #4

Open
mjoshiNetElastic opened this issue Jan 8, 2018 · 2 comments
Open

too many files to convert #4

mjoshiNetElastic opened this issue Jan 8, 2018 · 2 comments

Comments

@mjoshiNetElastic
Copy link

Hi, I am trying to convert a set of yang files in my directory:

pyang -p yang/ -f json-schema --pliugindir /home/externals/pyang-json-schema-plugin/ yang/*
but this command is throwing "too many files to convert" error. How do I do this?

Thanks.

@cmoberg
Copy link
Owner

cmoberg commented Jan 8, 2018

Hi @mjoshiNetElastic! The plugin currently works only on a single YANG module at a time. So unless you actually need to output a set of modules at once, you could always resort to some shell trickery like:

for file in yang/*; do pyang -f json-schema --plugindir /home/externals/pyang-json-schema-plugin/ $file; done

mjoshiNetElastic added a commit to mjoshiNetElastic/pyang-json-schema-plugin that referenced this issue Apr 16, 2018
@wivory
Copy link

wivory commented Aug 25, 2021

How would this work where one file augments another? If I run the tool on the file with the top level container, it generates JSON fine, but if I run on the file that augments the container, the resulting JSON file effectively has no schema information in it. Is it possible to use this tool in this scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants