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

InstanceIdentifier does not properly capture choice-case child relationship

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Fluorine
    • None
    • None
    • Operating System: Linux
      Platform: PC

      yang model:

      augment "<path>tables/routes" {
      case linkstate-routes-case {
      container linkstate-routes {
      list linkstate-route {
      ...
      }

      Works fine with InstanceIdentifier constructed like this:

      iid = InstanceIdentifier.create(..).child(Tables.class, new TablesKey(..))
      .child(LinkstateRoutes.class).child(LinkstateRoute.class, new LinkstateRouteKey(this.linkNlri));

      But when the container is moved to grouping:

      grouping linkstate-routes {
      container linkstate-routes {
      list linkstate-route

      { .... }

      }

      augment "<path>tables/routes" {
      case linkstate-routes-case {
      uses linkstate-routes;
      }

      The instance identifier gives following compilation error:

      Bound mismatch: The generic method child(Class<N>) of type InstanceIdentifier<T> is not applicable for the arguments (Class<LinkstateRoutes>). The inferred type LinkstateRoutes is not a valid substitute for the bounded parameter <N extends ChildOf<? super Tables>>

            rovarga Robert Varga
            dkutenicsova Dana Kutenicsova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: