Versions Compared

Key

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

Table of Contents

...

#

1idUUID of the event
2source
urn:cps:org.onap.cps
3schema
urn:cps:org.onap.cps:data-updated-event-schema:v1
4type
org.onap.cps.data-updated-delta-event
5content
{
"operation": "UPDATE",
"
anchorName": "Anchor1",
"dataspaceName": "dataspace1",
"schemaSetName": "schemaset1",
"
observedTimestamp": timestamp,
"data":
Code Block
languagetext
titledata body
collapsetrue
[
  {
    "action": "ADD",
    "xpath": "/bookstore/categories/[@code=3]",
    "payload": {
      "code": 3,
      "name": "kidz"
    }
  },
  {
    "action": "DELETE",
    "xpath": "/bookstore/categories/[@code=1]",
    "payload": {
      "code": 1,
      "name": "Fiction"
    }
  },
  {
    "action": "UPDATE",
    "xpath": "/bookstore/categories/[@code=2]",
    "payload": {
      "name": "Comic"
    }
  }
]
}

...

below actions will be performed when delta notification will be subscribed for the dataspace.   

  • schema set will be added to the dataspace when notification is subscribed.
  • Subscription data will be added into fragment as per schema set. 

schema yaml file to be used as below 

Code Block
titledelta-notification.yaml
collapsetrue
module notifications {
    yang-version 1.1;
    namespace "org:onap:ccsdk:sample";

    prefix delta-notification;

    revision "2024-01-10" {
        description
        "Sample Model";
    }
	container deltanotification {

        leaf notification-subscription {
            type string;
        }
	}
}


Implementation details of delta notification

...