[CONTROLLER-641] Read Yang files from Local if device reported capabilities don't have the revision Created: 18/Jul/14  Updated: 17/Sep/14  Resolved: 17/Sep/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Ankit agarwal Assignee: Maros Marsalek
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Duplicate
is duplicated by CONTROLLER-793 Yang capabilities without revision sh... Resolved
External issue ID: 1393

 Description   

device reporting yang modules but without revision
In this case ODL is not even able to read local Yang files from /cache/schema folder.



 Comments   
Comment by Ankit agarwal [ 21/Jul/14 ]

Below mentioned gerrit changes can be used to fix these issues.

https://git.opendaylight.org/gerrit/#/c/9112/

https://git.opendaylight.org/gerrit/#/c/9135/

Comment by Tony Tkacik [ 21/Jul/14 ]

Hi Ankit,
would you rework your controller patch
https://git.opendaylight.org/gerrit/#/c/9135/
to not require this change in YANGTools?

Would you abandon your YANGTools patch
https://git.opendaylight.org/gerrit/#/c/9112/
since it starts allowing Null values in places, where they were not allowed
and has potential to introduce NPE based regression at various places (parser, codecs...).

Comment by Ankit agarwal [ 24/Jul/14 ]

Hi Tony,

I have submitted a new patch on

https://git.opendaylight.org/gerrit/#/c/9135/
and

https://git.opendaylight.org/gerrit/#/c/9112/
But both the changes are required to fix the Bug.

In 9112 now only YangModelDependencyInfo class has changes which is a caller for the parsing method.

Comment by Kent Watsen [ 03/Sep/14 ]

Regarding this bug, there is plenty of evidence in RFC 6020 that the first revision of a YANG module does not need to have a "revision" statement, and hence not needed in the <hello> message, but section 5.6.4.1 says:

"A server MUST advertise all revisions of all modules it implements."

Which seems contradictory. Discussing with the NETMOD WG, it is agreed that the sentence should have been written:

"A server MUST advertise all known revisions of all modules it implements."

Thus providing the necessary leeway.

FWIW, the only time it is envisioned a YANG module not wanting to have an initial revision date is when the module itself is already version-specific (e.g., http://xml.juniper.net/netconf/junos/14.2R2.4), which clearly will have one and only one revision. In all other cases, it seems the module is expected to be versioned over time and therefore SHOULD have a revision statement. For this reason, the NETMOD WG may also add a clarifying statement into section 7.1.9.

Thanks,
Kent

Generated at Wed Feb 07 19:53:31 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.