From 813de63d70afeb373f8989972cf9396fb681f1da Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 25 Mar 2020 23:04:19 -0400 Subject: [PATCH] Clarify the remove keystore command can handle many The remove keystore command can handle multiple settings. In a few places, we were not consistent about mentioning this. This commit addreses this, in the CLI help, and the docs. --- .../common/settings/RemoveSettingKeyStoreCommand.java | 6 +++--- docs/reference/commands/keystore.asciidoc | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/distribution/tools/keystore-cli/src/main/java/org/elasticsearch/common/settings/RemoveSettingKeyStoreCommand.java b/distribution/tools/keystore-cli/src/main/java/org/elasticsearch/common/settings/RemoveSettingKeyStoreCommand.java index 6e839d4f331ba..a1c9802b22424 100644 --- a/distribution/tools/keystore-cli/src/main/java/org/elasticsearch/common/settings/RemoveSettingKeyStoreCommand.java +++ b/distribution/tools/keystore-cli/src/main/java/org/elasticsearch/common/settings/RemoveSettingKeyStoreCommand.java @@ -19,8 +19,6 @@ package org.elasticsearch.common.settings; -import java.util.List; - import joptsimple.OptionSet; import joptsimple.OptionSpec; import org.elasticsearch.cli.ExitCodes; @@ -28,6 +26,8 @@ import org.elasticsearch.cli.UserException; import org.elasticsearch.env.Environment; +import java.util.List; + /** * A subcommand for the keystore cli to remove a setting. */ @@ -36,7 +36,7 @@ class RemoveSettingKeyStoreCommand extends BaseKeyStoreCommand { private final OptionSpec arguments; RemoveSettingKeyStoreCommand() { - super("Remove a setting from the keystore", true); + super("Remove settings from the keystore", true); arguments = parser.nonOptions("setting names"); } diff --git a/docs/reference/commands/keystore.asciidoc b/docs/reference/commands/keystore.asciidoc index fa74b808a9ac9..37bf05cb48e69 100644 --- a/docs/reference/commands/keystore.asciidoc +++ b/docs/reference/commands/keystore.asciidoc @@ -72,7 +72,7 @@ can optionally use an empty string to remove the password. If the keystore is not password protected, you can use this command to set a password. `remove `:: Removes settings from the keystore. Multiple setting -names can be specified as arguments to the `add` command. +names can be specified as arguments to the `remove` command. `-s, --silent`:: Shows minimal output. @@ -195,6 +195,15 @@ To remove a setting from the keystore, use the `remove` command: bin/elasticsearch-keystore remove the.setting.name.to.remove ---------------------------------------------------------------- +You can also remove multiple settings with the `remove` command: + +[source,sh] +---------------------------------------------------------------- +bin/elasticsearch-keystore remove \ + the.setting.name.to.remove \ + the.other.setting.name.to.remove +---------------------------------------------------------------- + If the {es} keystore is password protected, you are prompted to enter the password.