Versions Compared

Key

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

...

The user scope registration

This is a full example of a registration for notifications of a specific type. In this case all problem-notification notifications of the node with the node-id node1 implemented in the microwave-model@2018-10-10.yang.

Code Block
{
  "data":"scopes",
  "scopes":[
    {
      "node-id":"node1"
      "schema":{
          "namespace":"onf:params:xml:ns:yang:microwave-model",
          "revision":"2018-10-10",
          "notification":["problem-notification"]   
       }
    }
  ]
}

In fact there are a lot of use cases to receive a lot of different notifications or specific notifications for a bunch of nodes, most properties are optional

propertyoptionaldescription
node-idyesfilter for notifications only from node with node-id
schemayesfilter for specific notifications implemented by a model
schema.namespacenoif schema is set, namespace has to be set, otherwise a schema is not valid
schema.revisionyesfilter for a specific revision of the implemented model
schema.notificationyesfilter for specific notification types of the model

If the user scope registration succeeds you will get a response with your submitted scopes

Code Block
{
  "status": "success",
  "scopes": [
    {
      "node-id":"node1"
      "schema":{
          "namespace":"onf:params:xml:ns:yang:microwave-model",
          "revision":"2018-10-10",
          "notification":["problem-notification"]   
       }
    }
  ]
}

If not you will receive an error message with the cause, e.g.

Code Block
{
  "status": "error",
  "message":"unable to parse scopes"
}

User scope registration examples

Example 1: All notifications for node-id:

Code Block
{
  "data":"scopes",
  "scopes":[
    {
      "node-id":"node1"
    }
  ]
}

Example 2: All notifications(every node) implemented in microwave-model:

Code Block
{
  "data":"scopes",
  "scopes":[
    {
      "schema":{
          "namespace":"onf:params:xml:ns:yang:microwave-model"
       }
    }
  ]
}

Example 3: All notifications(every node) of type problem-notification of microwave-model:

Code Block
{
  "data":"scopes",
  "scopes":[
    {
      "schema":{
          "namespace":"onf:params:xml:ns:yang:microwave-model",
          "notification":["problem-notification"]   
       }
    }
  ]
}

Example 4: All notifications for node-id of type problem-notification of microwave-model@2018-10-10:

Code Block
{
  "data":"scopes",
  "scopes":[
    {
      "node-id":"node1"
      "schema":{
          "namespace":"onf:params:xml:ns:yang:microwave-model",
          "revision":"2018-10-10",
          "notification":["problem-notification"]   
       }
    }
  ]
}


Notifications

A notification has the following structure

Code Block
{
  "event-time": "2021-03-12T05:08:55.3Z",
  "type": "urn:opendaylight:params:xml:ns:yang:devicemanager@2019-01-09:object-creation-notification",
  "node-id": "SDN-Controller-0",
  "data": {
    "object-id-ref": "sim1",
    "counter": 7,
    "time-stamp": "2021-03-12T05:08:55.2Z"
  }
}


propertydescription
node-idnode-id which is the source the notification
event-timetimestamp of the notification
type<namespace>@<revision>:<notification-type>
datanotification itself