Merge "Add some validations and new arguments"
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / TesttoolParameters.java
index 1d8eda8f7891298dce5769734490bd3d44925c61..23ed222c37c1153acc41a1c815e179403879b8d3 100644 (file)
@@ -81,6 +81,12 @@ public class TesttoolParameters {
     public long timeOut;
     private InputStream stream;
 
+    @Arg(dest = "ip")
+    public String ip;
+
+    @Arg(dest = "thread-pool-size")
+    public int threadPoolSize;
+
     static ArgumentParser getParser() {
         final ArgumentParser parser = ArgumentParsers.newArgumentParser("netconf testtool");
 
@@ -98,7 +104,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)
@@ -206,6 +213,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;
     }