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

null module reference in relative leafref in openconfig model with deviation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • 2.0.5
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 9214

      we're hitting a null module reference in an openconfig model (openconfig-interfaces).

      I'm seeing this in Carbon-SR1 and in Master.

      the device YANG model (openconfig-interfaces) has a deviation in IOS XR that impacts a leaf with a relative leafref in. The error we hit seems to be caused by a relative leafref.

      the deviation is:

      deviation /ocif:interfaces/ocif:interface/ocif:subinterfaces/ocif:subinterface/ocif:config/ocif:unnumbered

      { deviate not-supported; }

      that corresponds to this in the openconfig model:

      leaf unnumbered {
      type leafref

      { path "../../index"; }

      description
      "Indicates that the subinterface is unnumbered, and provides
      a reference to the subinterface that provides the IP
      address information (v4, v6 or both) for the current
      subinterface.";
      }

      logs (from master - enhanced with extra debugs) attached.

      I added these lines in the relative leafref case in method getBaseTypeForLeafRef in SchemaContextUtil.java:

      LOG.debug("parent module {}", parentModule);
      LOG.debug("schema context {}", schemaContext);
      LOG.debug("schema {}", schema);

      these lines are getting triggered and show a null parent module (resulting from the previous line):

      Module parentModule = findParentModule(schemaContext, schema);

        1. answer.json
          5 kB
        2. error.log
          38 kB
        3. hellomessage.rtf
          47 kB
        4. karaf.log
          964 kB

            giheron@cisco.com Giles Heron
            giheron@cisco.com Giles Heron
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: