Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Helium
-
None
-
None
-
Operating System: Linux
Platform: PC
-
2524
-
Normal
Description
I was trying to subscribe on /network-topology:network-topology/topology/pcep-topology to listen on data changes via restconf/websockets.
Followed tutorial https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf:Change_event_notification_subscription
My inputs:
(odl-bgpcep-all feature needs to be installed)
POST http://localhost:8181/restconf/operations/sal-remote:create-data-change-event-subscription
<input xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote">
<path xmlns:a="urn:TBD:params:xml:ns:yang:network-topology">/a:network-topology/a:topology[a:topology-id='pcep-topology']</path>
<datastore xmlns="urn:sal:restconf:event:subscription">OPERATIONAL</datastore>
<scope xmlns="urn:sal:restconf:event:subscription">SUBTREE</scope>
</input>
and successfully connected websocket client to URL http://localhost:8185/network-topology:network-topology/network-topology:topology/pcep-topology/datastore=OPERATIONAL/scope=SUBTREE
But received no notifications, however the topology has changed (node was created -> pcc-mock was connected).
Next, tried to subscribe on whole /network-topology:network-topology
<input xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote">
<path xmlns:a="urn:TBD:params:xml:ns:yang:network-topology">/a:network-topology</path>
<datastore xmlns="urn:sal:restconf:event:subscription">OPERATIONAL</datastore>
<scope xmlns="urn:sal:restconf:event:subscription">SUBTREE</scope>
</input>
Now I was able to see incoming notifications:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2014-12-18T12:55:31+01:00</eventTime>
<data-changed-notification xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote">
<data-change-event>
<path xmlns:fpgb="urn:TBD:params:xml:ns:yang:network-topology">/fpgb:network-topology/fpgb:topology/fpgb:topology[fpgb:topology-id='pcep-topology']/fpgb:node/fpgb:node[fpgb:node-id='pcc://127.0.0.1']</path>
<operation>created</operation>
</data-change-event>
<data-change-event>
<path xmlns:ujzm="urn:TBD:params:xml:ns:yang:network-topology">/ujzm:network-topology/ujzm:topology/ujzm:topology[ujzm:topology-id='pcep-topology']/ujzm:node/ujzm:node[ujzm:node-id='pcc://127.0.0.1']/ujzm:node-id</path>
<operation>created</operation>
</data-change-event>
</data-changed-notification>
</notification>
But included <path> (instance-identifier) does not seems to be looking good?