Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-391

Augmentations are not properly serialized from Java classes into CompositeNode

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • mdsal
    • None
    • Operating System: Mac OS
      Platform: Macintosh

    • 839

    Description

      I've added a new case to the actions in opendaylight-action-types.
      augment ".../flow-node:apply-actions/flow-node:action/flow-node:action" {
      case color-action-case {
      container color-action

      { ... }

      }
      }

      Then, I create a Flow object in Java. I use the respective builders for Instructions, ApplyAction, Action, etc.
      Then I insert a ColorAction into this Flow object.

      RuntimeGeneratedMappingServiceImpl translates this Java object for Flow into the respective CompositeNode conform.
      LazyGeneratedCodecRegistry & TransformerGenerator are used to create a codec for serializing the Flow object.

      After serializing, all the namespaces for the nested objects within the Flow object are the SAME.
      This is a representation fo the CompositeNode:
      /(urn:opendaylight:inventory?revision=2013-08-19)nodes
      /(urn:opendaylight:inventory?revision=2013-08-19)node[

      {(urn:opendaylight:inventory?revision=2013-08-19)id=openflow:-1}

      ]
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)table[

      {(urn:opendaylight:flow:inventory?revision=2013-08-19)id=0}

      ]
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)flow[

      {(urn:opendaylight:flow:inventory?revision=2013-08-19)id=-123456789}

      ]
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)instructions
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)instruction[{}]
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)apply-actions
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)action[{}]
      /(urn:opendaylight:flow:inventory?revision=2013-08-19)color-action

      Now, this CompositeNode object is supposed to be inserted into the RESTConf DB.
      SchemaAwareDataStoreAdapter fails to properly parse out the color-action CompositeNode because it has the wrong namespace.

      Attachments

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

        Activity

          People

            ammandke@cisco.com Amit Mandke
            railor33@gmail.com Alexander Fan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: