Bug 4725 - RestPerfClient: Add support for authentication.
[netconf.git] / opendaylight / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / client / http / perf / Parameters.java
index 32bb6a36b983fdb43830c0017cbf6d4a74355d85..8ef49f3511a555073f421304ffb40c0dc2d9d51f 100644 (file)
@@ -13,6 +13,7 @@ import java.io.File;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.UnknownHostException;
+import java.util.ArrayList;
 import net.sourceforge.argparse4j.ArgumentParsers;
 import net.sourceforge.argparse4j.annotation.Arg;
 import net.sourceforge.argparse4j.inf.ArgumentParser;
@@ -49,6 +50,9 @@ public class Parameters {
     @Arg(dest = "throttle")
     public int throttle;
 
+    @Arg(dest = "auth")
+    public ArrayList<String> auth;
+
     static ArgumentParser getParser() {
         final ArgumentParser parser = ArgumentParsers.newArgumentParser("netconf stress client");
 
@@ -113,6 +117,11 @@ public class Parameters {
                         "with mutltiple threads this gets divided among all threads")
                 .dest("throttle");
 
+        parser.addArgument("--auth")
+                .nargs(2)
+                .help("Username and password for HTTP basic authentication in order username password.")
+                .dest("auth");
+
         return parser;
     }