From 0fc22df18591434773e6c78ce80aee40f4f7c660 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Tue, 1 Jun 2021 13:10:18 +0200 Subject: Add description to command line arguments --- .../java/ai/vespa/feed/client/CliArguments.java | 15 +++++++- vespa-feed-client-cli/src/test/resources/help.txt | 40 ++++++++++++++-------- 2 files changed, 40 insertions(+), 15 deletions(-) (limited to 'vespa-feed-client-cli') 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 Vespa feed client - --benchmark - --ca-certificates - --certificate - --connections - --disable-ssl-hostname-verification - --endpoint - --file - --header + --benchmark Enable benchmark mode + --ca-certificates Path to file containing CA X.509 + certificates encoded as PEM + --certificate Path to PEM encoded X.509 + certificate file + --connections Number of concurrent HTTP/2 + connections + --disable-ssl-hostname-verification Disable SSL hostname + verification + --endpoint URI to feed endpoint + --file Path to feed file in JSON format + --header HTTP header on the form 'Name: + value' --help - --max-streams-per-connection - --private-key - --route - --stdin - --timeout - --trace + --max-streams-per-connection Number of concurrent streams per + HTTP/2 connection + --private-key Path to PEM/PKCS#8 encoded + private key file + --route Target Vespa route for feed + operations + --stdin Read JSON input from standard + input + --timeout Feed operation timeout (in + seconds) + --trace The trace level of network + traffic. Disabled by default + (=0) --verbose --version -- cgit v1.2.3