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 explcitly declare "publicCmHandleProperties"? 

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

Code Block
languageyml
{
    "publicCmHandleProperties" : {           

           "module1Name-1" : "revision1some-value",
		"module2"          "Name-2" : "revision2other-value"
     }
}


Not another variation but there will be "modules" included in future implementations.
2Do we need to consider if cm handle exists?

3



Analysis/Implementation Proposal

...

High level steps:

  1. Update openapi specification for new endpoint
  2. Update Controller for new endpoint
  3. Add new SQL query to return data
    1. If no data found return all cm handles 
    2. else return data
  4. Implement 400 if request does not follow structure
  5. Create CSIT test with two attributes
  6. Demo functionality

...

  1. Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-901
  2. Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-902
  3. Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-903
  4. Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-904

Interface Proposal

#URISQL QueryDesign NotesComment
1POST /ncmp/v1/data/ch/searches

Scenario :  Request received to return all cm handles matching properties given
Method   : POST
URI          : {ncmpRoot}/ncmp/v1/data/ch/searches 
Header    : Content-Type: application/json

Request Body

Code Block
languageyml
{
    "publicCmHandleProperties" : {  
         
        "module1""Name-1" : "revision1some-value",
		"module2"          "Name-2" : "revision2other-value"
     }
}


Response Body

Code Block
languageyml
[
	"cmHandle1",
	"cmHandle2",
	...,
	"cmHandleN"
]



...

Code Block
languageyml
titleSample OpenAPI yAML
collapsetrue
executeSearchForMatchingPublicProperties:
  post:
    description: Execute search to get all cm handles for the given public properties
    tags:
      - network-cm-proxy
    summary: Execute cm handle search using
    operationId: executeSearchForMatchingPublicProperties
    requestBody:
      required: true
      content:
        application/json:
          schema:
            $ref: 'components.yaml#/components/schemas/PublicProperties'
    responses:
      200:
        description: OK
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      400:
        $ref: 'components.yaml#/components/responses/BadRequest'
      401:
        $ref: 'components.yaml#/components/responses/Unauthorized'
      403:
        $ref: 'components.yaml#/components/responses/Forbidden'
      404:
        $ref: 'components.yaml#/components/responses/NotFound'
      500:
        $ref: 'components.yaml#/components/responses/InternalServerError'


Public Properties are stored in the fragment table in CPS as seen below:

Image Added


Code Block
languagesql
titleSample SQL Query
<TBD>

Future Example (Out-of-scope)

...