Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


IssueNotesDecision
1Does request body need to declare "publicCmHandleProperties"?

Do we need to explicitly declare "publicCmHandleProperties"? 

Will there be another possible variation to this in the future?

Code Block
languageyml
{
  "publicCmHandleProperties" : {
          "Colour": "red",
          "Size": "large"
   }
}


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 

Code Block
languageyml
{
	"name": "Colour",
	"value": "red"
},
{
	"name": "Size",
	"value": "large"
}


Yes. But all this is hidden when using CpsPath type query


3Will 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
4Does the order matter?

Does

Code Block
languageyml
{
  "publicCmHandleProperties" : {
          "Colour" : "green",
          "Size" : "small"
   }
}

==

Code Block
languageyml
{
  "publicCmHandleProperties" : {
          "Size" : "small"
          "Colour" : "green",
     }
}


No
But all this is hidden when using CpsPath type query
5Should 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
6What format should the response take?

We have two options currently:


  1. Return List<String>
Code Block
languageyml
[
    "cmHandle1",
    "cmHandle2",
    ...,
    "cmHandleN"
]


2. Return CM Handle Objects

    1. Already defined in CPS
    2. <Example Pending>

Contact Tony Finnerty & kieran mccarthy regarding this.
Tony Finnerty Has no opinion on this matter

It has been decided to implement this using a list of cm handles
7what 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": {
        """doesnt matter "
    }
}

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?

We will throw a DataValidationException if an entry contains an empty property
9

CPS stores Integers as Strings.

Given the public properties below

Code Block
languageyml
{
    "cmHandle": "Bookstore6",
    publicCmHandleProperties": {
        "color": 12345
        }
}, {
    "cmHandle": "Bookstore7",
    "publicCmHandleProperties": {
        "color": "12345"
        }
}


When stored in CPS Integers are stored as Strings.

xpathattributes

/dmi-registry/cm-handles[@id='Bookstore6']/public-properties[@name='color']

{"name": "color", "value": "12345"}
/dmi-registry/cm-handles[@id='Bookstore7']/public-properties[@name='color']{"name": "color", "value": "12345"}


{
    "publicCmHandleProperties": {
        "color" : "12345"
    }
}

and

{
    "publicCmHandleProperties": {
        "color"12345
    }
}

return

[
    "Bookstore6",
    "Bookstore7"
]Is this expected behavior?



Analysis/Implementation Proposal

...