Versions Compared

Key

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

...

EntityDescription
Dataspace NameCPS-Admin
Anchor Namecps-notification-subscription
schema setcps-notification-subscription
cps-notification-subscriptions@2024-06-18.yang


Code Block
titleSchema
collapsetrue
module subscription {
    yang-version 1.1;
    namespace "org:onap:ccsdk:sample";
  
    prefix notification-subscription;
  
    revision "2024-06-18" {
        description
        "Sample Model";
    }
    container cps-notification {
  
        list dataspaces {
		
          key "name"
		  
		  leaf name {
		      type string
		  }
		  
		  list anchors {
		  .
		      key "name"
			  
			  leaf name {
			      type string
			  }
			  
			  list xpaths {
			      
				  key "xpath"
				  
				  leaf xpath {
				  
				      type string
				  }
			  }
		  }
        }
    }
}


Code Block
titleJSON payload
collapsetrue
{
    "notification-subscription": {
	    "dataspaces": [
		    {
			    "name": "dataspace01"
			},
			{
			    "name": "dataspace02",
			   "anchors": [
				    {
					    "name": "anchor01"
					},
					{
					    "name": "anchor02"
					}
				]
			},
			{
			    "name": "dataspace03",
			    "anchors": [
			     {
			         "name": "anchor01",
				     "xpaths" : [
				         {
						.    "xpath": "/bookstore/categories[@code='01']"
						 },
						 {
							 "xpath": "/bookstore/categories[@code='02']"
						 }
					 ]
				}
				]
			}	
		]
		
	}
}


When Notification is subscribed for anchor id "28", fragment table will have below entry

...