CPS-1001 : Add CPS-E-05 endpoint for 'Read data, NCMP-Operational Datastore'

CPS-1001 : Add CPS-E-05 endpoint for 'Read data, NCMP-Operational Datastore'

References:

https://lf-onap.atlassian.net/browse/CPS-1001

Overview

This user story relates to CPS-1001 Add CPS-E-05 endpoint for 'Read data, NCMP-Operational Datastore'

Redirect request to CPS-Core (Using java interface) with dataspace 'NCMP-CmHandle-Operational-Data' 

Issues/Decisions

#

Questions/Open Issues

Notes

Decision/Answer

#

Questions/Open Issues

Notes

Decision/Answer

1

Proposed Rest endpoint to read data "http://{cnmpHostName}:{ncmpPost}/ncmp/v1/ch/{cm-handle}/data/ds/ncmp-datastores:operational (Hardcoded)"

/ds is datastore

/../ncmp-datastores:operational (Hardcoded)

2

Will be using GET http methods to expose rest endpoint ?



Yes, as per current passtrough equivalent endpoints

3

What if restendpoint contains  ../options ?

Team preference: Ignore if it is there in endpoint.

[ Kieran ] NCMP cannot interpret options.  This was added for passthrough case.  Suggest to ignore 'options'

4

 Do we need to append "?xpath=/" with proposed rest endpoint to fetch root elements or should it be added while redirecting to cps core(using java interface)? 

As per original Implementation Proposal/Study

Use "?resourceIdentifier=/" that would be mapped to xpath.

5

 Do we need to append "&include-descendants=true/false" with rest endpoint or should be added while redirecting to cps core(using java interface)?

CPS-Core does support a &include-descendants query parameter

[ Kieran ] It would be good to include this as a new parameter in the NCMP URI.  Behavior should be that the default if omitted from URI  is 'false' meaning no decendants returned in the default case.

6

Do we need to support only RootXpath or can accept xpath from endpoint to filter result ?



Support any xpath in this scope.
xpath (resourceIdentifier)  is compulsory

7

To query/redirect to cps core we need 3 or 4 attributes  how it would be mapped?



CPS Core

NCMP

Value-Mapping

dataspaceName 

datastoreName 

"ncmp-datastores:operational" →  "NFP-Operational"

anchorName 

cm-handle-id

N/A

xpath

resourceIdentifier

N/A

cpsPath

resourceIdentifier

N/A

8

If we pass topic query param with this endpoint should we use async ? 

Probably, but implement as separate user story with  different (lower) priority ?!

[ Kieran ] For now we can do this as a separate story.   @Sourabh Sourabh / @Toine Siebelink, can you raise a step/story to capture this so it is not missed.
https://lf-onap.atlassian.net/browse/CPS-1127Created 

Note : CPS Core java interface :

 public ResponseEntity<Object> getNodeByDataspaceAndAnchor(final String dataspaceName, final String anchorName, final String xpath, final Boolean includeDescendants)