Add some validations and new arguments
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / client / stress / Parameters.java
index c7e3dbfdab5c362d3920c8130ca861fd69d0e0f2..77a0a60a301fd66128cf9a31dcf0b6cf4e0f4a68 100644 (file)
@@ -163,9 +163,6 @@ public class Parameters {
                 .setDefault(1)
                 .dest("thread-amount");
 
-        // TODO add get-config option instead of edit + commit
-        // TODO different edit config content
-
         return parser;
     }
 
@@ -181,7 +178,8 @@ public class Parameters {
         Preconditions.checkArgument(editContent.exists(), "Edit content file missing");
         Preconditions.checkArgument(editContent.isDirectory() == false, "Edit content file is a dir");
         Preconditions.checkArgument(editContent.canRead(), "Edit content file is unreadable");
-        // TODO validate
+        Preconditions.checkArgument(threadAmount > 0, "Parameter thread-amount must be greater than 0");
+        Preconditions.checkArgument(msgTimeout >= 0, "Parameter msg-timeout must be greater than 0");
     }
 
     public InetSocketAddress getInetAddress() {