Versions Compared

Key

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

...

A client app may subscribe on change notification on different datastores.  From a client app perspective each client subscription will be treated independently BUT internally the subscriptions will be merged and published on one or more collective CM topics based on target groups.  The CM ALL target group is the default and ALL CM notifications are directed to the associated cm-events topic.  
iiii
mmmm

Create Subscription

The Create Subscription flow is as follows : 

...

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

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

Code Block
languagexml
titledmi-cm-avc-subscription schema
collapsetrue
{

  "eventId"               : "00001",   (M)
  "eventCorrelationId     : "cmhandle-001" (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”                     : “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" : ""
             }
         }  
    }

}



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.

Code Block
languagexml
titlecmhandle data in NCMP DB
collapsetrue
{
     "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'
                 "subscriptionId" : "cc77765sddf",
                 "datastore-xpath-filter" : <xpath-filter>
            },

          "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.

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

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

Code Block
languagexml
titledmi-cm-avc-subscription-events schema
  
collapsetrue
{
  


  "eventId"
                                 : 
               : "00001",   (M)


  "eventCorrelationId     : "cmhandle-001" (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”           :

  ”eventSchema”           : “org.onap.ncmp:cm-avc-subscription-event",            (M)

  

  "eventSchemaVersion"   
     
 :
 
 "1.0"
            
            (M)


 


  "event":
{
         “cmHandleId” : “cmhandle-001
 {
         “cmHandleId”                     : “cmhandle-001”,(M)


         "subscriptionResponse" :                         (M)


             "subscriptionType"           : "modify",     (M)

             “subscriptionRequestStatus”  :

             “subscriptionRequestStatus”  : “success”,     (O)

             “subscriptionId”             : “cc77765sddf”, (O - Mandatory if

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


             "predicates" : {


                 "datastore" : "passthrough-operational",


                 "datastore-xpath-filter" : "....."


             }


      
  
   }  


    }


}



                           Table 3.   DMI plugin sends Subscription Response to NCMP

...