Versions Compared

Key

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

...

Datastore, Paths and Format Combinations for Write Operations

  • Write operations are only supported on the ncmp-datastores:running and ncmp-datastores:passthrough-running datastores
  • The Data Target for all write operation is DMI-Plugin
  • Write operations are only supported for config=true data
  • Fields and similar parameters are not supported for write operations
Excerpt

Datastore, Paths and Format Combinations for Read Operations


StateInputBehaviorDataNotes
#Data-Sync Datastore parameter

Expected Resource-Path

format

Accept-Header

Fields

(filter)

Data Source

Included DataNodes
(config)

1OnNot SpecifiedcpsPathapplication/yang-data+jsonN/ANot supportedN/AN/A
2OnNot SpecifiedcpsPathapplication/jsonN/ANot supportedN/AN/A
3Off

Not Specified

cpsPathapplication/yang-data+json

N/A

Not supported

N/AN/A


4OffNot SpecifiedcpsPathN/AN/ANot supportedN/AN/Athere are NO DataNode objects in CPS to output as JSON)
5OffNot Specifiedother then cpsPathN/AN/ANot supportedN/AN/ANot supported Since NCMP can only convert cpsPaths
6On | Offncmp/passthrough-operational

NCMP does not parse

NCMP does not parsedepends on DMI-Plugin
(supported in ONAP)

Resolve DMI plugin

Forward request to plugin

Output received response
DMI-Pluginconfig +
non-config

The DMI plugin may error if the RP or accept header are not supported.

The DMI plugin may forward the request without processing too.
7On | Offncmp/passthrough-runningNCMP does not parseNCMP does not parsedepends on DMI-Plugin
(supported in ONAP)

Resolve DMI plugin

Forward request to plugin

Output received response
DMI-Pluginconfig-only
8Onncmp/operationalcpsPathapplication/yang-data+jsonNot supported in Istanbul releases

Read from cache

output: application/yang-data+json

CPS-Coreconfig +
non-config
NCMP/CPS-Core needs to remove DataNode wrapping

9Onncmp/operationalcpsPathapplication/jsonNot supported in Istanbul releases

Read from cache

output: application/json

CPS-Coreconfig +
non-config

10Offncmp/operationalcpsPathapplication/yang-data+json

to be determined in spike, see issue #28


Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin | Read from DMI plugin

Output application/yang-data+json

DMI-Plugin

config +
non-config


11On | Offncmp/runningcpsPathapplication/yang-data+jsonto be determined in spike, see issue #28

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin | Read from DMI plugin

Output application/yang-data+json

DMI-Pluginconfig-only

Works Items for above.

#DescriptionComponentEnables
1Forward request from NCMP to CPS-CoreNCMP8,9
2Forward request from NCMP to DMI-PluginNCMP6,7
3Convert json (dataNode) to yang-data+jsonCPS-Core/NCMP8
4Convert cpsPath to RESTConf PathNCMP10,11
5Enhance &fields parameter where neededNCMP10,11+fields option
6NOT SupportedN/A1,2,3,4,5
StateInputBehaviorNotes
#Data-Sync OperationDatastore parameter

Expected Resource-Path

format

Content-Type
1On | OffCreatencmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
2On | OffUpdatencmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
3On | OffDeletencmp/passthrough-running

NCMP does not parse

N/A

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
4On | OffPatchncmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
5On | OffCreatencmp/runningcpsPathapplication/yang-data+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)

6On | OffUpdatencmp/runningcpsPathapplication/yang-data+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)

7On | OffDeletencmp/runningcpsPathN/A

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)

8On | OffPatchncmp/runningcpsPath

application/yang-data+json

(*plain patch)

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)

9On | OffPatchncmp/runningcpsPathapplication/yang-patch+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)

REST API



Read API Example

Code Block
Scenario : Read all NRCellDU MOs with attributes userLabel and id under the _3gpp-nr-nrm-gnbdufunction:GNBDUFunction MO

Method  : GET

URI         :{ncmp-root}/ncmp/v1/ch/3445fff/data/ManagedElement[@id=Kista-001]
/GNBCUCPFunction[@id=1]?fields=_3gpp-nr-nrm-nrcelldu:NRCellDU/attributes
(administrativeState;operationalState)

Header :
      Accept : application/yang-data+json

Response :

      HTTP/1.1 200 OK
      Date: Thu, 26 Jan 2017 20:56:30 GMT
      Server: example-server
      Content-Type: application/yang-data+json


{
"_3gpp-nr-nrm-gnbdufunction:GNBDUFunction" : [
{
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [
{
"top3gpp:id" : "NR-Cell-001"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-002"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-003"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-004"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-005"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
}
]
}
]
}



Works Items for above.

#DescriptionComponentEnables
1Forward request from NCMP to CPS-CoreNCMP8,9
2Forward request from NCMP to DMI-PluginNCMP6,7
3Convert json (dataNode) to yang-data+jsonCPS-Core/NCMP8
4Convert cpsPath to RESTConf PathNCMP10,11
5Enhance &fields parameter where neededNCMP10,11+fields option
6NOT SupportedN/A1,2,3,4,5

Datastore, Paths and Format Combinations for Write Operations

  • Write operations are only supported on the ncmp-datastores:running and ncmp-datastores:passthrough-running datastores
  • The Data Target for all write operation is DMI-Plugin
  • Write operations are only supported for config=true data
  • Fields and similar parameters are not supported for write operations

StateInputBehaviorNotes
#Data-Sync OperationDatastore parameter

Expected Resource-Path

format

Content-Type
1On | OffCreatencmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
2On | OffUpdatencmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
3On | OffDeletencmp/passthrough-running

NCMP does not parse

N/A

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
4On | OffPatchncmp/passthrough-running

NCMP does not parse

NCMP does not parse (needs to be valid JSON)

Resolve DMI plugin

Forward request to plugin

Output received response (success or failure)

The DMI plugin may error if the RP or content type are not supported.

The DMI plugin may forward the request without processing too.
5On | OffCreatencmp/runningcpsPathapplication/yang-data+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)


6On | OffUpdatencmp/runningcpsPathapplication/yang-data+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)


7On | OffDeletencmp/runningcpsPathN/A

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)


8On | OffPatchncmp/runningcpsPath

application/yang-data+json

(*plain patch)

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)


9On | OffPatchncmp/runningcpsPathapplication/yang-patch+json

Resolve DMI plugin

Convert cpsPath to RESTConfPath

Forward request to plugin

Output received response (success or failure)



Sync & ModelAPI

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

{

<updated-yang-data-resource>

}

Content: application/yang-patch+json

If using yang-patch content then ds/ncmp-datastore-passthrough-running must be used by rad apps until full
support is available from NCMP/CPS

Scenario : Update _3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 with multiple operations on the tree
Method : PATCH
URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ds/ncmp-datastore-passthrough-running/ManagedElement[@id=Kista-001]/GNBDUFunction[@id=1]

Header :
Content-Type: application/yang-patch+json
Body :
{
"ietf-restconf:yang-patch" : {
"patch-id" : "change-cell-and-carriers",
"edit" : [
{
"edit-id" : 1,
"operation" : "create",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=1",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [{
"id" : 1,
"arrtibutes" : {
"cId" : 511,
"userLabel" : "some-cell-label",
...
}
}
]
}
},
{
"edit-id" : 2, "operation" : "create",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=2",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [ {
"id" : 2,
"arrtibutes" : {
"cId" : 512,
"userLabel" : "some-other-cell-label",
...
}
}
]
}
},
{
"edit-id" : 3,
"operation" : "merge",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=3",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [{
"cId" : 412,
"userLabel" : "yet-another-cell-label",
...
}]
}
},
{
"edit-id" : 4,
"operation" : "merge",
"target" : "_3gpp-nr-nrm-nrcelldu:NRCellDU=4",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [{
"cId" : 412,
"userLabel" : "yet-another-cell-label",
...
}]
}
}
]
}
}
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-cell-and-carriers",
"ok" : [null]
}
}

Scenario : Replace _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=4 txDirection
to "DL_AND_UL" under _3gpp-common-managed-element:ManagedElement=Kista001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 - removes all config params not
specified including sub-tree if one exists
Method : PUT
URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]/NRSectorCarrier[@id=4]
Header :
Content-Type: application/yang-data+json

Body :
{
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier" : [{
"id" : 4
"attributes" : {
"txDirection" : "DL_AND_UL"
}
}]
}
Expand



Req/usecase

REST

Method

 URI / Payload

Request/Response Example
1
Expand

ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}?fields={fields}

Note 'topic' and 'fields' are only supported in passthrough mode at this time (ONAP Release I). If not passthrough
then an exception is thrown from NCMP at this time.

Accept : application/yang-data+json
Always return the yang-data+json in the "data" event payload

Scenario : Read the GNBCUCPFunction for cmhandle "335ff" as passthrough
Method : GET
URI : {ncmp-root}/ncmp/v1/ch/335ff/data/ManagedElement[@id=Kista-001]
/GNBCUCPFunction[@id=1]?fields=pLMNId;gNBId;gNBIdLength
Header :
Accept: application/yang-data+json

Response :

{
"_3gpp-common-managed-element:ManagedElement" : [
{
"id"="Kista-001",
"_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction" : [
{
"id"="1",
"attributes" : {
"pLMNId : [ { "mcc" : "01", "mnc" : "123" }],
"gNBId" : 123,
"gNBIdLength" : 3
}
}
]
}
]
}

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}?fields={fields}&topic={topicId}

Note 'topic' and 'fields' are only supported in passthrough mode at this time (ONAP Release I). If not passhrough then an exception is thrown from NCMP at this time.

Accept : application/json

Always return the yang-data+json in the "data" event payload

Scenario : Read the GNBCUCPFunction for cmhandle "335ff" as passthrough
Method : GET
URI : {ncmp-root}/ncmp/v1/ch/335ff/data/ManagedElement[@id=Kista-001]
/GNBCUCPFunction[@id=1]?fields=pLMNId;gNBId;gNBIdLength&topic=some-app-topic-name
OR
{ncmp-root}/ncmp/v1/data/ch/335ff/ds/ncmp-datastores:passthrough-running?
fields=_3gpp-common-managed-element:ManagedElement/_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction(pLMNId;gNBId;gNBIdLength)&topic=some-app-topic-name

Header :
Accept: application/json

Response :
{
"responseId" : 323234
}
Event Response:
{
"requestId" : "dd3434",
"data" : {
"_3gpp-common-managed-element:ManagedElement" : [
{
"id"="Kista-001",
"_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction" : [
{
"id"="1",
"attributes" : {
"pLMNId" : [ { "mcc" : "01", "mnc" : "123" }],
"gNBId" : 123,
"gNBIdLength" : 3
}
}
]
}
]
}
}

Note : async not supported by NCMP locally in ONAP Rel I

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier[<condition>]}?fields={fields}

Accept: application/yang-data+json

Scenario : Read the LocalSctpEndpoint.(interfaceUsed==X2, sctpEndpointRef) for
cmhandle "335ff" as passthrough
Method : GET
cps-path
{ncmp-root}/ncmp/v1/ch/335ff/query/LocalSctpEndpoint[interfaceUsed=X2]?
fields=sctpEndpointRef

{ncmp-root}/ncmp/v1/ch/<cm-handle>/{data-resource-identifier}?fields={fields-expression}

options 

Req/usecase

REST

Method

 URI / Payload

Request/Response Example1Read of a data resource getting specific fields for a given cmHandle
Sync call
GET2Async read of a data resource getting
specific fields from ncmp-datastores:
passthrough-running for a given
cmHandle
GET
3

Read a data resource directly from source (passthrough) for a
cmHandle. Only return specific field(s).

Synchronous call

GET

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}?fields={fields}

Accept: application/yang-data+json

Scenario : Read the EUtranCellFDD.(administrativeState, operationalState, tac,
earfcndl, cellId, physicalLayerCellId) for cmhandle "335ff"
Method : GET
URI : ?
Header :
Accept: application/yang-data+json
4

Read a data resource with some leaf value condition directly from the source
(passthrough) for a cmHandle. Only
return specific field(s).

Synchronous call

GET5

Read descendant data resources with 
specified fields under a  given data 
resource for a given cmHandle

GET
OptionDescription
fieldsRequest a subset of the target
resource contents

Scenario : Read all NRCellDU MOs with attributes userLabel and id under the _3gpp-nr-nrm-gnbdufunction:GNBDUFunction MO

Method  : GET

URI         :{ncmp-root}/ncmp/v1/ch/3445fff/data/ManagedElement[@id=Kista-001]
/GNBCUCPFunction[@id=1]?fields=_3gpp-nr-nrm-nrcelldu:NRCellDU/attributes
(administrativeState;operationalState)

Header :
      Accept : application/yang-data+json

Response :

      HTTP/1.1 200 OK
      Date: Thu, 26 Jan 2017 20:56:30 GMT
      Server: example-server
      Content-Type: application/yang-data+json

    

{
"_3gpp-nr-nrm-gnbdufunction:GNBDUFunction" : [
{
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : [
{
"top3gpp:id" : "NR-Cell-001"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-002"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-003"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-004"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
},
{
"top3gpp:id" : "NR-Cell-005"
"attributes" : {
"administrativeState " : "LOCKED",
"operationalState" : "disabled"
}
}
]
}
]
}
6Create a data resource for a cmhandlePOST

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{parent-data-resource-identifier}

{

  <new-yang-data-resource>

}

Content: application/yang-data+json

Scenario : Create nrsectorcarrier-vdu-add:NRSectorCarrier=4 under _3gppcommon-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1
Method : POST
URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]

Header :
Content-Type: application/yang-data+json
Body :
{
"_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier" :[ {
"id" : 4
"cld" : 5
"attributes" : {
"userLabel" : "nrSectorCar-4",
"txDirection" : "DL_AND_UL",
"configuredMaxTxPower" : "90",
"arfcnDL" : "9999999",
"arfcnUL" : "888888",
"bSChannelBwDL" : "90",
"bSChannelBwUL" : "80"

}
}]
}
7Update a data resource for a cmhandle
with plain-patch update
PATCH

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

{

<updated-yang-data-resource>

}

Content: application/yang-data+json

Behaves as a merge - merge with existing if it exists or create if it does not exist.

Scenario : Update _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=4 txDirection
to "DL_AND_UL" under _3gpp-common-managed-element:ManagedElement=Kista001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1
Method : PATCH
URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]/NRSectorCarrier[@id=4]
Header :
Content-Type: application/yang-data+json
Body :

{
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier" : [{
"id" : 4
"attributes" : {
"txDirection" : "DL_AND_UL"
}
}]
}
8Update a data resource with multiple
edits for a cmhandle with yang-patch
update
PATCH9Replace a data resource for a cmhandlePUT

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

{

<yang-data-resource-for-replace>

}

Content: application/yang-data+json

10Delete a data resource for a cmhandleDELETE{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifierScenario : Delete nrsectorcarrier-vdu-add:NRSectorCarrier=4 under _3gppcommon-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:
GNBDUFunction=1
Method : DELETE
URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]/NRSectorCarrier[@id=4]
Header :
Accept: application/json
Body :
{}
11Get all cmhandles that support a given
module
GET{ncmp-root}/ncmp/v1/ch/data?module={module-name}
Content: application/json
Scenario : Get the all cmhandles that support a given module
Method : GET
URI : {ncmp-root}/ncmp/v1/ch/data?module=_3gpp-nr-nrm-gnbdufunction
Header :
Accept: application/json
Response:
{
cm-handles : [ "ew534fe", "23ft4", "434fsdf", ... ]
}
122Request (trigger) Data SyncPOST

{ncmp-root}/ncmp/v1/ch/<ch-handle>/sync-data

Scenario : Client requests to sync a node

URI : {ncmp-root}/ncmp/v1/ch/node123/sync-data

Response   : HTTP-Status code (only, no body)

133Get model info for CMHandleGET

{ncmp-root}/ncmp/v1/ch/{cm-handle}/modules

Scenario : Get the model data for CMHandle

Method  : GET

URI :{ncmp-root}/ncmp/v1/ch/2334dedf/modules

Header :
      Accept: application/yang-data+json

Response:

{
"ietf-yang-library:modules-set" : [ # from RFC 8525
{
"name" : "5479120c17a619545ea6aff7aa19838b036ebbd7",
"module" : [
{
"name" : "_3gpp-nr-nrm-nrsectorcarrier",
"revision" : "2020-12-09",
"namespace" : "urn:3gpp:sa5:_3gpp-nr-nrmnrnetwork-nrsectorcarrier",
"location" : "http://emsadapter.com/modules/_3gppnr-nrm-nrsectorcarrier",
"submodule" : [
{
"name" : "xxxx-module",
"revision" : "2020-12-17",
"namespace" : "urn:3gpp:sa5:xxx-module",
"submodule" : [
{
...
}
]
}
]
},
{
"name" : "ietf-yang-library",
"revision" : "2016-06-21",
"namespace" : "urn:ietf:params:xml:ns:yang:ietfyang-library"
}
]
}


...