-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
Hi,
This is more like a query.
Recently we found some yang files from our product team are failing the ODL parser. And the error is "Deviation must not target the same module as the one it is defined in".
The root cause is obvious - they put some deviations in the same module they target.
But the validators they are using do not report this kind of error.
So we would like to know why ODL has this restriction? Is there any reference in RFC?
The exception is thrown in yangtools/yang/parser/rfc7950/stmt/meta/DeviationStatementSupport.java
final var targetModule = Iterables.getLast(ctx.getArgument().getNodeIdentifiers()).getModule(); if (currentModule.equals(targetModule)) { throw new InferenceException(ctx, "Deviation must not target the same module as the one it is defined in: %s", currentModule); }
Really appreciate your help.