Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-300

Binding V1 fails when action input is augmented

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Fluorine
    • Nitrogen SR1, Carbon SR2
    • Binding codegen
    • None

      Yangtools fails to parse following augmentation present in
      ietf-mpls@2017-07-02.yang:

      augment
      "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input"

      { description "This augment adds the input parameter of the 'active-route' action."; uses nhlfe-contents; }

      augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
      + "rt:output/rt:route"

      { description "This augment adds the destination prefix to the reply of the 'active-route' action."; uses nhlfe-contents; }

      where active-route is defined as(ietf-routing@2016-08-18.yang):

      action active-route {
      description
      "Return the active RIB route that is used for the
      destination address.

      Address family specific modules MUST augment input
      parameters with a leaf named 'destination-address'.";
      output {

      container route {
      description
      "The active RIB route for the specified destination.

      If no route exists in the RIB for the destination
      address, no output is returned.

      Address family specific modules MUST augment this
      container with appropriate route contents.";
      container next-hop

      { description "Route's next-hop attribute."; uses next-hop-state-content; }

      uses route-metadata;
      }
      }
      }

      with following exception:
      [ERROR] Failed to parse YANG from source SourceSpecificContext [source=META-INF/yang/ietf-mpls@2017-07-02.yang, current=EFFECTIVE_MODEL, finished=FULL_DECLARATION]: Augment target 'Absolute

      {path=[(urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)routing-state, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)ribs, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)rib, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)active-route, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)input]}

      ' not found [at META-INF/yang/ietf-mpls@2017-07-02.yang:366:2]
      [ERROR] yang-to-sources: Unable to parse yang files from /home/m/hc2vpp/mpls/api/src/main/yang
      org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedException: Some of EFFECTIVE_MODEL modifiers for statements were not resolved.
      [...]
      Caused by: org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Augment target 'Absolute

      {path=[(urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)routing-state, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)ribs, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)rib, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)active-route, (urn:ietf:params:xml:ns:yang:ietf-routing?revision=2016-08-18)input]}

      ' not found [at META-INF/yang/ietf-mpls@2017-07-02.yang:366:2]
      at org.opendaylight.yangtools.yang.parser.stmt.rfc6020.AugmentStatementImpl$Definition$1.prerequisiteFailed(AugmentStatementImpl.java:187)
      at org.opendaylight.yangtools.yang.parser.stmt.reactor.ModifierImpl.failModifier(ModifierImpl.java:87)
      at org.opendaylight.yangtools.yang.parser.stmt.reactor.SourceSpecificContext.failModifiers(SourceSpecificContext.java:341)
      ... 35 more

            rovarga Robert Varga
            mgradzki Marek Gradzki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: