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

Binding generator fails on resolution of augment whose path contains nodes augmented from another namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 9.0.0, 8.0.8
    • 8.0.5, 8.0.7
    • Binding codegen
    • None

      Problem occurs in mdsal-binding-generator 8.0.5.

      YANG Tools parses the whole model without problems, but the binding generator fails afterwards on this error:

      [ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:7.0.8:generate-sources (binding) on project sonic-model: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:7.0.8:generate-sources failed: Failed to find (http://openconfig.net/yang/bgp-evpn/extension?revision=2019-10-03)l2vpn-evpn as (http://openconfig.net/yang/rib/bgp?revision=2019-04-25)l2vpn-evpn in ListGenerator{argument=(http://openconfig.net/yang/rib/bgp?revision=2019-04-25)afi-safi}

      Whole stack-trace is in the attachments together with the sonic openconfig YANG modules.

      Problem is caused by this augment statement in the "openconfig-bgp-evpn-ext" YANG module (line 670):

      augment /oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/oc-netinst:rib/oc-netinst:afi-safis/oc-netinst:afi-safi/oc-bgp-evpn-ext:l2vpn-evpn/oc-bgp-evpn-ext:loc-rib/oc-bgp-evpn-ext:routes/oc-bgp-evpn-ext:route

      {     description "BGP local rib extensions for l2vpn evpn address family";     uses oc-bgp-ext:bgp-ext-attr-sets-state; }

      The problem occurs while parsing the augment target path at the "oc-bgp-evpn-ext:l2vpn-evpn" node. Nodes in the path up to "oc-netinst:protocol" are in the "openconfig-network-instance" YANG module. The next four (from "bgp" to "afi-safi" are copied to the "oc-netinst:protocol" via groupings from other modules. The oc-bgp-evpn-ext:l2vpn-evpn" node is augmented into "oc-netinst-afi-safi" from the "openconfig-bgp-evpn-ext" YANG module by another augment statement.

            rovarga Robert Varga
            ifoltin Igor Foltin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: