[CONTROLLER-1076] Change event notification subscription: Unable to listen on topology Created: 18/Dec/14  Updated: 09/Feb/15  Resolved: 09/Feb/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Milos Fabian Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 2524
Priority: 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>

GET http://localhost:8181/restconf/streams/stream/network-topology:network-topology/network-topology:topology/pcep-topology/datastore=OPERATIONAL/scope=SUBTREE

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?



 Comments   
Comment by Jan Hajnar [ 26/Jan/15 ]

fix fo stable helium:
https://git.opendaylight.org/gerrit/#/c/14430/

Generated at Wed Feb 07 19:54:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.