CPS-NCMP - DMI - SDNC Request and Response Mapping

CPS-NCMP - DMI - SDNC Request and Response Mapping

References

https://lf-onap.atlassian.net/browse/CPS-577

https://lf-onap.atlassian.net/browse/CPS-782

https://lf-onap.atlassian.net/browse/CPS-777

Overview

 

  • Since the DMI Plugin always needs an request body for at least the 'Additional Parameters' CPS_NCMP wil have to use PUT or POST to make a any (read or) write request.

  • The actual operation will be determine with 'operation' field in body. If this is not supplied 'read' wil be assumed as the default operation irrespective of the HTTP method used

Operation Mapping, Success scenarios

 

Client →  CPS-NCMP

 

 

CPS-NCMP →  DMI-Plugin

DMI-Plugin →  SDNC-C

 

Client →  CPS-NCMP

 

 

CPS-NCMP →  DMI-Plugin

DMI-Plugin →  SDNC-C

#

RESTful Method

Code

ResponseType

RESTful Method

Requestbody.operation

Code

ResponseType

Object Content

RESTful Method

Code

ResponseType

1

GET

200

ResponseEntity<Object>

 

 

 

 

POST

"read"

 

 

 

 

200

 

 

 

 

ResponseEntity<Object>

 

Object read

GET

200

ResponseEntity<Object>

2

POST

201

ResponseEntity<String>
*just name/id 

"create"

{"resourceIdentifier": "xyz"}

POST

2xx

?

3

PUT

200

ResponseEntity<Object>
*just name/id 

"update"

{"resourceIdentifier": "xyz"}

PUT

2xx

?

4

PATCH

200

ResponseEntity<String>
*just name/id 

"patch"

{"resourceIdentifier": "xyz"}

PATCH

2xx

?

5

DELETE

204

ResponseEntity<Void>

"delete"

{"resourceIdentifier": "xyz"}

DELETE

204

ResponseEntity<void>

 

Operation Mapping, Error scenarios (failed in mediation/SDN-C)

 

Client →  CPS-NCMP

 

 

CPS-NCMP →  DMI-Plugin

DMI-Plugin →  SDNC-C

 

Client →  CPS-NCMP

 

 

CPS-NCMP →  DMI-Plugin

DMI-Plugin →  SDNC-C

#

RESTful Method

Code

ResponseType

RESTful Method

Requestbody.operation

Code

ResponseType

Object Content

RESTful Method

Code

ResponseType

1

GET

500

ResponseEntity<String>

 

 

 

 

POST

"read"

 

 

 

 

500

 

 

 

 

ResponseEntity<String>

 

String with (original) error details

GET

4xx
5xx

?

2

POST

500

ResponseEntity<String>

"create"

String with (original) error detail

POST

4xx
5xx

?

3

PUT

500

ResponseEntity<String>

"update"

String with (original) error detail

PUT

4xx
5xx

?

4

PATCH

500

ResponseEntity<String>

"patch"

String with (original) error detail

PATCH

4xx
5xx

?

5

DELETE

500

ResponseEntity<String>

"delete"

String with (original) error detail

DELETE

4xx
5xx

ResponseEntity<void>

 

For more detail on the (error) response codes see: CPS Exceptions and REST APIs HTTP Response Codes#CPS-NCMP