Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
6995
Description
following this manual:
https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf:Change_event_notification_subscription
In case web browser client (JavaScript client) needs to use websocket "Change event notification subscription" it is very difficult to do so for following reasons:
1. prior to websocket connection, client has to create-data-change-event-subscription and with additional http request client has to obtain websocket url.
second request returns websocket url in http response header field "Location"
instead, it will be much better if client sends one request which creates data change event listener and returns websocket url where to connect to in the response body (JSON format).
2. after javascript client connects to websocket, for example ws://localhost:8185/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=BASE it receives data change notifications in xml format.
instead it would be nice if websocket url may be extended by client using Content-Type parameter like this:
ws://localhost:8185/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=BASE/Content-Type=json
or
ws://localhost:8185/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=BASE/Content-Type=xml
in org.opendaylight.netconf.sal.streams.websockets.WebSocketServerHandler information about content-type could be easily attached to each notification listener and each data change event would be formatted as requested per websocket session. websocket client will be able to receive notification in xml and json format as they preffer