Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1272

Update notification subscription user guide

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 7.0.5
    • None
    • restconf-nb

      After implementing the use of random UUIDs for stream names each subscription now generates a new UUID. For example, after making the following request:

      curl --location 'http://localhost:8181/rests/operations/odl-device-notification:subscribe-device-notification' \
      --header 'Accept: application/json' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
      --data '{
        "input": {
           "path":"/network-topology:network-topology/topology[topology-id='\''topology-netconf'\'']/node[node-id='\''netopeer'\'']"
        }
      }'
      

      This returns:

      {
          "odl-device-notification:output": {
              "stream-name": "urn:uuid:81814281-04bf-4baa-93e8-cafdda1732ae"
          }
      }
      

      You will need to copy the stream name to use it in the URL for the GET request.
      `http://localhost:8181/rests/streams/urn:uuid:81814281-04bf-4baa-93e8-cafdda1732ae8`
      After Expose streams with all supported encodings it's necessary to specify the encoding in the URL.

      For example, the URL to subscribe to device streaming should look like this:
      For JSON: http://localhost:8181/rests/streams/json/urn:uuid:e4691286-33f5-4f14-a420-ba8077f9cec5
      For XML: http://localhost:8181/rests/streams/xml/urn:uuid:e4691286-33f5-4f14-a420-ba8077f9cec5

      Receiving Netconf Device Notifications on a http client section of Netconf User Guide must be updated accordingly to reflect these changes.

            SamoSchneider Samuel Schneider
            yaroslav.lastivka Yaroslav Lastivka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: