References

CPS-1616 - Getting issue details... STATUS

CM Data Notification Subscription LCM (incl. merge)

Impl. Proposal CM Event Subscription LCM: Create

CPS-1776 - Getting issue details... STATUS

CPS-2251 - Getting issue details... STATUS

Out-of-scope

  • Working with wildcards and subscription update which will be taken care by a separate epic.
  • Subscription create ( done as part of a different story ) 
  • Merging of the ongoing subscriptions.


Assumptions

#

Issue

Notes

Decisions

1Delete use case works for a valid ongoing subscription only.

2Works only for the passthrough datastores.


Issues & Decisions

#

Issue

Notes

Decisions

1

Delete the subscription from the database?

 We plan to do it when we receive response from the DMI plugins and the underlying subscriptions from the devices are deleted.


2What do we need to send to the DMI Plugin so that they are able to decide that how to delete the ongoing subscription.

  We are sending cmHandle information and predicates information ( datastore , xpaths and cmHandle ) and private cmHandle properties.


3Who should be able to retry and make sure the subscriptions are deleted from the respective DMIs managing the devices.

kieran mccarthy  The agenda for the next meeting. We can decide then.

More on the "DELETING" stage ( if we want to have it ) 

kieran mccarthy As discussed on , The DME should be able to maintain Subscription State and make decision when to retry based on the response outcome we provide to it for create and/or delete use cases.


4DME to NCMP Event to have targets and datastore-xpath-filter information for the subscription delete use case ?

kieran mccarthy  As per the discussion today   we agreed to use targets , datastore-xpath-filters and datastores for the subscription delete use case.

5Do we send additional properties from NCMP to DMI

  We are sending additional/private properties as of now.


6Can the DMI Plugin REJECT the Cm Subscription Delete Request ?

kieran mccarthy  Wanted to check if this is the VALID use case we have ?


Algorithm for CM Subscription Delete


Cm Subscription Delete Algo DME to send Cm Subscription Delete Request NCMP to extract out subscriptionId using subscriptionId , Query all the ONGOING ACTIVE Cm Subscriptions Populate details in Cm Notification Subscription Cache all the Subscription predicates are part of other ongoing SubscriptionsYESNO directly delete the subscriptionId from the ongoing subscribers list from DB mark the subscription delete request as ACCEPTED in the cache respond back to the client with ACCEPTED for all the 'last lights out' predicate information call the DMI Plugin DMI Plugin accepts the delete requestYESNO using the information present in cmNotificationSubscriptionCache, delete the records from DB mark the subscription delete request as ACCEPTED in the cache respond back to the client with ACCEPTED dont delete any records from DB mark the subscription delete request as REJECTED in the cache respond back to the client with REJECTED cleanup the cache

  1. Capture Incoming subscriptionId from the client.
  2. Query the existing subscriptions we are tracking using the subscriptionId we got from the Cm Subscription Delete request.
  3. Populate the cmSubscriptionCache with the relevant details ( this will be later used to send the response and manage the subscription ) using the above query we did.
  4. Now check if the details we have are ALL the last subscribers or not.
    1. if all are NOT the last subscribers then we can right away delete it from the DB and send back the response to the client without sending any request to the DMI.
    2. if we have mixed records then we need to make a call to the DMI for the "last lights out" to get Acceptance from DMI 
  5. if DMI accepts it , then whatever we have in the cache can be used to DELETE the rows from the DB ( similar to what we did for create )
  6. Once the rows are deleted then we can send back the response to the client and clear up the cache ( for ACCEPTED/REJECTED )


Subscription Delete Sequence Diagram

CmSubscription Delete Exclusive Usecase DME DME NCMP NCMP CPS-DB CPS-DB DMI-PLUGIN DMI-PLUGIN 1'Request to delete the CmSubscription using subscriptionId' 2'Check if the CmSubscription is fully shared or exclusive per DMI' 3'for exclusive CmSubscription(part of the subscription) notify the "DMI-PLUGIN"s to ACCEPT/REJECT the subscription' 4'Request ACCEPTED by "DMI-PLUGIN"' 5'Delete the CmSubscription from the database and update the cache with ACCEPTED' 6'Respond with the status as ACCEPTED'


CmSubscription Delete Shared Usecase DME DME NCMP NCMP CPS-DB CPS-DB 1'Request to Delete the CmSubscription using subscriptionId' 2'Check if the CmSubscription is fully SHARED or EXCLUSIVE per DMI' 3'for SHARED CmSubscription dont notify the "DMI-PLUGIN"s' 4'Delete the CmSubscription from the database and update the cache with ACCEPTED' 5'Respond with the status as ACCEPTED'

Schema Definitions

  1. DME to NCMP Cm Subscription Delete Request


    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1idheaderString
    Y
    2versionheaderString 1.0Y
    3

    source

    headerStringDMEY
    4

    type

    headerStringsubscriptionDeleteRequestY
    5

    dataschema

    headerURIorg.onap.ncmp.cm.subscription:1.0.0Y
    6

    data


    Object
    Y
    7

    subscriptionId

    dataStringcm-subscription-001Y
    8

    predicates

    dataObject
    N


    Example

    DME to NCMP Cm Subscription Delete Request
    id : random-UUID
    version : "1.0"
    source : "DME"
    type : "subscriptionDeleteRequest",
    dataschema : org.onap.ncmp.cm.subscription:1.0.0  {
      "data": {
        "subscriptionId": "unique subscription id" // mandatory
    }



  2. NCMP to DMI-Plugin Subscription Request


    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1idheaderString
    Y
    2versionheaderString 1.0Y
    3

    source

    headerStringNCMPY
    4

    type

    headerStringsubscriptionDeleteRequestY
    5

    dataschema

    headerURIorg.onap.ncmp.dmi.cm.subscription:1.0.0Y
    6

    correlationid

    headerStringsubscriptionId#dmiPluginNameYConcatenation of subscriptionId and dmi plugin name
    7

    data


    Object
    Y
    8

    cmHandles

    dataArray
    Y
    9

    cmhandleId

    cmHandlesString
    Y
    10

    privateProperties

    cmHandlesMap
    N
    11

    predicates

    dataArray
    N
    12

    targetFilter

    predicatesArray of String
    Ylist of cm handle ids
    13

    scopeFilter

    predicatesObject
    N
    14

    datastore

    scopeFilterString
    Yncmp-datastore:passthrough-operational OR ncmp-datastore:passthrough-running 
    15

    xpathFilter

    scopeFilterArray of String
    Y


    Example

    NCMP to DMI-Plugin Subscription Request
    id : random UUID
    version : 1.0
    source : "NCMP"
    type : "subscriptionDeleteRequest"
    dataschema : org.onap.ncmp.dmi.cm.subscription:1.0.0
    correlationId ( concatenation of subscriptionId and dmi-plugin-name with a separator)
     
    {
      "data": {
        "cmhandles" : [ // mandatory
        {
            "cmHandleId": "cmhandle1",
            "private-properties": {...}
        },
        {
            "cmHandleId": "cmhandle2",
            "private-properties": {...}
        },
        {
            "cmHandleId": "cmhandle3",
            "private-properties": {...}
        }
        ]
        "predicates": [
        {
            “targetFilter” :  [“cmHandle1”, “cmHandle2”, "cmhandle3"], // mandatory
            "scopeFilter" : {
               "datastore": “ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running", // optional. default is passthrough-operational
               "xpath-filter": list of valid xpaths  // mandatory
          }
        },  
        {
            “targetFilter” :  [“cmHandle1”, “cmHandle2”, "cmhandle3"],
            "scopeFilter" : {
               "datastore": “ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running", // optional. default is passthrough-operational
               "xpath-filter": list of valid xpaths  *
          }
        }
      ]
    }



  3. DMI-Plugin to NCMP Cm Subscription Delete Response


    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1idheaderString
    Y
    2versionheaderString 1.0Y
    3

    source

    headerStringDMEY
    4

    type

    headerStringsubscriptionDeleteResponseY
    5

    dataschema

    headerURIorg.onap.ncmp.dmi.cm.subscription:1.0.0Y
    6

    correlationid

    headerStringsubscriptionId#dmiPluginNameYConcatenation of subscriptionId and dmi plugin name
    7

    data


    Object
    Y
    8

    statusCode

    dataString
    Y1 - Accept the subscription request
    104 - Reject the subscription request
    9

    statusMessage

    dataString
    Y

    ACCEPTED

    REJECTED


    Example

    DMI-Plugin to NCMP Cm Subscription Delete Response
    id : random UUID
    version : "1.0"
    source : <dmi-plugin-name>
    type : "subcriptionDeleteResponse"
    dataschema : org.onap.ncmp.dmi.cm.subscription:1.0.0
    correlationid : ( concatenation of subscriptionId and dmi-plugin-name with a separator)
    {
    "data" : {
       "statusCode": "1/104",  // mandatory
       "statusMessage" : "ACCEPTED/REJECTED" // mandatory
     }
    }



  4. NCMP to DME Cm Subscription Delete Response


    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1idheaderString
    Y
    2versionheaderString 1.0Y
    3

    source

    headerStringDMEY
    4

    type

    headerStringsubscriptionDeleteResponseY
    5

    dataschema

    headerURIorg.onap.ncmp.cm.subscription:1.0.0Y
    6

    correlationid

    headerStringsubscriptionIdY
    7

    data


    Object
    Y
    8

    subscriptionId

    dataString
    Y
    9

    acceptedTargets

    dataArray of String
    N
    10

    rejectedTargets

    dataArray of String
    N
    11

    pendingTargets

    dataArray of String
    N


    Example

    NCMP to DME Cm Subscription Delete Response
    id : random UUID
    version : "1.0"
    source : "NCMP"
    type : "subcriptionDeleteResponse",
    dataschema : org.onap.ncmp.cm.subscription:1.0.0,
    correlationid : <subscriptionId> {
      "data": {
            "subscriptionId": "sample-subscription-id", // mandatory
            "acceptedTargets" : ["ch-1", ...], // optional
            "rejectedTargets" : ["ch-1", ...], // optional
            "pendingTargets" : ["ch-1", ...],  // optional
      }
    }




  • No labels