Versions Compared

Key

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

...

UsecaseParticipants Request SchemaRequest Example
Register Subscriptionsncmp → dmi

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

Request Body:

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


Response :

202 Accepted 

{ }

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

Request Body:

{
  "subscriptions" : [
      {  
          "cmhandleId" : "e34553",              (M)
          "subscriptionType": "create",        (M)
          "schemaName": "org.onap.ncmp:cm-network-avc-event.rfc8641",    (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-network-avc-event.rfc8641",    (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>
           ]
      }
  ]
}

Response :

202 Accepted 

{ }

...

Any cmhandle subscription requests that were queued during an ongoing subscription request on the same datastore shall be processed once the previous subscription has completed (cmhandle.subscriptions.<datastore>.administrativeState goes to active).
The cmhandle subscription filters will need to be re-merged with the newly registered cmhandle subscription filters before being applied to the appropriate datastore.

...

See below Request example showing the delete example (in green bold)

UsecaseParticipants Request SchemaRequest Example
Register Subscriptionsncmp → dmi

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

Request Body:

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


Response :

202 Accepted 

{ }

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

Request Body:

{
  "subscriptions" : [
      {  
          "cmhandleId" : "e34553",              (M)
          "subscriptionType": "create",        (M)
          "schemaName": "org.onap.ncmp:cm-network-avc-event.rfc8641",    (O)
          "schemaVersion": "1.0"    (O)
          "isTagged": "yes",             (O)
          "predicates"  :   {              (O)
                "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"  : [          (M)
                  <all the cmhandle properties>
           ]
      },
      {  
          "cmhandleId" : "gg8769",             (M)
          "subscriptionType": "update",        (M)
          "existingSubscriptionId" : "6738462g3494hw9",   (O)
          "schemaName": "org.onap.ncmp:cm-network-avc-event.rfc8641",    (O)
          "schemaVersion": "1.0"    (O)
          "isTagged": "yes",             (O)
          "predicates"  :   {              (O)
                "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"  : [          (M)
                  <all the cmhandle properties>
           ]
      },
      {  
          "cmhandleId" : "ff56743",             (M)
          "subscriptionType": "delete",    (M)
          "subscriptionId" : "6738462g3494hw9",   (O but must be set for update or delete subscriptionType)
          "cmhandleProperties"  : [            (M)
                  <all the cmhandle properties>
           ]
      }
  ]
}

Response :

202 Accepted 

{ }

CM AVC Subscription Response - delete dmi subscription case 

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

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

{

  "eventId"                                 : "00001",   (M)
  "eventCorrelationId     : "ff56743" (M)    
  "eventTime"                             : "2021-11-16T16:42:25-04:00",                          (M)
  "eventSource"                         : "ncmp-datastore:passthrough-operational",             (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” : “ff56743”,(M)
         "subscriptionResponse" : {                         (M)
             "subscriptionType"           : "delete",     (M)

             “subscriptionRequestStatus”  : “success”,     (O)
             “subscriptionId”             : “cc77765sddf”, (O - Mandatory if subscriptionRequestStatus=success)
         }  
    }

}

NCMP register the new cmhandle subscription data.

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" : "running"             →   'inactive'
                 "subscriptionId" : "cc77765sddf",          →   remove or set to ""
                 "datastore-xpath-filter" : <xpath-filter>  →  remove or set to ""
            },

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

    }
}


Once NCMP receives the subscription response if shall update the cmhandle subscription state attributes as described in step 7.


Topics 

Topic types

Topic NameDescriptionDirection
cm-avc[-<targetgroup>] topic for publication of events from NCMP to clients (suggest to rename existing topic from 'ncmp-events' to cm-avc).  In preparation to future needs the there may be separate topics for different security groups.  NCMP solution should consider this in its design this upfront.  By default cm-avc is the default topic where ALL events are published by default.  Different client may subscribe to different topics (ALL and/or target group specific).  It is their responsibility to subscribe to the appropriate topics as new target groups come into existance.  For now the only topic in scope of this story is the 'cm-avc' topic.ncmp → client consumer
dmi-cm-eventsinternal topic for communications between dmi-plugin ↔ ncmp for avc and subscription eventsncmp→ dmi 
cm-avc-subscriptiontopic for avc event subscriptions.  This topic may be (pre)defined external to NCMP.  If externally defined topic then it shall be possible to tell NCMP the topic name and where to find it.client → ncmp
dmi-cm-avc-subscriptiontopic for avc event subscriptions event toward dmi plugin(s).  This topic is internally defined by NCMP.  All CM AVC subscriptions will be sent from NCMP to DMI plugins via this topic.

ncmp → dmi for  subscription LCM

dmi → ncmp register device subscription in cmhandle

...

All events for the same cmhandleId should be sent to the same partition.  This will guarantee ordering.  Ordering is only guaranteed per topic, not across topic (future consideration).


Subscription Database Sketch


Gliffy Diagram
macroId0a13d2bc-9e88-445b-a9a3-186198534d52