Add some validations and new arguments
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / TesttoolParameters.java
index eb6363227d8d40d08165f86eace8ac72933667b9..0ad0f1831c8d5dd3b4606b518c9d537c55301554 100644 (file)
@@ -101,6 +101,12 @@ public class TesttoolParameters {
     @Arg(dest = "time-out")
     public long timeOut;
 
+    @Arg(dest = "ip")
+    public String ip;
+
+    @Arg(dest = "thread-pool-size")
+    public int threadPoolSize;
+
     static ArgumentParser getParser() {
         final ArgumentParser parser = ArgumentParsers.newArgumentParser("netconf testtool");
 
@@ -118,7 +124,8 @@ public class TesttoolParameters {
         parser.addArgument("--thread-amount")
                 .type(Integer.class)
                 .setDefault(1)
-                .dest("thread-amount");
+                .dest("thread-amount")
+                .help("The number of threads to use for configuring devices.");
 
         parser.addArgument("--throttle")
                 .type(Integer.class)
@@ -226,6 +233,20 @@ public class TesttoolParameters {
                 .help("the maximum time in seconds for executing each PUT request")
                 .dest("time-out");
 
+        parser.addArgument("-ip")
+                .type(String.class)
+                .setDefault("0.0.0.0")
+                .help("Ip address which will be used for creating a socket address." +
+                        "It can either be a machine name, such as " +
+                        "java.sun.com, or a textual representation of its IP address.")
+                .dest("ip");
+
+        parser.addArgument("--thread-pool-size")
+                .type(Integer.class)
+                .setDefault(8)
+                .help("The number of threads to keep in the pool, when creating a device simulator. Even if they are idle.")
+                .dest("thread-pool-size");
+
         return parser;
     }