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

BI to BA conversion not resolving nested nodes

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 8237

    Description

      While converting following data

      ImmutableContainerNode{
      nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:hc:data?revision=2015-01-05)cont-under-list,
      value= [
      ImmutableContainerNode {
      nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:hc:data?revision=2015-01-05)cont-under-list,
      value= [
      ImmutableLeafNode {
      nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:hc:data?revision=2015-01-05)nested-name,
      value=nestedName,
      attributes= {

      }
      }
      ],
      attributes= {

      }
      }
      ],
      attributes= {

      }
      }

      with following logic

      @Nonnull
      default Map.Entry<InstanceIdentifier<? extends DataObject>, DataObject> nodeBinding(
      @Nonnull final BindingToNormalizedNodeCodec serializer,
      @Nonnull final YangInstanceIdentifier identifier,
      @Nonnull final NormalizedNode<?, ?> data) {
      try {
      return serializer.toBinding(new AbstractMap.SimpleImmutableEntry<>(identifier, data))
      .or(() ->

      { throw new IllegalArgumentException( String.format("Unable to create node binding for %s|%s", identifier, data)); }

      );
      } catch (DeserializationException e)

      { throw new IllegalArgumentException(String.format("Unable to deserialize node %s|%s", identifier, data)); }

      }

      The resulting data looks like

      InstanceIdentifier{
      targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.data.rev150105.simple.container.simple.list.ContUnderList,
      path= [
      org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.data.rev150105.SimpleContainer,
      org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.data.rev150105.simple.container.SimpleList [
      key=SimpleListKey [
      _name=nameUnderSimpleList
      ]
      ],
      org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.data.rev150105.simple.container.simple.list.ContUnderList
      ]
      }" -> "ContUnderList{ // here should be leaf as can be seen in BI data
      augmentations= {

      }
      }"

      ODL version used

      <yangtools.version>1.0.3-Boron-SR3</yangtools.version>
      <mdsal.version>2.1.3-Boron-SR3</mdsal.version>
      <mdsal.controller.version>1.4.3-Boron-SR3</mdsal.controller.version>
      <mdsalmodel.version>0.9.3-Boron-SR3</mdsalmodel.version>
      <netconf.version>1.1.3-Boron-SR3</netconf.version>
      <restconf.version>1.4.3-Boron-SR3</restconf.version>
      <salGenerator.version>0.9.3-Boron-SR3</salGenerator.version>

      Codec used org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jakubtoth-0 Jakub Toth
            jsrnicek@cisco.com Jan Srnicek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: