From d022986fd6be49ff29f53ae36bbe1ff967836e11 Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Tue, 8 Dec 2020 17:48:09 +0100 Subject: Support of several NetConf notification streams Support of several NetConf notification streams Issue-ID: SDNC-1369 Change-Id: I75b9ba06aed159992444cce3e60384a1cdb91625 Signed-off-by: Ravi Pendurty --- .../wt/netconfnodestateservice/Capabilities.java | 2 +- .../netconfnodestateservice/NetconfAccessor.java | 27 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'sdnr/wt/netconfnode-state-service/model/src') 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> 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 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 getNotificationStreams(); } -- cgit 1.2.3-korg