-
Notifications
You must be signed in to change notification settings - Fork 15
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
Compatibility issues in using prefix instead of module name #72
Comments
@kot-begemot-uk I understand you are asking to keep the yang file name and the model name (what we provide as prefix) to be the same. Plz correct me. I am not sure why is this important. Can you please share the relevant information of this issue in terms of the bug template provided here: https://github.com/open-switch/opx-docs/wiki/Report-bugs |
Nope, you did not understand me correctly. The file name has nothing to do with this. The YANG RFCs and RFCs governing interoperable YANG DATA implementations 8040, 6241, etc ALWAYS qualify data elements with MODULE name to differentiate between data elements brought by different modules. The PREFIX has only local significance and only for the purposes of assembling they yang model. Example - if I import iana-if-type and call it prefix "iana" instead of "ianaift" in my model that is perfectly valid yang and will be compiled and loaded by every yang implementation out there. However, if the user after that tries to access data it will be presented as "iana-if-type":"ethernetCsmacd". Plenty of examples in RFC8040, starting with section 3.7 onwards. CPS does not follow this design assumption and assigns special meaning to the PREFIX.
This is not just a bug, it is a design issue. It is broken across the board and it will only become more broken going forward as more models are added in a manner which is not compatible with anything else out there. |
What is the problem you are reporting - Fundamental design fault |
The standard for a Yang Instance Identifier in yang data is different from the actual model data including YIN. Model grammar specifies:
[prefix:] identifier
That is fine for the model, because there is an implicit guarantee that [prefix:]identifier is locally unique and has local meaning.
Using this notation for data keys has issues for data interop.
While it is possible to map this to netconf and xml/restconf instance identifiers with the assistance of schema it will break for JSON data where the canonical form uses module-name (with optional revision qualifiers) for prefixes.
The text was updated successfully, but these errors were encountered: