# | Sub interface | Method | Scenario | Specified HTTP Response Code | Implemented HTTP Response Code | CommentsRequired Changes | Body |
---|
1 | Data | 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 | 200 400 401 403 404 | 200 (ok) 500 (internal server error) - for error when parsing provided dmi request to json (NcmpException)
- for dmi response code different from 2xx (NcmpException)
- for unexpected system errors
| Specification: Implementation: - Parsing error for dmi request should be a 400 client error (Use ClientRequestNcmpExcpetion vs ServerNcmpException)
|
|
2 | Data | GET - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running NetworkCmProxyApi.getResourceDataRunningForCmHandle() | Get resource data from pass-through running for given cm handle | 200 400 401 403 404 | 200 (ok) 500 (internal server error) - for error when parsing provided dmi request to json (NcmpException)
- for dmi response code different from 2xx (NcmpException)
- for unexpected system errors
| Specification: Implementation: - Parsing error for dmi request should be a 400 client error (see 1. above)
|
|
3 | Data | 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 | 200 400 401 403 404 | 200 (ok) 500 (internal server error) - for error when parsing provided dmi request to json (NcmpException)
- for dmi response code different from 2xx (NcmpException)
- for unexpected system errors
| Specification: Implementation: - Parsing error for dmi request should be a 400 client error (see 1. above)
|
|
4 | Data | POST - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running NetworkCmProxyApi.createResourceDataRunningForCmHandle() | Create resource data from pass-through running for given cm handle | 201 400 401 403 404 | 201 (created) 500 (internal server error) - for error when parsing provided dmi request to json (NcmpException)
- for dmi response code different from 2xx (NcmpException)
- for unexpected system errors
| Specification: Implementation: - Parsing error for dmi request should be a 400 client error (see 1. above)
|
|
5 | Data | 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 | 200 400 401 403 404 | 200 (ok) 500 (internal server error) - for error when parsing provided dmi request to json (NcmpException)
- for dmi response code different from 2xx (NcmpException)
- for unexpected system errors
| Specification: Implementation: - Parsing error for dmi request should be a 400 client error (see 1. above)
|
|
6 | Model | GET - /v1/ch/{cm-handle}/modules NetworkCmProxyApi.getModuleReferencesByCmHandle | Fetch all module references (name and revision) for a given cm handle | 200 400 401 403 404 | 200 (ok) 500 (internal server error) - for unexpected system errors
| Specification: Implementation - Check for incorrect or missing cm handle that should return 400
|
|
7 | Model | POST - /v1/ch/searches NetworkCmProxyApi.executeCmHandleSearch | Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names | 200 400 401 403 | 200 (ok) 500 (internal server error) - for no yang resources found for provided module (ModuleNamesNotFoundException)
- for unexpected system errors
| Implementation: - Currently, 500 is returned when no matches found. This should be changed to a 4xx response
- Invalid body payload struture format returns 500 with the system error message, not really useful for the client. Should also returns 400.
|
|
8 | Inventory | POST /v1/ch NetworkCmProxyInventoryApi.updateDmiPluginRegistration() | Register, update or remove cm handles | 201 400 401 403 | 201 (created) 500 (internal server error) - for dmi plugin service name not provided (NcmpException)
- for invalid combination of dmi plugin service names (NcmpException)
- for parsing error while processing dmi plugin registration (DataValidationException)
- for unexpected system errors
| Specification: - Should success always be 200 (general ok) instead of 201 (created) that might look confusing for updates and removals ?
Implementation: - 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, ...)
- What should be the error code related to dmi connectivity issues ? Could be either 400 (the client provided an invalid url) or 500 (the url provided by the client is valid, but the connection failed because of a system error)
- Current information logged when dmi plugin service is not reachable is not enough to support and investigate.
|
|