Versions Compared

Key

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

...

  1. We get a new subscription create request.

    Code Block
    {
    "subscriptionId" : "B-52",
    "predicates" : [
      {
    	"targets": [ch-2],
        "datastore" : "ncmp-datastore:passthrough-operational",
    	"datastore-xpath-filter" : ["p2/c2" , "p3/c3"]
    	}
    ]
    
    }


  2. We now look at the "ActiveSubscriptions"  if we already have an active subscription either for a combination of "cmhandle and xpath filter and the datastore".

    Current view of ActiveSubscriptions

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational


    Check if we have ch-2 , p2/c2 and ncmp-datastore:passthrough-operational then directly add to the ActiveSubscription.
    Similarly check for ch-3 , p3/c3 and ncmp-datastore:passthrough-operational ( which in this case will not be directly to the active subscription)

  3. Now the state of ActiveSubscription is :

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p2/c2ncmp-datastore:passthrough-operational


    and state of the in-memory datastructure is as follows.

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]PENDING



  4. Now we send the request to DMI plugin (dmi-1) with just the private properties of the ch-2 with the delta xpath.
    1. DMI Plugin could either apply the whole subscription request or reject the whole subscription. i.e respond with accepted/rejected
  5. Based on the response from DMI plugin the in-memory structure is updated and response is sent back to the clients.

    if DMI says it is accepted then : 

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]ACCEPTED


    if DMI says it is rejected then : 

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]REJECTED


    if we get no response within the configured time then :


    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]PENDING


    But we still send some response within the pre-configured time.

  6. if the above request was accepted then we should add it to the list of "ActiveSubscriptions" as well.

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p3/c3ncmp-datastore:passthrough-operational


  7. If the status was accepted/rejected then after sending the response to the client we can clear the in-memory structure for subscriptionId B-52.

...