Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
6022
Description
Deviations are currently reported via the Deviation interface and can be retrieved from a Module via getDeviations().
However, not all information of the deviation can be retrieved.
For example, for the following deviation example from the RFC:
deviation /base:system/base:user/base:type {
deviate add
}
the YANG parser returns a Deviation object, in which the getDeviate() method only returns an enum
NOT_SUPPORTED("not-supported"), ADD("add"), REPLACE("replace"), DELETE("delete")
The details for the deviation (in this example, that a default is added) are not available, so systems using the YANG parser cannot use this information.
So at the very minimum all the information from the deviation statement should be made available in the parser.
Would it however also be possible to transparently update the target nodes with the deviations? i.e. in the above example, the default value of the "type" DataSchemaNode could be transparently updated, so that applications don't have to process the deviations separately.
If I understand the YANG RFC correctly, a deviation is not automatically active: you have to announce via the hello capabilities that you are using certain deviations. So probably this should be done in the same way as in the if-feature case (https://bugs.opendaylight.org/show_bug.cgi?id=4506).