Netconf Device Notification
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / config / Configuration.java
index 390be4b4163b02df0875a5b627c1ac9a8f94b08e..765ec49fa83450160f6c3124bd741b1ae57347d6 100644 (file)
@@ -11,12 +11,13 @@ import com.google.common.collect.ImmutableSet;
 import java.io.File;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
-import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator;
 import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.netconf.auth.AuthProvider;
+import org.opendaylight.netconf.shaded.sshd.server.auth.pubkey.PublickeyAuthenticator;
 import org.opendaylight.netconf.test.tool.operations.OperationsCreator;
 import org.opendaylight.netconf.test.tool.rpchandler.RpcHandler;
 import org.opendaylight.netconf.test.tool.rpchandler.RpcHandlerDefault;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -27,7 +28,8 @@ public class Configuration {
     public static final Set<String> DEFAULT_BASE_CAPABILITIES_EXI = ImmutableSet.of(
             XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_BASE_1_0,
             XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_BASE_1_1,
-            XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_CAPABILITY_EXI_1_0
+            XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_CAPABILITY_EXI_1_0,
+            XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_CAPABILITY_NOTIFICATION_1_0
     );
 
     public static final Set<String> DEFAULT_BASE_CAPABILITIES = ImmutableSet.of(
@@ -38,8 +40,8 @@ public class Configuration {
     public static final Set<YangResource> DEFAULT_YANG_RESOURCES = ImmutableSet.of(
             new YangResource("ietf-netconf-monitoring", "2010-10-04",
                     "/META-INF/yang/ietf-netconf-monitoring@2010-10-04.yang"),
-            new YangResource("ietf-netconf-monitoring-extension", "2013-12-10",
-                    "/META-INF/yang/ietf-netconf-monitoring-extension@2013-12-10.yang"),
+            new YangResource("odl-netconf-monitoring", "2022-07-18",
+                    "/META-INF/yang/odl-netconf-monitoring@2022-07-18.yang"),
             new YangResource("ietf-yang-types", "2013-07-15",
                     "/META-INF/yang/ietf-yang-types@2013-07-15.yang"),
             new YangResource("ietf-inet-types", "2013-07-15",
@@ -64,7 +66,7 @@ public class Configuration {
     private String ip = "0.0.0.0";
     private Set<YangResource> defaultYangResources = DEFAULT_YANG_RESOURCES;
 
-    private Set<String> models;
+    private Set<YangModuleInfo> models;
     private Set<String> capabilities = DEFAULT_BASE_CAPABILITIES_EXI;
     private RpcHandler rpcHandler = new RpcHandlerDefault();
     private OperationsCreator operationsCreator;
@@ -161,11 +163,11 @@ public class Configuration {
         this.ip = ip;
     }
 
-    public Set<String> getModels() {
+    public Set<YangModuleInfo> getModels() {
         return models;
     }
 
-    public void setModels(final Set<String> models) {
+    public void setModels(final Set<YangModuleInfo> models) {
         this.models = models;
     }
 
@@ -235,7 +237,12 @@ public class Configuration {
 
     @Deprecated
     public boolean isXmlConfigurationProvided() {
-        return initialConfigXMLFile != null && notificationFile != null;
+        return initialConfigXMLFile != null;
+    }
+
+    @Deprecated
+    public boolean isNotificationsSupported() {
+        return notificationFile != null;
     }
 
     @Deprecated