ONAP Guidelines
...
# | Use case | Scenario | DB (Spring) Response | SPI Response | Java API | REST API Response Code | Response Body | Error Object Message |
---|---|---|---|---|---|---|---|---|
1 | Add dataspace | dataspace already exists | DataIntegrityViolationException | DataspaceAlreadyDefinedException | DataspaceAlreadyDefinedException | 400 (bad request) | json error object | dataspace xyz already defined |
2 | Add schema set to dataspace | schema set with same name already exists | DataIntegrityViolationException | SchemaSetAlreadyDefinedException | SchemaSetAlreadyDefinedException | 400 (bad request) | json error object | schema set xyz already defined for dataspace abc |
3 | Add schema set to dataspace | dataspacename does not exist | No records (Optional, not present) | DataspaceNotFoundException | DataspaceNotFoundException | 400 (bad request) | json error object | TBD |
4 | Add schema set to dataspace | the schema set throws a validation exception when parsed with ODL Yang Parser e.g.
| N/A | N/A | ModelValidationException (e casue) details should contain cause message | 400 (bad request) | json error object | message and details from the original exception. |
5 | List anchors for dataspace name | dataspacename does not exist | No records (Optional, not present) | DataspaceNotFoundException | DataspaceNotFoundException | 400 (bad request) | json error object | dataspace xyz not found |
6 | List anchors for dataspace name | no anchor records in DB | 0 records | empty collection | empty collection | 200 (ok) | empty list | N/A |
7 | Add a fragment | Insert a fragment that violates the unique constraint e.g. when trying to insert a fragment with the same property values(dataspace_id,anchor_id,xpath) as an existing fragment. | DataIntegrityViolationException | |||||
8 | Remove schema set | Schema set removal is requested from REST (or via API/SPI with explicitly defined option prohibiting removal of associated anchors and data if found) and there is (are) associated anchor record(s) in database. | N/A | SchemaSetInUseException | SchemaSetInUseException | 409 (Conflict) | json error object | schama set abc in dataspace xyz is having anchor records associated. |
9 | Get a fragment that does not exist | get fragment by xpath that does not exist | FragmentNotFoundException | DataNodeNotFoundException | DataNodeNotFoundException | 400 (bad request) | json error object | datanode with xpath xyz not found in dataspace xyz |
10 | Invalid cps path | a cpsPath that cannot be parsed i.e. not recognized as a valid query
| CpsPathException | CpsPathException | CpsPathException | 400 (bad request) | json error object | message and details from the original exception. |
11 | Data node already exists | Create the same data node twice | DataIntegrityViolationException | DataNodeAlreadyDefined | DataNodeAlreadyDefined | 409 (Conflict) | json error object | Data node already defined for dataspace abc |
12 | Unsupported update node leaves | Unsupported json data when
private DataNode buildFromNormalizedNodeTree() { |
| DataValidationException | DataValidationException | 400 | json error object | "Unsupported json data: " + jsonData |
13 | Delete dataspace with anchor/s | Delete dataspace that still contains 1 or more anchor | DataspaceInUseException | DataspaceInUseException | 409 (Conflict) | json error object | dataspace contains anchor(s) | |
14 | Delete dataspace with schemaset/s | Delete dataspace that still contains 1 or more schemaset | DataspaceInUseException | DataspaceInUseException | 409 (Conflict) | json error object | dataspace contains schemaset(s) |
CPS-NCMP
expand table below
# | Sub interface | Method | Scenario | HTTP Response Code | 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 | Specified: 200, 400, 401, 403, 404 Implemented: 200, 500 | |
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 | Specified: 200, 400, 401, 403, 404 Implemented: 200, 500 | |
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 | Specified: 200, 400, 401, 403, 404 Implemented: 200, 500 | |
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 | Specified: 201, 400, 401, 403, 404 Implemented: 201, 500 | |
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 | Specified: 200, 400, 401, 403, 404 Implemented: 200, 500 | |
6 | Model | 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 | |
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 | Specified: 200, 400, 401, 403 Implemented: 200, 500 | |
8 | Inventory | POST /v1/ch NetworkCmProxyInventoryApi.updateDmiPluginRegistration() | Register, update or remove cm handles | Specified: 201, 400, 401, 403 Implemented: 201, 500 Comment: 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
insert table here
...
# | Sub interface | Method | Scenario | Specified HTTP Response Code | Implemented HTTP Response Code | Comments |
---|---|---|---|---|---|---|
1 |
CPS-Temporal
# | Sub interface | Method | Scenario | Specified HTTP Response Code | Implemented HTTP Response Code | Comments |
---|---|---|---|---|---|---|
1 | Query | GET - /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history | Get anchor data by name | 200 400 401 403 | ||
2 | Query | GET - /v1/dataspaces/{dataspace-name}/anchors/history | Get anchors data based on filter criteria | 200 400 401 403 |