Details
-
Bug
-
Status: Resolved
-
Medium
-
Resolution: Won't Do
-
2.0.11, 2.1.6
-
None
-
None
Description
This is on release 2.0.11.
When parsing the attached model, the following error occurs:
Caused by: org.opendaylight.yangtools.yang.parser.spi.meta.InvalidSubstatementException: MIN_ELEMENTS is not valid for DEVIATE. Error in module testdev (QNameModule
{ns=[http://example.com/testdev], rev=2018-08-14}) [at /home/verthezp/local/logs/deviate/testdev.yang:13:4]
at org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator.validate(SubstatementValidator.java:136)
at org.opendaylight.yangtools.yang.parser.rfc7950.stmt.deviate.AbstractDeviateStatementSupport.onFullDefinitionDeclared(AbstractDeviateStatementSupport.java:129)
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementDefinitionContext.onDeclarationFinished(StatementDefinitionContext.java:80)
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.endDeclared(StatementContextBase.java:578)
Apparently the yang parser does not accept the min-elements statement in deviate delete (in deviate add and deviate replace it works fine). According to the RFC this seems to be a valid statement there, as long as it matches exactly what is in the target node of the deviation.
This occurs both on yang 1.0 and yang 1.1.