diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-06-01 13:10:18 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-06-01 13:10:18 +0200 |
commit | 0fc22df18591434773e6c78ce80aee40f4f7c660 (patch) | |
tree | 1a783179a027cb272575fb88596834aa6004fe50 /vespa-feed-client-cli | |
parent | b24f0031045f66886ab753d5be23a22935e35c82 (diff) |
Add description to command line arguments
Diffstat (limited to 'vespa-feed-client-cli')
-rw-r--r-- | vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/CliArguments.java | 15 | ||||
-rw-r--r-- | vespa-feed-client-cli/src/test/resources/help.txt | 40 |
2 files changed, 40 insertions, 15 deletions
diff --git a/vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/CliArguments.java b/vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/CliArguments.java index 8855b08b06b..a3e33699a4d 100644 --- a/vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/CliArguments.java +++ b/vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/CliArguments.java @@ -187,7 +187,6 @@ class CliArguments { } private static Options createOptions() { - // TODO Add description to each option return new Options() .addOption(Option.builder() .longOpt(HELP_OPTION) @@ -197,65 +196,79 @@ class CliArguments { .build()) .addOption(Option.builder() .longOpt(ENDPOINT_OPTION) + .desc("URI to feed endpoint") .hasArg() .type(URL.class) .build()) .addOption(Option.builder() .longOpt(HEADER_OPTION) + .desc("HTTP header on the form 'Name: value'") .hasArgs() .build()) .addOption(Option.builder() .longOpt(FILE_OPTION) .type(File.class) + .desc("Path to feed file in JSON format") .hasArg() .build()) .addOption(Option.builder() .longOpt(CONNECTIONS_OPTION) + .desc("Number of concurrent HTTP/2 connections") .hasArg() .type(Number.class) .build()) .addOption(Option.builder() .longOpt(MAX_STREAMS_PER_CONNECTION) + .desc("Number of concurrent streams per HTTP/2 connection") .hasArg() .type(Number.class) .build()) .addOption(Option.builder() .longOpt(CERTIFICATE_OPTION) + .desc("Path to PEM encoded X.509 certificate file") .type(File.class) .hasArg() .build()) .addOption(Option.builder() .longOpt(PRIVATE_KEY_OPTION) + .desc("Path to PEM/PKCS#8 encoded private key file") .type(File.class) .hasArg() .build()) .addOption(Option.builder() .longOpt(CA_CERTIFICATES_OPTION) + .desc("Path to file containing CA X.509 certificates encoded as PEM") .type(File.class) .hasArg() .build()) .addOption(Option.builder() .longOpt(DISABLE_SSL_HOSTNAME_VERIFICATION_OPTION) + .desc("Disable SSL hostname verification") .build()) .addOption(Option.builder() .longOpt(BENCHMARK_OPTION) + .desc("Enable benchmark mode") .build()) .addOption(Option.builder() .longOpt(ROUTE_OPTION) + .desc("Target Vespa route for feed operations") .hasArg() .build()) .addOption(Option.builder() .longOpt(TIMEOUT_OPTION) + .desc("Feed operation timeout (in seconds)") .hasArg() .type(Number.class) .build()) .addOption(Option.builder() .longOpt(TRACE_OPTION) + .desc("The trace level of network traffic. Disabled by default (=0)") .hasArg() .type(Number.class) .build()) .addOption(Option.builder() .longOpt(STDIN_OPTION) + .desc("Read JSON input from standard input") .build()) .addOption(Option.builder() .longOpt(VERBOSE_OPTION) diff --git a/vespa-feed-client-cli/src/test/resources/help.txt b/vespa-feed-client-cli/src/test/resources/help.txt index 29f24e8c672..1c537defb01 100644 --- a/vespa-feed-client-cli/src/test/resources/help.txt +++ b/vespa-feed-client-cli/src/test/resources/help.txt @@ -1,19 +1,31 @@ usage: vespa-feed-client <options> Vespa feed client - --benchmark - --ca-certificates <arg> - --certificate <arg> - --connections <arg> - --disable-ssl-hostname-verification - --endpoint <arg> - --file <arg> - --header <arg> + --benchmark Enable benchmark mode + --ca-certificates <arg> Path to file containing CA X.509 + certificates encoded as PEM + --certificate <arg> Path to PEM encoded X.509 + certificate file + --connections <arg> Number of concurrent HTTP/2 + connections + --disable-ssl-hostname-verification Disable SSL hostname + verification + --endpoint <arg> URI to feed endpoint + --file <arg> Path to feed file in JSON format + --header <arg> HTTP header on the form 'Name: + value' --help - --max-streams-per-connection <arg> - --private-key <arg> - --route <arg> - --stdin - --timeout <arg> - --trace <arg> + --max-streams-per-connection <arg> Number of concurrent streams per + HTTP/2 connection + --private-key <arg> Path to PEM/PKCS#8 encoded + private key file + --route <arg> Target Vespa route for feed + operations + --stdin Read JSON input from standard + input + --timeout <arg> Feed operation timeout (in + seconds) + --trace <arg> The trace level of network + traffic. Disabled by default + (=0) --verbose --version |