summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/netconfnode-state-service/model
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-12-08 17:48:09 +0100
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-12-08 17:49:01 +0100
commitd022986fd6be49ff29f53ae36bbe1ff967836e11 (patch)
tree741902ce06ed6bd36c2e4dcdb744289424d7250b /sdnr/wt/netconfnode-state-service/model
parente3ad1d3884cb4c801679e3390088ce17c997f9d1 (diff)
Support of several NetConf notification streams
Support of several NetConf notification streams Issue-ID: SDNC-1369 Change-Id: I75b9ba06aed159992444cce3e60384a1cdb91625 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/model')
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java2
-rw-r--r--sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java27
2 files changed, 27 insertions, 2 deletions
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
index a348b29ad..cd5339adb 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java
@@ -164,7 +164,7 @@ public class Capabilities {
* @param revision request or null for any revision
* @return true if existing
*/
- private boolean isSupportingNamespaceAndRevision(String namespace, @Nullable String revision) {
+ public boolean isSupportingNamespaceAndRevision(String namespace, @Nullable String revision) {
LOG.trace("isSupportingNamespaceAndRevision: Model namespace {}?[revision {}]", namespace, revision);
for (String capability : capabilities) {
if (capability.contains(namespace) && (revision == null || capability.contains(revision))) {
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
index 1161681e6..cca71457e 100644
--- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
+++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfAccessor.java
@@ -18,10 +18,12 @@
package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
import com.google.common.util.concurrent.ListenableFuture;
+import java.util.List;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.MountPoint;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionOutput;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -78,11 +80,34 @@ public interface NetconfAccessor {
/**
* Register notifications stream for the connection.
- *
+ *
* @param streamName that should be "NETCONF" as default.
* @return progress indication
*/
ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName);
+ /**
+ * Register notifications stream for the connection
+ *
+ * @param streamList that contains a list of streams to be subscribed for notifications
+ * @return progress indication
+ */
+ void registerNotificationsStream(List<Stream> streamList);
+
+ /**
+ * check if the device supports notifications.yang
+ * @return true if notifications.yang is supported
+ */
+// boolean isNotificationsSupported();
+ /**
+ * check if the device supports notifications.yang
+ * @return true if nc-notifications.yang is supported
+ */
+ boolean isNCNotificationsSupported();
+ /**
+ * Get all notification streams
+ * @return stream list
+ */
+ List<Stream> getNotificationStreams();
}