Closed rampolisetty closed 1 month ago
The context should be clear from the import statement for a reader, but we have been making these prefix changes as we find them for consistency across OpenConfig modules. We recently made some changes for imports of openconfig-mpls-types
, and can look at openconfig-inet
as well.
Thanks a lot for responding. So, can I assume that "import openconfig-inet-types { prefix oc-inet; }" will be consistent across all OC modules in future releases (imported with prefix oc-inet in all places)? Could you kindly share if there is any tentative ETA/release planned for this fix?
No, I don't think you should assume that -- YANG does not require this (in fact, explicitly allows locally defined prefixes.) Tooling should be able to handle a locally defined prefix that is different in different modules, and different from the prefix declared in the module being imported. From your original issue, I understood you were commenting more as a readability / consistency issue?
We'll make updates as we find issues (or folks raise them) -- for this specific one, we should be able to publish a fix in next couple of weeks (@chrisy kindly agreed to have a look).
This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.
Hi,
Any particular reason to import "import openconfig-inet-types { prefix inet; }" with "inet" prefix, in openconfig-mpls-rsvp.yang? Because same module has been imported with prefix 'oc-inet' rest everywhere. I feel it would be good to maintain Uniqueness in prefix across all OC modules for better Readability. Because in most of the places ietf-inet-types is imported with prefix 'inet', hence asking this question.
Thanks, Ram