-
Story
-
Resolution: Done
-
Medium
-
None
-
None
-
None
Given a yang list of Data Nodes
under a know parent (path to parent is known) TBC
user wants to find element(s) where a leaf (attribute) has a certain value
e.g.
\ran-inventory\sliceProfilesList[{id=1, sNSSAI="a", latency=5}.
,
{id=3, sNSSAI="a", latency=6}]
the user want to find the elment in SlicePofileList taht as an sNSSAI valueof "b"
but he knows that the xPath 'starts with' \ran-inventory\sliceProfileList' ([
Solution Proposal
Filter out correct data in the Persistence layer (not in higher layers, waste of data transfer etc.)
- use query of cpsPath starting with given path (maybe even add '[')
- use json-query tools to only get the 'fragment' that contain required name-value pair
(probably need native-query annotation)
PoC: Try a hardcoded db integration test. SQL data insert would use (xpath, attributes) values like:
/ran-inventory/sliceProfilesList[@id=1], {"id": 1, "sNSSAI": "a", "latency": 5}
/ran-inventory/sliceProfilesList[@id=2], {"id": 2, "sNSSAI": "b", "latency": 6}