Versions Compared

Key

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

...

#Sub interfaceMethodScenarioSpecified HTTP Response CodeImplemented HTTP Response CodeCommentsBody
1Data

HTTP: GET - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational

NetworkCmProxyApi.getResourceDataOperationalForCmHandle()

Get resource data from pass-through operational for given cm handle

Specified: 200,

400

, 401,

403

, 404

Implemented: 200,

500



2Data

GET - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running

NetworkCmProxyApi.getResourceDataRunningForCmHandle()

Get resource data from pass-through running for given cm handle

Specified: 200,

400

, 401,

403

, 404

Implemented: 200,

500



3Data

PUT- /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running

NetworkCmProxyApi.updateResourceDataRunningForCmHandle()

Update resource data from pass-through running for the given cm handle

Specified: 200,

400

, 401,

403

, 404

Implemented: 200,

500



4Data

POST - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running

NetworkCmProxyApi.createResourceDataRunningForCmHandle()

Create resource data from pass-through running for given cm handle

Specified: 201,

400

, 401,

403

, 404

Implemented: 201,

500



5Data

PATCH - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running

NetworkCmProxyApi.patchResourceDataRunningForCmHandle()

Patch resource data from pass-through running for the given cm handle

Specified: 200,

400

, 401,

403

, 404

Implemented: 200,

500



6Model

GET - /v1/ch/{cm-handle}/modules

NetworkCmProxyApi.getModuleReferencesByCmHandle

Fetch all module references (name and revision) for a given cm handle

Specified: 200,

400

, 401,

403

, 404

Implemented: 200,

500



7Model

POST - /v1/ch/searches

NetworkCmProxyApi.executeCmHandleSearch

Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names

Specified: 200,

400

, 401,

403

Implemented: 200,

500



8Inventory

POST /v1/ch

NetworkCmProxyInventoryApi.updateDmiPluginRegistration()

Register, update or remove cm handles

Specified: 201,

400

, 401,

403

Implemented: 201,

500

CommentImplementation:

  • Invalid requests should return 4xx with an explanation message instead of 500 without information (ex: Invalid combination of plugin service names, URI is not absolute, ...)

DMI-Plugin

#Sub interfaceMethodScenarioSpecified HTTP Response CodeImplemented HTTP Response CodeComments
1DMI Plugin Internal

POST - /v1/inventory/cmHandles

DmiPluginInternalApi.registerCmHandles()



Register given list of cm handles (internal use only)

201

400

401

403

201 (created)

  • for success

400 (bad request)

  • for empty cm handles list from input

500 (internal server error)

  • for parsing error when converting provided cm handles into JSON (DmiException)
  • for any response code from NCMP that is different form 201 (CmHandleRegistrationException)
  • for unexpected system errors

Implementation

  • Input cm handle conversion error should return a 4xx client error
2DMI Plugin

POST - /v1/ch/{cmHandle}/modules

DmiPluginApi.getModuleReferences()

Get all modules for given cm handle

200

400

401

403

200 (ok)

  • for success

404 (not found)

  • for SDNC returning no modules for given cm handle (ModulesNotFoundException)

500 (internal server error)

  • for SDNC response JSON format or processing failure (SdncException)
  • for unexpected system errors

3DMI Plugin

POST - /v1/ch/{cmHandle}/moduleResources

DmiPluginApi.retrieveModuleResources()

Retrieve module resources for one or more modules

200

400

401

403

200 (ok)

  • for success

404 (not found)

  • for module resource not found from SDNC for the given cm handle (ModuleResourceNotFoundException)
  • for error occurred when trying to parse the response body from SDNC (ModuleResourceNotFoundException)

500 (internal server error)

  • for JSON parsing error when creating the module request from the given module reference (DmiException)
  • for any SDNC response code that is different from 200 or 404
  • for unexpected system errors

Implementation:

  • SDNC errors are not really consistent (404 and 500)
  • Error related to the given module reference should be 4xx ?
4DMI Plugin

POST - /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational

DmiPluginApi.dataAccessPassthroughOperational()

Get resource data from passthrough-operational for cm handle. Will support read operations only.

200

400

401

403

200 (ok)

  • for success

400 (bad request)

  • for input operation that is different from read

500 (internal server error)

  • for any SDNC response code that is different from 200 (ResourceDataNotFound)
  • for unexpected system errors

Implementation:

  • The exception ResourceDataNotFound is missing the Exception suffix
5DMI Plugin

POST - /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running

DmiPluginApi.dataAccessPassthroughRunning()

Post request to Get, Create or to Update resource data for a cm-handle. Since all requests need to include additional information in a request body HTTP Post is used for all use cases and the actual operation is defined in the request body instead.

201

400

401

403

200 (ok)

  • for success with read or update requested operation. Response body is SDNC body response.

201 (created)

  • for success with create requested operation. Response body is SDNC body response.

204 (no content)

  • for success with delete requested operation. Response body is SDNC body response.

400 (bad request)

  • for requested operation that is different from create, read, update or delete. Response body is SDNC body response.

500 (internal server error)

  • for any SDNC response code that is different from 2xx when writing data (DmiException)
  • for any SDNC response code that is different from 200 when getting data (ResourceDataNotFound)
  • for unexpected system errors

Specification

  • Should success always be 200 (general ok) instead of 201 (created) ?

Implementation

  • It does not seem consistent to return 404 with SDNC body response when operation is different from create, read update or delete.
  • SDNC response codes are handled differently for getting and writing data


...

  • Always ensure that client request related errors return 4xx along with a clear explanation provided to the client about the reason for the error. When 4xx errors occur, the system itself is behaving as expected.
  • 500 response codes should only correspond to unexpected errors that require support investigation and effort in order to be fixed (ex: network communication issue, dependent component or system down, corrupted data, application bug, ...). For 500 errors no details are really expected in the response for the client, all the information to investigate the problem should be available in the logs.
  • Review 401 and 403 responses code from specification that are not implemented yet.
  • 500 needs to be added to the specification for all endpoints

...