Versions Compared

Key

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

Jira Legacy
serverONAP System Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a4733707d-557c2057-3c0c3a0f-b515ae5e-579789cceedb4fd8aff50176
keyCPS-896

NCMP CMhandle registration endpoint receives multiple operations to create, update or delete cm-handles in a single request. As there are multiple operations, the endpoint response structure should be able to provide the status of all operations separately with consistent error-code to allow users to retrigger failed operations programmatically if possible.

Questions:

#QuestionAgreed SolutionRemarks
1Are multiple operations for one cm-handle is considered invalid input?

No special validation, process as usual

  • 2nd create will fail
  • 2nd update will override previous
  • 2nd delete will be ignored
2Should system check which dmi-plugin 'owns' cm handle before deleting it? ie. is is the same service that registered the cm-handle
Toine Siebelink will check with Tony Finnerty
Just delete for now until Acces Control gets implemented

Agreed with stakeholder in meeting  

3Preferred output format
Team prefers alternative A; with 'status' field

Alternative B: only failed cm handles, no status code for each handle. Stakeholder  expected that errors are rare and does not want to process data if successful ie. in most cases and empty response is expected (statuscode 200 code)

empty arrays will not appear in json at all. I.e. if there are no 'failed delete cm handles' the 'failedDeletedCmHandles'  property will simply not appear in the response.
4Order of processing

Change to:

delete → create → update

It will help us to handle the case where the user wants to recreate the cm handle

Response Structure

HttpStatus

ScenarioStatus CodeResponseBody
All operations were successful200Empty
All or few operations failed500With error details from each failed operation
Invalid Input400Error Details

Response Body

The response body should give enough information for each failed operation to retry them programmatically. For each failed operation we should send the below information 

NameDescriptionMandatory?
cmHandleidentifies the failed cm-handle
  •  Mandatory
errorCodeIdentify the error
  •  Mandatory
errorTextHuman-readable error text
  •  Mandatory
statusFailure/Success; To be discussed with the team
  •  Mandatory

The response body can be structured in two ways

...

Code Block
titleResponse Structure incl status
linenumberstrue
collapsetrue
{
    "createdCmHandles": [ 
		{
 			"cmHandle": "cmHandle-1",
    		"status": "FAILURE", // Extra field to indicate the status
    		"error-code": "01",
			"error-text" : "cmhandle already exist"
		}
	],
	"updatedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-2",
    		"status": "FAILURE" ,
    		"error-code": "02" ,
			"error-text" : "cmhandle does not exist" 
		}
	],

	"faileddeletedCmHandlesdeletedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-3",
    		"status": "FAILURE" ,
    		"error-code": "02" ,
			"error-text" : "cmhandle does not exist"
		}
	]
}

...

This approach meets the current requirement and has a smaller payload size (no extra field for the status).

Code Block
titleResponse without grouping(only failed)
linenumberstrue
collapsetrue
{
    "failedCreatedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-1",
    		"error-code": "01",
			"error-text" : "cmhandle already exist"
		}
	],
	"failedUpdatedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-2",
    		"error-code": "02" ,
			"error-text" : "cmhandle does not exist" 
		}
	],
 	"deletedCmHandlesfailedDeletedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-3",
    		"error-code": "02" ,
			"error-text" : "cmhandle does not exist"
		}
	]
}

...

Should we indicate if something can be fixed with retry?


CodeSloganApplicable to
CreateUpdateRemove
00unknown/otherYesYesYes
01cm-handle does not existNoYesNo*
02

cm-handle already exist

YesNoNo
03not allowed**?YesYes

Notes
* remove will ignore non-existing cm handles (not an error, assume already deleted)
** suggested future error (for illustration purposes)

...