Replies: 1 comment 1 reply
-
Technically, not much if anything at all prevents you from generating two distinct sets of Java packages using the But that is obviously not convenient and scalable, proper solution would require some refactoring around the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
I am using JNC in a java project where I need to connect to devices with different versions. One of the device supports "http://openconfig.net/yang/interfaces" with revision "2016-05-26" and another device supports "http://openconfig.net/yang/interfaces" with revision "2019-11-19" . Currently I see only one version we can enable for Yang Parser in JNC for a namespace. Hence what I can only do is use the latest revision and work . This will work most of time since in general yang models are backward compatible. But problem comes when some of the yang models are not backward compatible . In this I think JNC will map only known fields to YangElement. This will force to use Element class.
Can we have some some solution to this in JNC? something like we can keep the generated java for all revisions and provide a way to set the revision in YangElement ? - setPackage(String ns, String pkg, String revision) . And when we connect to device using capabilities it can be associated with respective packages. Anyone think this is doable thing ? Or any other suggestion ?
Thanks,
Ashok
Beta Was this translation helpful? Give feedback.
All reactions