Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-924

Yang parser does not allow min-elements in deviate delete

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Won't Do
    • 2.0.11, 2.1.6
    • None
    • parser
    • 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.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            verthezpw Peter Verthez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: