Merge "Bug 4700 - RestPerfClient spits NumberFormatException and hangs"
authorTony Tkacik <ttkacik@cisco.com>
Fri, 11 Dec 2015 13:20:13 +0000 (13:20 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 11 Dec 2015 13:20:13 +0000 (13:20 +0000)
1  2 
opendaylight/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/Parameters.java

index 8ef49f3511a555073f421304ffb40c0dc2d9d51f,a91e684ac1672e79bac78dea454485eddb73d28f..7985eef925204e3656fc75698cbaaf3081141dea
@@@ -13,7 -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;
@@@ -50,9 -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");
  
                          "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;
      }
  
          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");
+         Preconditions.checkArgument(destination.startsWith("/"), "Destination should start with a '/'");
          // TODO validate
      }