Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2360B111CA for ; Tue, 10 Jun 2014 14:45:20 +0000 (UTC) Received: (qmail 99714 invoked by uid 500); 10 Jun 2014 14:45:20 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 99654 invoked by uid 500); 10 Jun 2014 14:45:19 -0000 Mailing-List: contact commits-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.incubator.apache.org Delivered-To: mailing list commits@aurora.incubator.apache.org Received: (qmail 99645 invoked by uid 99); 10 Jun 2014 14:45:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 14:45:17 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jun 2014 14:45:16 +0000 Received: (qmail 99460 invoked by uid 99); 10 Jun 2014 14:44:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 14:44:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 02A8B91D1A9; Tue, 10 Jun 2014 14:44:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mchucarroll@apache.org To: commits@aurora.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: Add a short form of help for v1 client, so that merged help isn't unreasonably long. Date: Tue, 10 Jun 2014 14:44:55 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-aurora Updated Branches: refs/heads/master 5665d4ce8 -> 18c35b551 Add a short form of help for v1 client, so that merged help isn't unreasonably long. Bugs closed: aurora-422 Reviewed at https://reviews.apache.org/r/22263/ Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/18c35b55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/18c35b55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/18c35b55 Branch: refs/heads/master Commit: 18c35b5519611d47621be3625cb3d8d55f9eb473 Parents: 5665d4c Author: Mark Chu-Carroll Authored: Tue Jun 10 10:28:33 2014 -0400 Committer: Mark Chu-Carroll Committed: Tue Jun 10 10:28:33 2014 -0400 ---------------------------------------------------------------------- src/main/python/apache/aurora/client/cli/bridge.py | 5 ++++- src/main/python/apache/aurora/client/cli/client.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/18c35b55/src/main/python/apache/aurora/client/cli/bridge.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/client/cli/bridge.py b/src/main/python/apache/aurora/client/cli/bridge.py index 6528d90..227abf8 100644 --- a/src/main/python/apache/aurora/client/cli/bridge.py +++ b/src/main/python/apache/aurora/client/cli/bridge.py @@ -41,6 +41,9 @@ class CommandProcessor(object): """Get a list of the commands that this processor can handle.""" pass + def show_help(self): + self.execute(["", "help"]) + class Bridge(object): """Given multiple command line programs, each represented by a "CommandProcessor" object, @@ -64,7 +67,7 @@ class Bridge(object): [cp.name for cp in self.command_processors]) for cp in self.command_processors: print("========== help for %s ==========" % cp.name) - cp.execute(args) + cp.show_help() return 0 elif len(args) >= 3: discriminator = args[2] http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/18c35b55/src/main/python/apache/aurora/client/cli/client.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/client/cli/client.py b/src/main/python/apache/aurora/client/cli/client.py index e4409e5..0cb6944 100644 --- a/src/main/python/apache/aurora/client/cli/client.py +++ b/src/main/python/apache/aurora/client/cli/client.py @@ -46,6 +46,10 @@ class AuroraClientV1CommandProcessor(CommandProcessor): def name(self): return "Aurora Client v1" + def show_help(self): + print("Supported commands are: %s" % ", ".join(self.get_commands())) + print("\nRun '%s help _command_' for help on a specific command" % sys.argv[0]) + def get_commands(self): return ["cancel_update", "create", "diff", "get_quota", "inspect", "kill", "list_jobs", "open", "restart", "run", "ssh", "start_cron", "status", "update", "version"]