Versions Compared

Key

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

...

  • actual YAML definitions (separate user story)


Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-391


Open Issues & Decisions


Description

Notes

Decision

1Will we use the wrapper on GET rest operations?

Currently, we wrap the response of GET operations using the data node wrapper.


2In the URI will we distinguish between data and operations as part of the path?
3Parent data resource identifier can handle any path

4

Yml update with return types with examples of the payload



...

Yang data resource actions and RPC operations are run directly on the 'device' meaning ncmp-datastores:passthrough-running is used for these request




Req/usecase

REST

Method

 URI / Payload

Header Parameters

Request/Response ExampleStatus
1

NCMP-CM-001-1

Get model (module set) for CMHandle

GET

{ncmp-root}/ncmp/v1/model/<handleId>


{ncmp-root}/ncmp/v1/model/

cm-handle

cmhandle/<cm-handle>

Accept:
application/ yang- data+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
{
"test:bookstore":{
"bookstore-name": "Chapters",
"categories": [
{
"code": "01",
"name": "SciFi",
"books": [
{
"authors": [
"Iain M. Banks"
],
"lang": "en",
"price": "895",
"pub_year": "1994",
"title": "Feersum Endjinn"
},
{
"authors": [
"Ursula K. Le Guin",
"Joe Haldeman",
"Orson Scott Card",
"david Brin",
"Rober Silverberg",
"Dan Simmons",
"Greg Bear"
],
"lang": "en",
"price": "1099",
"pub_year": "1999",
"title": "Far Horizons"
}
]
},
{
"name": "kids",
"code": "02",
"books": [
{
"authors": [
"Philip Pullman"
],
"lang": "en",
"price": "699",
"pub_year": "1995",
"title": "The Golden Compass"
}
]
}
]
}
}



Under Review
2NCMP-CM-001-4
Create a data resource for a
cmhandle
POST

{ncmp-root}/ncmp/v1/cm-handle/<cmhandle>/ds


/ncmp-datastores:passthrough-running/{parent-data-resource-identifier}
{
<new-yang-data-resource>
}


OR with datastores defaults


{ncmp-root}/ncmp/v1/

cm-handle/<cmhande>/

cmhandle/<cm-hande>/{parent-data-resource-identifier}
{
<new-yang-data-resource>
}

Accept:
application/ yang- data+json

Scenario : Create

nrsectorcarrier-vdu-add:NRSectorCarrier=4 under_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1

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
{
"test:bookstore":{
"bookstore-name": "Chapters",
"categories": [
{
"code": "01",
"name": "SciFi",
}
]
}
}


Under Review
3NCMP-CM-001-5
Delete a data resource for a
cmHandle
DELETE

{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}

Accept:
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}??? 

Under Review
4NCMP-CM-001-3
Update a data resource for a
cmHandle
PATCH

{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>
}

Accept:
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
{
"categories"
: [
{
"code": "01",
"name": "SciFi",
"books": [
{
"authors": [
"Iain M. Banks"
],
"lang": "en",
"price": "895",
"pub_year": "1994",
"title": "Feersum Endjinn"
}
]
}
]
}


Under Review
5

NCMP-CM-001-8

Multiple edits under a target data
resource for a single cmHandle

PATCH

{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

}

Content-Type:
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
{
"ietf-restconf:yang-patch" : {
"patch-id" : "change-categories-names",
"edit" : [
{
"edit-id" : 1,
"operation" : "create",
"target" : "/bookstore/categories:code="01",
"value" : {
"/bookstore/categories:code" : {
"name" : "Biography"
}
}
},
{
"edit-id" : 2,
"operation" : "create",
"target" :"/bookstore/categories:code="02"",
"value" : {
"/bookstore/categories:code" : {
"name" : "Detective"
}
}
}
]
}


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]
   }
}

Under Review
6





7





8





9





10





11





12





13





14





15





16





17
Under Review345