...
'operation' Type Definitions
Operation | Description |
---|---|
create | create a new data resource if it does not already exist. If it already exists, return an error |
delete | delete a data resource if it already exists. If it does not exists, return an error |
insert | Delete a data resource if it already exists. If it does not exists, |
merge | Merge the edit value with the target data resource; create if it does not already exist |
move | Reorder the target data resource |
replace | Replace the target data resource with the edit value |
remove | Remove a data resource if it already exists |
Event Payload Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "eventId" : "9999", # some generic event uuid generated by DMI Plugin “eventCorrelationId” : “cmhandleId-001”, # cmhandleId used for event correlation "eventTime" : "2021-11-16T16:42:25-04:00", "eventSource" : "ncmp-datastore:passthrough-operational", # eventSource always specifies the datastore where the event is emanating from "eventType" : "org.onap.ncmp.cm-network-avc-event", # event type ”eventSchema” : “org.onap.ncmp:cm-network-avc-event.rfc8641", # event schema ”eventSchemaVersion” : “1.0", # event schema version "event": { "push-change-update" : { "datastore-changes" : { "ietf-yang-patch:yang-patch" : { "patch-id" : "34534ffd98", # Some unreadable patch id generated by the machine "edit" : [ { "edit-id" : "ded43434-1", "operation" : "create", "target" : "/_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1/_3gpp-nr-nrm-nrcelldu:NRCellDU=1", "value" : { "_3gpp-nr-nrm-nrcelldu:NRCellDU" : [ { "id" : 1, } ] } }, { "edit-id" : "ded43434-1-1", "operation" : "create", "target" : "/_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1/_3gpp-nr-nrm-nrcelldu:NRCellDU=1/attributes", "value" : { "attributes" : { "cId" : 511, "userLabel" : "some-cell-label", ... } } }, { "edit-id" : "ded43434-2", "operation" : "create", "target" : "/_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1/_3gpp-nr-nrm-nrcelldu:NRCellDU=1/attributes/pLMNIdList=35301", "value" : { "_3gpp-nr-nrm-nrcelldu:pLMNIdList" : [ { "mcc" : 353, "mnc" : "01", ... } } ] } }, { "edit-id" : "ded43434-3", "operation" : "merge", "target" : "/_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1/_3gpp-nr-nrm-nrcelldu:NRCellDU=3/attributes", "value" : { "attributes" : { "cId" : 412, "userLabel" : "yet-another-cell-label", ... } } }, { "edit-id" : "ded43434-4", "operation" : "delete", "target" : "/_3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1/_3gpp-nr-nrm-nrcelldu:NRCellDU=4" } ] } } } } } |
...
- NCMP is configured at startup with the cm subscription topic information (cm topic name, kafka addressing info).
Some app sends a 'CreateSubscription' event to the public cm subscription topic (cm-event-subscription).
Usecase Participants Protocol Schema Create Example Create Subscription client app → ncmp Protocol : Kafka Event
Topic : cm-avc-subscriptionCode Block language xml title Event Schema collapse true {
"version": "<event type version>",
"eventType": "subscriptionCreated",
"event": {
"subscription": {
"clientID": "<unique identifier for the client >",
"name": "<unique subscription name per client>",
"isTagged": "<yes|no>, optional parameter, default is no"
},
"dataType": {
"dataspace": "<data space>",
"dataCategory": "<data category type>",
"dataProvider": "<data provider type>"
"schemaName": "<schema name>"
"schemaVersion": "<schema version>"
},
"predicates": {
"<parameter>": "<value>",
"param2": [
"value21",
"value22"
]
}
}
}}
Code Block language xml title Create Example collapse true {
"version": "1.0",
"eventType": "subscriptionCreated",
"event": {
"subscription": {
"clientID": "SCO-9989752",
"name": "cm-subscription-001"
},
"dataType": {
"dataspace": "ALL",
"dataCategory": "CM",
"dataProvider": "CM-SERVICE"
"schemaName": "org.onap.ncmp:cm-network-avc-event.rfc8641"
"schemaVersion": "1.0"
},
"predicates": {
"datastore": “passthrough-operational",
"datastore-xpath-filter": "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/
_3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// |
//_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// |
//_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//”
}
}
}
Table 1 : Create Subscription request from App
- NCMP receives consumes the create cm subscription event and processes it as follows :
- Persist the subscription and cm-subscription-filter information to db
- Read all CM handles that match the cm-filter-subscription (model matching, cmhandleId matching)
- If a subscription is already ongoing for the same cmhandle datastore then separate them from the list for later processing (after the existing ongoing cmhandle subscription has completed - See table 3 below, administrativeState : running->active).
Use the administrativeState of cmhandle 'subscriptions' as shown in table 3 below. This can be used to know if a cmhandle subscription update is ongoing. - Merge the existing cmhandle filter (if one exists from a previous subscription) with the new cm-filter-subscription
- Record the cmhandles whose existing cm subscription filter has been modified after filter merging in step c)
- For the cmhandle(s) with a new or modified subscription filter, group them according to their controlling dmi-plugin and send one or more bulk subscription request(s) to the appropriate dmi-plugin(s).
- Change the subscription administrativeState to 'updating' for the associated datastore. Do not modify the other subscription attributes (e.g. datastore-xpath-filter) until after successful response received from dmi.
- send the a bulk subscription REST request to each dmi-plugin containing either a 'create' (where no previous subscription exists on the cmhandle) or an 'update' subscription info for each cmhandle as per table 2 below
- the REST request to the dmi-plugin is asynchronous. The dmi-plugin shall process the each of the subscription requests per cmhandle and send an event response on the dmi-cm-avc-subscription-events topic for each cmhandle.
...