aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mchucarr...@apache.org
Subject git commit: Improve aurora command-line help using metavars.
Date Tue, 23 Sep 2014 12:12:12 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 8a5b1d6d0 -> c4e71e0a3


Improve aurora command-line help using metavars.

Bugs closed: aurora-737

Reviewed at https://reviews.apache.org/r/25918/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/c4e71e0a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/c4e71e0a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/c4e71e0a

Branch: refs/heads/master
Commit: c4e71e0a3de867faec3a4f5607878fba4a899ea4
Parents: 8a5b1d6
Author: Mark Chu-Carroll <mchucarroll@twopensource.com>
Authored: Tue Sep 23 08:11:59 2014 -0400
Committer: Mark Chu-Carroll <mchucarroll@twitter.com>
Committed: Tue Sep 23 08:11:59 2014 -0400

----------------------------------------------------------------------
 src/main/python/apache/aurora/client/cli/jobs.py    | 4 ++++
 src/main/python/apache/aurora/client/cli/options.py | 6 +++---
 src/main/python/apache/aurora/client/cli/task.py    | 3 ++-
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c4e71e0a/src/main/python/apache/aurora/client/cli/jobs.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/jobs.py b/src/main/python/apache/aurora/client/cli/jobs.py
index 383c591..6605485 100644
--- a/src/main/python/apache/aurora/client/cli/jobs.py
+++ b/src/main/python/apache/aurora/client/cli/jobs.py
@@ -68,6 +68,7 @@ from gen.apache.aurora.api.ttypes import ExecutorConfig, ResponseCode, ScheduleS
 def arg_type_jobkey(key):
   return AuroraCommandContext.parse_partial_jobkey(key)
 WILDCARD_JOBKEY_OPTION = CommandOption('jobspec', type=arg_type_jobkey,
+        metavar="cluster[/role[/env[/name]]]",
         help="A jobkey, optionally containing wildcards")
 
 class CancelUpdateCommand(Verb):
@@ -82,6 +83,7 @@ class CancelUpdateCommand(Verb):
   def get_options(self):
     return [JSON_READ_OPTION,
         CommandOption("--config", type=str, default=None, dest="config_file",
+            metavar="pathname",
             help="Config file for the job, possibly containing hooks"),
         JOBSPEC_ARGUMENT]
 
@@ -155,6 +157,7 @@ class DiffCommand(Verb):
   def get_options(self):
     return [BIND_OPTION, JSON_READ_OPTION,
         CommandOption("--from", dest="rename_from", type=AuroraJobKey.from_path, default=None,
+            metavar="cluster/role/env/name",
             help="If specified, the job key to diff against."),
         JOBSPEC_ARGUMENT, CONFIG_ARGUMENT]
 
@@ -289,6 +292,7 @@ class AbstractKillCommand(Verb):
   def get_options(self):
     return [BROWSER_OPTION,
         CommandOption("--config", type=str, default=None, dest="config",
+            metavar="pathname",
             help="Config file for the job, possibly containing hooks"),
         BATCH_OPTION,
         MAX_TOTAL_FAILURES_OPTION,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c4e71e0a/src/main/python/apache/aurora/client/cli/options.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/options.py b/src/main/python/apache/aurora/client/cli/options.py
index 36f80aa..c2d422a 100644
--- a/src/main/python/apache/aurora/client/cli/options.py
+++ b/src/main/python/apache/aurora/client/cli/options.py
@@ -198,10 +198,10 @@ BROWSER_OPTION = CommandOption('--open-browser', default=False, dest='open_brows
     help='open browser to view job page after job is created')
 
 
-CONFIG_ARGUMENT = CommandOption('config_file', type=str,
+CONFIG_ARGUMENT = CommandOption('config_file', type=str, metavar="pathname",
     help='pathname of the aurora configuration file contain the job specification')
 
-CONFIG_OPTION = CommandOption('--config', type=str, default=None,
+CONFIG_OPTION = CommandOption('--config', type=str, default=None, metavar="pathname",
     help='pathname of the aurora configuration file contain the job specification')
 
 EXECUTOR_SANDBOX_OPTION = CommandOption('--executor-sandbox', action='store_true',
@@ -255,7 +255,7 @@ ROLE_ARGUMENT = CommandOption('role', type=parse_qualified_role, metavar='CLUSTE
     help='Rolename to retrieve information about')
 
 
-SSH_USER_OPTION = CommandOption('--ssh-user', '-l', default=None,
+SSH_USER_OPTION = CommandOption('--ssh-user', '-l', default=None, metavar="ssh_username",
     help='ssh as this username instead of the job\'s role')
 
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c4e71e0a/src/main/python/apache/aurora/client/cli/task.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/task.py b/src/main/python/apache/aurora/client/cli/task.py
index 5b5710a..492dec1 100644
--- a/src/main/python/apache/aurora/client/cli/task.py
+++ b/src/main/python/apache/aurora/client/cli/task.py
@@ -70,7 +70,7 @@ class RunCommand(Verb):
         SSH_USER_OPTION,
         EXECUTOR_SANDBOX_OPTION,
         INSTANCES_SPEC_ARGUMENT,
-        CommandOption('cmd', type=str)
+        CommandOption('cmd', type=str, metavar="unix_command_line")
     ]
 
   def execute(self, context):
@@ -102,6 +102,7 @@ class SshCommand(Verb):
             default=[],
             help="Add tunnel from local port PART to remote named port NAME"),
         CommandOption('--command', '-c', dest='command', type=str, default=None,
+            metavar="unix_command_line",
             help="Command to execute through the ssh connection."),
         TASK_INSTANCE_ARGUMENT
     ]


Mime
View raw message