Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-859

Devices with certain BBF yang models cannot be accessed in Swagger.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • None
    • netconf
    • None
    • Windows or Linux machine running ODL Silicon or Phosphorus

      Netconf testtool simulator running the yang files attached. 

      This problem is seen using lighty.io 14.0 and 15.1, but also seen with OpenDayLight Silicon and Phosphorus SR1 releases as well. 

      Certain Broadband Forum Yang files cause the swagger in ODL to error. Specifically, one creates a device which contains the YANG file bbf-software-management, the device will get connected and mounted. However, the swagger will not allow access to the device, it will display a box with the following error:

      Fetch error

      Server Error http://10.184.144.176:8181/apidoc/openapi3/18/apis/mounts/5

       

      It can be recreated by simply starting ODL and adding a device (netconf testtool) which contains yang file from the Broadband forum called "bbf-software-management@21-09-17.yang"file.  There are several yang files included in this JIRA.. a netconf test tool can be created using these files to reproduce the problem. 

      The problem seems to be related to a "leaf" ref. The bbf-software-manager yang is an augmentation to ietf-hardware. Inside the model, it has the following for example:

      choice selection-criteria {
          description
          "Selects the criteria to identify which
          entry in the list 'revision' should
          be replaced.";
          case id {
              description
               "This case specifies that the action
              is to replace the entry within the
              list 'revision' with the specified
              'id'. The entry must be neither
              active nor committed.";
              leaf id {
                  type leafref

      Unknown macro: {                path "../../../../../../../bbf-swm}

              must "../../../../../../../bbf-swm:revisions/bbf-swm:revision[bbf-          
            ....

       The leaf "id" here is a leafref. ODL cannot decipher this path - or fails to do so. Directly after this there is also an "alias leaf with the same issue. The paths for these seem to be correct.  A work around for this is to change the BBF yang to use the define that the path refers to .. that fixes the issue. 

      For example doing this instead... 

      leaf id {
           type uint8;

      ....

       

       

       

            rovarga Robert Varga
            rmagaldi Robert Magaldi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: