Repository: kafka Updated Branches: refs/heads/trunk be0f3502d -> c699b1a91
MINOR: Use `--force` instead of `--yes` in `AclCommand` To be consistent with `ConfigCommand` and `TopicCommand`. No release includes this option yet, so we can simply change it. Author: Ismael Juma <[email protected]> Reviewers: Mickael Maison, Grant Henke Closes #1430 from ijuma/use-force-instead-of-yes-in-acl-command and squashes the following commits: bdf3a57 [Ismael Juma] Update `AclCommandTest` 78b8467 [Ismael Juma] Change variable name to `forceOpt` 0bb27af [Ismael Juma] Use `--force` instead of `--yes` in `AclCommand` Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/c699b1a9 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/c699b1a9 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/c699b1a9 Branch: refs/heads/trunk Commit: c699b1a914260b7d6fd84596f78128369d2bf2bf Parents: be0f350 Author: Ismael Juma <[email protected]> Authored: Thu May 26 09:58:59 2016 -0700 Committer: Gwen Shapira <[email protected]> Committed: Thu May 26 09:58:59 2016 -0700 ---------------------------------------------------------------------- core/src/main/scala/kafka/admin/AclCommand.scala | 4 ++-- core/src/test/scala/unit/kafka/admin/AclCommandTest.scala | 2 +- docs/security.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/c699b1a9/core/src/main/scala/kafka/admin/AclCommand.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/kafka/admin/AclCommand.scala b/core/src/main/scala/kafka/admin/AclCommand.scala index b697fac..966c4be 100644 --- a/core/src/main/scala/kafka/admin/AclCommand.scala +++ b/core/src/main/scala/kafka/admin/AclCommand.scala @@ -242,7 +242,7 @@ object AclCommand { } private def confirmAction(opts: AclCommandOptions, msg: String): Boolean = { - if (opts.options.has(opts.yesOpt)) + if (opts.options.has(opts.forceOpt)) return true println(msg) Console.readLine().equalsIgnoreCase("y") @@ -331,7 +331,7 @@ object AclCommand { val helpOpt = parser.accepts("help", "Print usage information.") - val yesOpt = parser.accepts("yes", "Assume Yes to all queries and do not prompt.") + val forceOpt = parser.accepts("force", "Assume Yes to all queries and do not prompt.") val options = parser.parse(args: _*) http://git-wip-us.apache.org/repos/asf/kafka/blob/c699b1a9/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala ---------------------------------------------------------------------- diff --git a/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala b/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala index f2d963c..7ada48e 100644 --- a/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala +++ b/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala @@ -116,7 +116,7 @@ class AclCommandTest extends ZooKeeperTestHarness with Logging { private def testRemove(resources: Set[Resource], resourceCmd: Array[String], args: Array[String], brokerProps: Properties) { for (resource <- resources) { - AclCommand.main(args ++ resourceCmd :+ "--remove" :+ "--yes") + AclCommand.main(args ++ resourceCmd :+ "--remove" :+ "--force") withAuthorizer(brokerProps) { authorizer => TestUtils.waitAndVerifyAcls(Set.empty[Acl], authorizer, resource) } http://git-wip-us.apache.org/repos/asf/kafka/blob/c699b1a9/docs/security.html ---------------------------------------------------------------------- diff --git a/docs/security.html b/docs/security.html index e913ffa..7a1b333 100644 --- a/docs/security.html +++ b/docs/security.html @@ -577,7 +577,7 @@ Kafka Authorization management CLI can be found under bin directory with all the <td>Convenience</td> </tr> <tr> - <td>--yes</td> + <td>--force</td> <td> Convenience option to assume yes to all queries and do not prompt.</td> <td></td> <td>Convenience</td>
