Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-316

Xpath cannot be created for augmentation data node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Istanbul Release
    • Honolulu Release, Istanbul Release
    • CPS-Core
    • None

      The issue was found when working on CPS-307.

      When the data node references the augmented node the following error occurs when data persistence is requested:

      java.lang.UnsupportedOperationException: Augmentation node has no QName
      
      	at org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier$AugmentationIdentifier.getNodeType(YangInstanceIdentifier.java:936)
      	at org.onap.cps.utils.YangUtils.buildXpath(YangUtils.java:117)
      	at org.onap.cps.spi.model.DataNodeBuilder.addYangContainer(DataNodeBuilder.java:154)
      	at org.onap.cps.spi.model.DataNodeBuilder.addDataNodeFromNormalizedNode(DataNodeBuilder.java:139)
      	at org.onap.cps.spi.model.DataNodeBuilder.addYangContainer(DataNodeBuilder.java:157)
      	at org.onap.cps.spi.model.DataNodeBuilder.addDataNodeFromNormalizedNode(DataNodeBuilder.java:139)
      	at org.onap.cps.spi.model.DataNodeBuilder.addDataNodeForEachListElement(DataNodeBuilder.java:181)
      	at org.onap.cps.spi.model.DataNodeBuilder.addDataNodeFromNormalizedNode(DataNodeBuilder.java:141)
      	at org.onap.cps.spi.model.DataNodeBuilder.addYangContainer(DataNodeBuilder.java:157)
      	at org.onap.cps.spi.model.DataNodeBuilder.addDataNodeFromNormalizedNode(DataNodeBuilder.java:139)
      	at org.onap.cps.spi.model.DataNodeBuilder.buildFromNormalizedNodeTree(DataNodeBuilder.java:131)
      	at org.onap.cps.spi.model.DataNodeBuilder.build(DataNodeBuilder.java:115)
      ...
      

      Both model and data sample are taken from RFC-8345 - see attachments

      Yang resources:

      • ietf-inet-types@2013-07-15.yang
      • ietf-network@2018-02-26.yang
      • ietf-network-state@2018-02-26.yang
      • ietf-network-topology@2018-02-26.yang
      • ietf-network-topology-state@2018-02-26.yang
      • ietf-yang-types@2013-07-15.yang

      Data:

      • ietf-network-topology-sample-rfc8345.json

        1. ietf-inet-types@2013-07-15.yang
          16 kB
          rkashapov
        2. ietf-network@2018-02-26.yang
          6 kB
          rkashapov
        3. ietf-network-state@2018-02-26.yang
          5 kB
          rkashapov
        4. ietf-network-topology@2018-02-26.yang
          10 kB
          rkashapov
        5. ietf-network-topology-sample-rfc8345.json
          3 kB
          rkashapov
        6. ietf-network-topology-state@2018-02-26.yang
          9 kB
          rkashapov
        7. ietf-yang-types@2013-07-15.yang
          18 kB
          rkashapov

            rkashapov rkashapov
            rkashapov rkashapov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: