Versions Compared

Key

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

...

  1. NCMP is configured at startup with the cm subscription topic information (cm topic name, kafka addressing info).
  2. Some app sends a 'CreateSubscription' event to the public cm subscription topic (cm-event-subscription).

    Create Subscription  :   client app → ncmpCreate Example

    {
      "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"
          ]

        }
      }
    }

    {
      "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-notification-event"
          "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

  3. NCMP receives consumes the create cm subscription event and processes it as follows : 
    1. Persist the subscription and cm-subscription-filter information to db
    2. Read all CM handles that match the cm-filter-subscription (model matching, cmhandleId matching)
    3. If a subscription is already ongoing for a cmhandle then separate them from the list for later processing (after the existing ongoing cmhandle subscription has completed).
      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.
    4. Merge the existing cmhandle filter (if one exists from a previous subscription) with the new cm-filter-subscription
    5. Record the cmhandles whose existing cm subscription filter has been modified after filter merging in step c)
  4. 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 contains 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 only for cmhandles that fail to subscribe successfullyresponse on the dmi-cm-avc-subscription-events topic for each cmhandle
UsecaseParticipants Request SchemaRequest Example
Register Subscriptionsncmp → dmi

Protocol : REST
Method : POST
URI : /ncmpInventory/v1/subscriptions

{
  "subscriptions" : [
      {  
          "cmhandleId" : "<cmhandle-id>",
          "subscriptionType": "subscriptionCreated | subscriptionUpdated | subscriptionDeleted",
          "existingSubscriptionId" : "<existing subscription-id on remote device>,
                                                      optional, required for subscriptionUpdated | subscriptionDeleted",
          "schemaName": "<schema name>, default is org.onap.ncmp.cm-notification-event",
          "schemaVersion": "<schema version>, default is latest",
          "isTagged": "<yes|no>, optional parameter, default is no",
          "predicates": {
               "<parameter>": "<value>",
               "param2": [
                      "value21",
                      "value22"
                ]
          },
          "cmhandleProperties"  : [ 
                  <all-cmhandle-properties-as-per-normal-crud-request>
          ]
      }
  ]
}

Protocol : REST
Method :
POST
URI :
/ncmpInventory/v1/subscriptions

{
  "subscriptions" : [
      {  
          "cmhandleId" : "e34553",              (M)
          "subscriptionType": "create",        (M)
          "schemaName": "org.onap.ncmp.cm-notification-event",    (O)
          "schemaVersion": "1.0"    (O)
          "isTagged": "yes",             (O)
          "predicates"  :   {              (M)
                "datastore": “passthrough-operational",  (O)
                "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//”  
          },
          "cmhandleProperties"  : [
                  <all the cmhandle properties>
           ]
      },
      {  
          "cmhandleId" : "gg8769",             (M)
          "subscriptionType": "update",        (M)
          "existingSubscriptionId" : "6738462g3494hw9",   (O)
          "schemaName": "org.onap.ncmp.cm-notification-event",    (O)
          "schemaVersion": "1.0"    (O)
          "isTagged": "yes",             (O)
          "predicates"  :   {              (M)
                "datastore": “passthrough-operational",  (O)
                "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//”  
          },
          "cmhandleProperties"  : [
                  <all the cmhandle properties>
           ]
      }
  ]
}

                Table 2 : Register Subscriptions with DMI plugin

5. dmi-plugin loops through the cmhandle subscriptions and creates a new subscription or modifies an existing subscription for the remote 'device' associated with the cmhandle.
6. dmi-plugin calls back to NCMP to notify of the newly created or updated subscription
7. NCMP updates its subscription registry with the new subscription information 

UsecaseparticipantsRequest Schema / ExampleNCMP Action
Notify of create subscription request success
on passthrough-operational datastore -
success case
dmi → ncmp

Protocol : Kafka Event
Topic : dmi-cm-avc-subscription-events
  

{

  "eventId"                                 : "00001",   (M)
  "eventCorrelationId     : "cmhandle-001" (M)    
  "eventTime"                             : "2021-11-16T16:42:25-04:00",                          (M)
  "eventSource"                         : "org.onap.dmi",                                       (M)

               

 

  


  "eventType"                             : "org.onap.ncmp:cm-avc-subscription-event.response",   (M)
  ”eventSchema”           : “org.onap.ncmp:cm-avc-subscription-event",            (M)
  "eventSchemaVersion"         : "1.0"            (M)
 
  "event": {
         “cmHandleId” : “cmhandle-001”,(M)
         "subscriptionResponse" : {                         (M)
             "subscriptionType"           : "created",     (M)

             “subscriptionRequestStatus”  : “success”,     (O)
             “subscriptionId”             : “cc77765sddf”, (O - Mandatory if subscriptionRequestStatus=success)
             "predicates" : {
                 "datastore" : "passthrough-operational",
                 "datastore-xpath-filter" : ""
             }

         }  
    }

}

register the new subscription data  with the cmhandle :

Store the datastore subscription data in the cmhandle.  Also store the administrativeState that may be used to prevent race conditions between parallel subscriptions being applied.

cmhandle data in NCMP DB
{
     "cmhandleId" : <cmhandle-id>

     "subscriptions" :  {
          "operational" : {    # 'local' ncmp subscription is required with the cmhandle - store separately?
                 "administrativeState" : "active",
                 "datastore-xpath-filter" : <xpath-filter>
            },

          "running" : {   # 'local' ncmp subscription is required with the cmhandle - store subId separately?
                 "administrativeState" : "active",
                 "datastore-xpath-filter" : <xpath-filter>
            },

          "passthrough-operational" : {
                 "administrativeState" : "updating",   # if 'updating' then block/queue new sub's until 'active'
                 "dmiSubscriptionId" :

<sub-id-of-device">

"cc77765sddf",
                 "datastore-xpath-filter" : <xpath-filter>
            },

          "passthrough-running" : {
                 "administrativeState" : "active",
                 "dmiSubscriptionId" : <sub-id-of-device">,
                 "datastore-xpath-filter" : <xpath-filter>
            }

    }
}


Once NCMP receives the notification response       

     

  

Notify of modify subscription request success
on passthrough-operational datastore -
success case
dmi → ncmp

Protocol : Kafka Event
Topic : dmi-cm-avc-subscription-events
  

{

  "eventId"                                 : "00001",   (M)
  "eventCorrelationId     : "cmhandle-001" (M)    
  "eventTime"                             : "2021-11-16T16:42:25-04:00",                          (M)
  "eventSource"                         : "org.onap.dmi",                                       (M)

         
  

      

  

"eventType"                             : "org.onap.ncmp:cm-avc-subscription-event.response",   (M)
  ”eventSchema”           : “org.onap.ncmp:cm-avc-subscription-event",            (M)
  "eventSchemaVersion"         : "1.0"            (M)
 
  "event": {
         “cmHandleId” : “cmhandle-001”,(M)
         "subscriptionResponse" : {                         (M)
             "subscriptionType"           : "created",     (M)

             “subscriptionRequestStatus”  : “success”,     (O)
             “subscriptionId”             : “cc77765sddf”, (O - Mandatory if subscriptionRequestStatus=success)
             "predicates" : {
                 "datastore" : "passthrough-operational",
                 "datastore-xpath-filter" : ""
             }

         }  
    }

}


                           Table 3.   DMI plugin sends Subscription Response to NCMP

8. 

Update Subscription



Topics 

...