-
Story
-
Resolution: Unresolved
-
High
-
None
User Story
As an user, I want NCMP inventory search to support searching with a Cps Path Query so that I can find all CM-handles with a given moduleSetTag and private properties.
Details
This story is to allow NCMP inventory search to use a CpsPathQuery as a search condition.
Affected endpoints:
- POST /ncmpInventory/v1/ch/searches (Returns list of cm handle ids)
- POST /ncmpInventory/v1/ch/id-searches (Do not exist)
Note this functionality is already implemented for the public NCMP search endpoints (CPS-977):
- POST /ncmp/v1/ch/searches
- POST /ncmp/v1/ch/id-searches
The existing implementation has a search condition called 'cmHandleWithCpsPath'.
However, attempting to use this on inventory search endpoint results in an error:
Wrong 'conditionName': cmHandleWithCpsPath - please supply a valid name.
It is proposed that NCMP inventory searches also support the same search condition.
Acceptance Criteria:
- NCMP inventory search and ID search supports a search condition 'cmHandleWithCpsPath', which has the same functionality as the existing NCMP public search condition 'cmHandleWithCpsPath'.
- Documentation updated in docs/ncmp-inventory-querying.rst (see also existing API docs in docs/ncmp-cmhandle-querying.rst)
Acceptance Tests:
1. The following inventory search shall return all CM-handles with the given private property neType=RadioNode and blank moduleSetTag:
POST /ncmpInventory/v1/ch/searches
Request body:
{ "cmHandleQueryParameters": [ { "conditionName": "hasAllAdditionalProperties", "conditionParameters": [ { "neType": "RadioNode" } ] }, { "conditionName": "cmHandleWithCpsPath", "conditionParameters": [ { "cpsPath": "/dmi-registry/cm-handles[@module-set-tag='']" } ] } ] }
2. Inventory ID search (using same search parameters as test 1) shall return all IDs of CM-handles with the given private property neType=RadioNode and blank moduleSetTag:
POST /ncmpInventory/v1/ch/id-searches
(Request body same as test 1.)
A/C:
- Ncmp inventry cm handle search api should support cps path query.
- Demo
- Update RTD doc (with example with module set tag)
Open questions:
Request attributes | /ncmpInventory/v1/ch/searches | Decision | /ncmpInventory/v1/ch/id-searches | Decision |
---|---|---|---|---|
"conditionName" | WITH_CPS_PATH("cmHandleWithCpsPath") | Use existing names | WITH_MODULE_SET_TAG("cmHandleWithModuleSetTag") | |
"conditionParameters" | "cpsPath": "/dmi-registry/cm-handles[@module-set-tag='tag-A']" | Use existing names | "module-set-tag": "tag-A" | |
Methods | NetworkCmProxyInventoryController#searchCmHandleIds | Impl. it first with cps path | ? |