You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


References

https://jira.onap.org/browse/CPS-1586

https://jira.onap.org/browse/CPS-358

Add support for persisting of top level list nodes

Issues & Decisions

#

ISSUES

Description

DECISIONS

1

Persisting list elements as a top level node creates multiple list nodes .

 

 


creating top level node with multiple list nodes are not persisted appropriately. For example, below is request payload with actual and expected responses. 

request payload
{
  "bookstores":[
    {
      "bookstore-name": "Books"
    },
    {
      "bookstore-name": "Stories"
    }
  ]
}
actual datanode
[
  {
    "book-store:bookstores": {
      "bookstore-name": "Books"
    }
  },
  {
    "book-store:bookstores": {
      "bookstore-name": "Stories"
    }
  }
]
expected data node
"book-store:bookstores": [
    {"bookstore-name":"Books"},
    {"bookstore-name":"Stores"}
]

list is not a container and hence top-level list nodes are stored as collection of data node. it is same behavior for leaf list data node. 

2Adding a list element to a root list node does not add element in parent list but in child list element (Add list element API). 

By using add list element(s) API, when added an element to root level list node, data node is added to child node not to parent list node. details are provided  CPS-1586 - Getting issue details... STATUS

For top level list nodes when new elements are added to root list nodes, first element in the root list nodes treated as parent node. so we need to change logic to store list nodes. 








  • No labels