You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

References

CPS-1065 - Getting issue details... STATUS

Open Issues & Decisions

#IssueNotesDecision
1List scenariosNeed to clarify scenariosRefer to Internal study
2Topicswhat topics are used in what scenario (topic for each Datastore ?)

See Topics section below.


All NCMP notifications to be published on the public cm-events topic by default regardless of data type, notification type or datastore the change came from.  This topics acts as the TBAC_ALL topic.

cm-events topic name should be configurable in deployment settings.


Future : In future NCMP shall publish the notification based on TBAC where the notification is published on the appropriate target group topic cm-events[-<target-group-name>] matching the target group(s) the data type(s) is associated with.  Not in scope of this story.

3Handle unknown event schemasWrap event?Unsupported for now.  Thrown exception and log error.












Event Flow Sketch


CM Event Specification Outline

{

  "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"                  : "org.onap.ncmp",                                                  
  "eventType"                      : "org.onap.ncmp.cm-network-avc-event",           # event type for async request response events 
  ”eventSchema”                 : “rfc8641",           # event schema for async request response events 
  ”eventSchemaVersion”    : “v1",                                                                        # event schema version

  "event":  {
              <RFC 8641-yang-datastore-notification-payload>                               # See next slide for example
   }

}

RFC 8641 : yang-datastore notification definition

notifications:

          +---n push-update

          |  +--ro id?                   sn:subscription-id

          |  +--ro datastore-contents?   <anydata>

          |  +--ro incomplete-update?    empty

          +---n push-change-update {on-change}?

             +--ro id?                   sn:subscription-id

             +--ro datastore-changes

             |  +--ro yang-patch

             |     +--ro patch-id    string

             |     +--ro comment?    string

             |     +--ro edit* [edit-id]

             |        +--ro edit-id      string

             |        +--ro operation    enumeration

             |        +--ro target       target-resource-offset

             |        +--ro point?       target-resource-offset

             |        +--ro where?       enumeration

             |        +--ro value?       <anydata>

             +--ro incomplete-update?    empty


'operation' type definition

Event Payload Example

 Proposed CM event

{

  "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"               : "org.onap.ncmp",                                                  
  "eventType"                  : "org.onap.ncmp.cm-notification-event",                 # event type 
  ”eventSchema”             : “org.onap.ncmp:cm-notification-event",                 # event schema   
  ”eventSchemaVersion” : “v1",                                                                         # 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"
            }
        ]
     }
   }
 }

    }
}

CM Change Event Subscription Proposal

Create Subscription

The Create Subscription flow is as follows : 

 


Subscription Steps :

  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//”  

        }
      }
    }

  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).
    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).
             -  the bulk subscription REST request to each dmi-plugin contains either a 'create' (where no previous subscription exists on the cmhandle) or an 'update' subscription for each cmhandle
             - 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 successfully. 
UsecaseProtocol Request SchemaRequest Example
Register Subscriptions<<REST>>
ncmp → dmi

POST /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"
                ]
          }
      }
  ]
}

POST /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//”  
          }
      },
      {  
          "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//”  
          }
      }
  ]
}


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 

Usecase

Notify of subscription request completion<<event>>
dmi → ncmp

8. 

Update Subscription



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
cm-avc-dmi-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

   

Topic partitioning

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



  • No labels