...
Yang data resource actions and RPC operations are run directly on the 'device' meaning ncmp-datastores:passthrough-running is used for these request
# | Usecase | NCMP Datastore | Path | ?fields | ?topic | Query | Time frame |
---|---|---|---|---|---|---|---|
1 | Read | passthrough-running | RESTConf Path only | Implemented by SDNC/Node | Implemented by DMI Plugin | Not supported | Istanbul |
2 | Read | ncmp-datastores:operational | CPSPath only | TBD | TBD | Limited xpath functionality | Istanbul |
3 | Create | passthrough-running | RESTConf Path only | N/A | N/A | N/A | Istanbul |
4 | Create | ncmp-datastores:running | CPSPath only | N/A | N/A | N/A | Istanbul |
5 | Delete | passthrough-running | RESTConf Path only | N/A | N/A | Not supported | Istanbul |
6 | Delete | ncmp-datastores:running | CPSPath only | N/A | N/A | Not supported | Istanbul |
7 | Update | passthrough-running | RESTConf Path only | N/A | N/A | N/A | Istanbul |
8 | Update | ncmp-datastores:running | CPSPath only | N/A | N/A | N/A | Istanbul |
9 | Patches | passthrough-running | RESTConf Path only | N/A | N/A | N/A | Istanbul |
10 | Patches | ncmp-datastores:running | CPSPath only | N/A | N/A | N/A | > Istanbul |
11 | Bulk | > Istanbul | |||||
12 | > Istanbul | ||||||
13 | Action | Istanbul? | |||||
14 | Istanbul? |
REST API
Req/usecase | REST Method | URI / Payload | Header Parameters | Request/Response Example | Status | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Ericsson ref.NCMP-CM-001-2 Read a data resource directly from source (passthrough) for a cmHandle - async | GET | Accept: application/json |
Expand |
---|
[ |
Read a data resource directly from source (passthrough) for a
cmHandle. Only return specific field(s). Synchronous call
application/json
Scenario : Read the bookstore.(categories,
title, authors, pub_year, price, lang) for cmhandle
"335ff" as passthrough
Method : GET
URI : {ncmp-root}/ncmp/v1/cm-handle/335ff/ds/ncmp-datastores:
passthrough-running//books?fields=title;
authors;pub_year;price;lang
Header :
Accept: application/json
Response
Expand |
---|
[ [ [ |
SCENARIO
NCMP-CM-001-2
Read a data resource directly from
source (passthrough) for a
cmHandle. Only return specific field(s).
Synchronous call
application/json
Read a data resource with some leaf value condition directly from the source (passthrough) for a cmHandle. Only return specific field(s).
Synchronous call
application/json
Scenario : Read
Read the price for cmhandle ="335ff" as passthrough
Method : GET
URI : {ncmp-root}/ncmp/v1/cm-handle/335ff/ds/ncmp-datastores:passthrough running//books[@title='Far Horizons']?fields=price
Header :
Accept: application/json
[
{
"xpath": "/bookstore/categories[@code='01']/books[@title='Far Horizons']",
"leaves": {
"price": 1099.0
}
]
NCMP-CM-001-1
Get model (module set) for CMHandle
{ncmp-root}/ncmp/v1/model/<handleId>
application/json
Scenario : Get the model data for CMHandle with id "335ff"
Method : GET
URI : {ncmp-root}/ncmp/v1/model/335ff
Header : Accept: application/yang-data+json
Response :
Expand |
---|
{ |
Create a data resource for a
cmhandle
{ncmp-root}/ncmp/v1/cm-handle/<cmhandle>/ds/ncmp-datastores:passthrough-running/{parent-data-resource-identifier}
{
<new-yang-data-resource>
}
application/ yang- data+json
Scenario : Create a data resource of the bookstore model for the given cmhandle.
Method : POST
RI : {ncmp-root}/ncmp/v1/cm-handle/34l5k32/bookstore
Header : Accept: application/yang-data+json
Body:
Expand |
---|
{ |
Delete a data resource for a
cmHandle
{ncmp-root}/ncmp/v1//ds/ncmp-datastores:passthrough-running/{data-resource-identifier}
OR with datastores defaults
{ncmp-root}/ncmp/v1/cmhandle// {parent-data-resource-identifier}
application/ yang- data+json
Scenario : Delete categories=SciFi
Method : DELETE
URI : {ncmp-root}/ncmp/v1/cmhandle/<cm-handle>//categories[@name="SciFi"]
do we follow xpath syntax?
{adapter-root}???
Update a data resource for a
cmHandle
{ncmp-root}/ncmp/v1/data//ds/ncmp-datastores:passthrough-running/{data-resource-identifier}
{
<yang-data-sub-resource>
}
OR with datastores defaults
{ncmp-root}/ncmp/v1/cmhandle// {parent-data-resource-identifier}
{
<yang-data-sub-resource>
}
application/ yang- data+json
Scenario : Add a book to categories SciFi if it doesn't already exist
Method : PATCH
URI : {ncmp-root}/ncmp/v1/cm-handle/d32455f/bookstore/categories:name=SciFi
Header :
Content-Type: application/yang-data+json
Body :
Expand |
---|
{ |
NCMP-CM-001-8
Multiple edits under a target data
resource for a single cmHandle
{ncmp-root}/ncmp/v1/cm-handle//ds /ncmp-datastores:passthrough-running/{data-resource-identifier}
{
yang-patch payload
}
OR using datastores defaults
{ncmp-root}/ncmp/v1/cm-handle//{data-resource-identifier}
{
yang-patch payload
}
application/yang-patch+json
Scenario: Make multiple updates under the bookstore/categories data resource
Method : PATCH
URI : {ncmp-root}/ncmp/v1/cm-handle/32rf234/bookstore/categories
Header :
Content-Type: application/yang-patch+json
Body:
Expand |
---|
{ |
Response :
HTTP/1.1 200 OK
Date: Thu, 26 Jan 2017 20:56:30 GMT
Server: example-server
Last-Modified: Thu, 26 Jan 2017 20:56:30 GMT
Content-Type: application/yang-patch+json
{
"ietf-yang-patch:yang-patch-status" : {
"patch-id" : "change-categories-names",
"ok" : [null]
}
}
Output Specification
?fields={fields}&topic= {topicId}
...
?fields={fields}&topic= {topicId}
Required Task
# | Description | Notes | Decision | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Yml update with return types with examples of the payload | ||||||||||||
2 | Update CPS openAPI.yml with return types |
|