Unify streams URI 15/108815/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Nov 2023 01:25:38 +0000 (02:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Nov 2023 01:29:13 +0000 (02:29 +0100)
commit94b1cf8ba484fd1e3fffd3559bfb402a2113ac35
treebd5a147628360e66e5af6e4f61af99c791716eb4
parent2de4fda93ea8971b792913df814ae2733fcfaebe
Unify streams URI

We have a tad inconsistent delivery of events:
- SSE binds to /rests/notif
- WS binds to /xyz (with special prefixes)

Unify handling so that we bind to /rests/events irrespective of the
protocol we use. This eliminates the need for WS to know the exact
naming of streams (to intercept them).

Also update WS to:
- use URI.getPath(), as we want the decoded stream name
- perform path stripping without createStreamNameFromUri(), as that
  method is just confusing and unnecessary

JIRA: NETCONF-1102
Change-Id: I4c67b443d9cbe6feb9d5e5225115d37ba609a86a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/JaxRsNorthbound.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/URLConstants.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/ListenersBroker.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/RestconfStreamsConstants.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketFactory.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfStreamsSubscriptionServiceImplTest.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketFactoryTest.java