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

SchemaContextUtil.findNodeInSchemaContext does not consider actions and nested notifications

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 2.0.0, 1.2.1
    • 1.2.2, 2.0.1
    • None
    • None

    Description

      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

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: