-
Story
-
Resolution: Done
-
Medium
-
None
Implement the functionality to support multiple nodes replacement using data fragment with list-node as a root element.
replacing one or more list elements that already may exists (same-key). Al old element that are not in the new payload will be deleted
Data JSON example:
// references test-tree.yang (see cps-service test) { "branch": [ { "name": "one"}, { "name": "two"} ] }
A/C
REST layer (incl. openapi update)
- uri:
- (CPS) PATCH /dataspaces/{dataspaceName}/anchor/{anchorName}/list-node
-
(NCMP) PATCH /cm-handle/{cmHandle}/list-node(NCMP REST interface not final might change later)
- parameters:
-
- xpath - parent node xpath (mandatory)
- JSON data fragment via request body
- response 200 on success
- if empty list provided treat as validation exception
Service layer
- parse JSON string into collection of DataNode objects
Persistence layer
- extract list-node xpath identifier from data nodes provided
- find parent node by parent node xpath (throw not found exception if absent)
- remove all children matching (starting with) list-node xpath identifier
- add all provided elements to parent node
- persist
out of scope
- system will replace even if all content is identical
- is blocked by
-
CPS-358 Support parsing of list node fragment with multiple entries
- Closed
- relates to
-
CPS-360 Create list-node with one or more elements
- Closed
-
CPS-361 Delete list-node content
- Closed
-
CPS-338 Spike - Create, Update & Delete Operation for Yang List Data Nodes
- Closed
- mentioned in
-
Page Loading...