Update RestconfStreamsSubscriptionService 28/107128/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 27 Jul 2023 14:37:04 +0000 (16:37 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 27 Jul 2023 19:44:01 +0000 (21:44 +0200)
The @Path element has magic structure, make sure the constant is
expressed therein.

Change-Id: Ife99becaac60b8c6ac1273cde944dac6e2dc30ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8b628b6cedfd7db39d6b2598c7c6b323de795062)

restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfStreamsSubscriptionService.java

index 5a5affacd0c9d239c66f11915723f06af2f07b2c..b5a6454e0b1462248daedda8481aa8ea04321e03 100644 (file)
@@ -14,6 +14,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.restconf.nb.rfc8040.legacy.NormalizedNodePayload;
+import org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfStreamsConstants;
 
 /**
  * Subscribing to streams.
@@ -30,7 +31,7 @@ public interface RestconfStreamsSubscriptionService {
     //        https://datatracker.ietf.org/doc/html/rfc8639#section-2.4, i.e. when we have that, aggressively deprecate
     //        and remove this special case. Besides it routes to a very bad thing in RestconfDataServiceImpl
     @GET
-    @Path("data/ietf-restconf-monitoring:restconf-state/streams/stream/{identifier:.+}")
+    @Path("data/" + RestconfStreamsConstants.STREAMS_PATH  + "/{identifier:.+}")
     NormalizedNodePayload subscribeToStream(@Encoded @PathParam("identifier") String identifier,
             @Context UriInfo uriInfo);
 }