Fix building of wrong YANG notify stream 30/82530/2
authorJaroslav Tóth <jtoth@frinx.io>
Mon, 17 Jun 2019 14:54:10 +0000 (16:54 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 19 Jun 2019 16:13:47 +0000 (16:13 +0000)
- Identification of stream should start with "notification-stream"
  and not "create-notification-stream".
- Added missing '/' before JSON suffix.

JIRA: NETCONF-623
Change-Id: Ia3b78ba8af1b0f53f60dd88b39dff8b92b881ffd
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/CreateStreamUtil.java

index e6cab92554540dbb85f6cb1cf65d584b08287b91..a31d0a58113f18ef93611d678b7e968da65343ae 100644 (file)
@@ -231,13 +231,13 @@ public final class CreateStreamUtil {
                 notificationDefinitionQName.getModule().getNamespace()));
 
         final StringBuilder streamNameBuilder = new StringBuilder();
-        streamNameBuilder.append(RestconfStreamsConstants.CREATE_NOTIFICATION_STREAM)
+        streamNameBuilder.append(RestconfStreamsConstants.NOTIFICATION_STREAM)
                 .append('/')
                 .append(module.getName())
                 .append(':')
                 .append(notificationDefinitionQName.getLocalName());
         if (outputType.equals(NotificationOutputType.JSON.getName())) {
-            streamNameBuilder.append(NotificationOutputType.JSON.getName());
+            streamNameBuilder.append('/').append(NotificationOutputType.JSON.getName());
         }
         return streamNameBuilder.toString();
     }