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

Unable to validate new line separated key-arg nodes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 7.0.0, 5.0.8, 6.0.2, 4.0.15
    • 6.0.0, 4.0.14, 5.0.7
    • tools

      Problem with parsing list's key statement argument where nodes are separted by new line character, like in this example [1]:

      list gen-test-session-allocation {

         key "entity-name
              test-instance-name
              untagged
              pcp
              color";

       

      Error message:

      Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Invalid identifier 'entity-name
      test-instance-name
      untagged
      pcp
      color' [at vendor/ciena/ciena-sat.yang:1854:6]
      

       

      By YANG ABNF Grammar [2]:

      key-arg = node-identifier *(sep node-identifier)
      sep = 1*(WSP / line-break)

       

      By RFC6020 list's key Statement documentation [3]:

      The "key" statement, which MUST be present if the list represents
      configuration, and MAY be present otherwise, takes as an argument a
      string that specifies a space-separated list of leaf identifiers of
      this list.

       

      [1] - https://github.com/YangModels/yang/blob/master/vendor/ciena/ciena-sat.yang#L1854

      [2]https://tools.ietf.org/html/rfc6020#section-12

      [3]https://tools.ietf.org/html/rfc6020#section-7.8.2

            rovarga Robert Varga
            martinbalaz Martin Balaz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: