-
Notifications
You must be signed in to change notification settings - Fork 346
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
Add pyang --schema-from-path option #524
base: master
Are you sure you want to change the base?
Conversation
I understand what this option does, but what is the use case? |
The use case is when we just want to try to fully compile a schema from every YANG module in a base directory and subdirectories. An easy example is the If there's an alternative that easily accomplishes this use case - great! I just couldn't find a simple way to do so. |
Edit: due to use_env in FileRepository, have to think about how to appropriately handle. Some of the functionality is nice having ietf types etc, but ideally only modules pulled in by "main" paths modules are actually parsed. Extraneous modules end up in the schema with current implementation. This might have a bug, getting a bunch of implicit ietf models in the output. Somewhere IETF models are automatically being pulled into the schema: |
Ok, I'll wait with this PR until you've had a chance to look at this. I think your idea of adding only modules from the explicit path and others that are pulled in makes sense. |
This option is still useful as is. There are workarounds, e.g. emptying the default directories. I'm fine with either option:
|
Option indicates that
pyang
should attempt to load all YANG within the current path instead of desiring a NETCONF hello or explicit filenames.Not certain on correctness of method of loading.