Table of Contents |
---|
Jira Legacy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
Issue | Notes | Decision | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Does request body need to declare "publicCmHandleProperties"? | Do we need to explicitly declare "publicCmHandleProperties"? Will there be another possible variation to this in the future?
| Yes | ||||||||||
2 | Are public properties always stored (in postgress) in the format of "name" : x, "value": y? (does NOT affect implementation) | In the fragment table there are example that follow this format
| Yes. But all this is hidden when using CpsPath type query | ||||||||||
3 | Will there only ever be 1 kv pairs in public properties (in the DB)? | Yes, as each property is stored in a separate list-item Fragment But all this is hidden when using CpsPath type query | |||||||||||
4 | Does the order matter? | Does
==
| No But all this is hidden when using CpsPath type query | ||||||||||
5 | Should search be case sensitive? | depend on CPSPath functionality - may be case-sensitive https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html | Yes, that is the currently implement as such CpsPath type query. Given it is mostly machine-to-machine type queries this is good enough and performs better | ||||||||||
6 | What format should the response take? | We have two options currently:
2. Return CM Handle Objects
Contact Tony Finnerty & kieran mccarthy regarding this. | |||||||||||
7 | what if we have valid entries and one entry is empty? | We would return all cm handles and others that match would be included in this list anyway. → To avoid this should we first check the entries int map for empty entries as further processing is unnecessary in this case. | Discussed with Toine Siebelink and implementation changes are required for handling edges cases. we will handle empty and unknown properties separately. | ||||||||||
8 | Regarding empty/missing property in request e.g. { "publicCmHandleProperties": { | Do we want to throw an exception if there is an empty property? Do we silently ignore them and move on? should we send two lists back... one with matching cm handles and one with those that failed processing? |
...
# | URI | Design Notes | Comment(s) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | POST /ncmp/v1/data/ch/searches | Scenario : Request received to return all cm handles matching properties given Request Body
Response Body Example 1
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''PNFDemo'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore@bookstore.com"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore4'']/public-properties[@name=''color'']', '{"name": "color", "value": ""}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore3'']/public-properties[@name=''color'']', '{"name": "color", "value": "red"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore2'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore2@bookstore.com"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore1'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore@bookstore.com"}'); |
URL
http://localhost:8883/ncmp/v1/data/ch/searches
Results - Happy Path
# | Scenario | Request | Response |
---|---|---|---|
1 | Both properties match (Return CM Handles that Match) | { | [ |
2 | No properties given (Return CM Handles that Match which contain public properties) | { "publicCmHandleProperties": { | [ |
Results - Edge Cases
# | Scenario | Request | Response |
---|---|---|---|
1 | Value doesn't match (Nothing Returned) | { | [ ] |
2 | Unknown properties given (Return Empty Response) | { | [ ] |
3 | Empty property (invalid) (BAD_REQUEST) | { "publicCmHandleProperties": { | { |
4 | Empty value (valid) (Return CM Handles Returned that Match) | { "publicCmHandleProperties": { | [ |
Future Example (Out-of-scope)
...