...
Expand |
---|
|
| Usecase | REST Method | URI |
---|
1 | Add a data resource for a cmHandle | POST | {dmiRoot}/dmi/v1/ch/<cmhandle>/data/ds/ncmp-datastore:running/{parentDataResourceIdentifier} { <new-yang-data-resource> } Content-Type: application/json "data" payload : yang-data+json | 2 | Delete a data resource for a cmHandle | PUT | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier} | 3 | Patch a data resource for a cmHandle | PATCH | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier} { <yang-data-for-merging> } Content-Type: application/json "data" payload : yang-data+json | 4 | Patch multiple child resources for a single cmHandle | PATCH | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/<dsName>/{resourceIdentifier}
Content-Type: application/json "data" payload : yang-patch+json | 5 | Execute a yang action on a cmhandle instance | POST | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}/{action}
input: { "param1Name" :"param1Value”, "param2Name" : "param2Value” }
Note : If the "action" statement has no "input" section, the request message MUST NOT include a message-body | 6 | Execute an rpc operation | POST | {dmiRoot}/dmi/v1/operations/ch/<cmHandle>/ds/ncmp-datastore:operational/ {module-name}:{action} { input: { "param1Name" : "param1Value”, "param2Name" : "param2Value” } } Note: If there is no "input" section, the request MUST NOT include a message-body | 7 | Read a filtered set of data under a data resource for a cmHandle | PUT | {dmiroot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}?fields={fields-expression} Option | Description |
---|
fields | Request a subset of the target resource contents |
| 8 | Read data resources with specified fields under a given data resource for a given cmHandle | PUT | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}?fields={fields-expression}
Option | Description |
---|
fields | Request a subset of the target resource contents |
| 9 | Get data resource with 'fileds' for a cmhandle with a given scope condition | PUT | {dmiRoot}/dmi/v1/ch/{cmHandle}/data/ds/ncmp-datastore:operational/{resourcepath}?fields={fields}&scope={scope} | 10 | Read descendant nodes to a given depth for a given cmHandle | PUT | {dmiRoot}/dmi/v1/ch/{cmHandle}/data/ds/ncmp-datastore:operational/{resourceIdentifier}?depth={level}
Option | Description |
---|
depth | Request limited sub-tree depth in the reply content If '1' then only immediate resource is retrieved If '2' then resource plus next level resources are retrieved |
| 11 | Replace data for a CMHandle | PUT | {dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier} {data : { .... the complete tree config to be replaced }} |
|
...
Expand |
---|
|
*For response output, where applicable the yang-library format and conventions are used 'as is' or extended # | Use Case | Rest Method | Service | URI | Example* |
---|
1 | Get module set for a cmhandle
| POST | dmiPlugin | {dmiRoot}/dmi/v1/ch/cmhandle-001/modules | Header : Content-Type: application/json
Code Block |
---|
language | xml |
---|
title | Request Body |
---|
| {
"operation": "read",
"cmHandleProperties ": {
"subSystemId": "system-001"
}
}
} |
Code Block |
---|
language | xml |
---|
title | Response Body |
---|
|
Response:
"schemas": [
{
"moduleName": "example-identifier",
"revision": "example-version",
"namespace": "example-namespace"
},
{
...
}
]
} |
| 2 | Get yang module source for a list of modules | POST | dmiPlugin | {dmiRoot}/dmi/v1/ch/<cmHandle>/moduleSources
DMI Plugin will make multiple requests to xNF and combine the result in a list |
Code Block |
---|
language | xml |
---|
title | Request Body |
---|
| {
"operation": "read",
"dataType": "application/json",
"data": {
"modules": [
{
"name": "pnf-sw-upgrade",
"revision": "2019-12-03"
}
]
},
"cmHandleProperties": {
"subSystemId": "system-001"
}
} |
Response: a list yang module references and source for each
Code Block |
---|
language | xml |
---|
title | Response Body |
---|
| [ {
"name" : "pnf-sw-upgrade",
"revision" : "2019-12-03",
"yang-source": "some-source", {...} ] |
|
|
GET Request with body
The HTTP libraries of certain languages (notably JavaScript) don’t allow GET requests to have a request body. In fact, some users are surprised that GET requests are ever allowed to have a body.
...