aurora-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Farner (JIRA)" <>
Subject [jira] [Commented] (AURORA-994) Simplify client help output
Date Thu, 08 Jan 2015 02:24:34 GMT


Bill Farner commented on AURORA-994:

We still get all the details :-)

Expanding on the output above, drilling into a subcommand:

$ aurora task run -h
usage: aurora task run [-h] [--threads NUM_THREADS] [--ssh-user ssh_username]
                       [--executor-sandbox] [--verbose]
                       [--skip-hooks hook,hook,...]
                       CLUSTER/ROLE/ENV/NAME[/INSTANCES] unix_command_line

positional arguments:
                        Fully specified job instance key, in
                        CLUSTER/ROLE/ENV/NAME[/INSTANCES] format. If INSTANCES
                        is omitted, then all instances will be operated on.

optional arguments:
  -h, --help            show this help message and exit
                        Number of threads to use
  --ssh-user ssh_username, -l ssh_username
                        ssh as this username instead of the job's role
  --executor-sandbox    Run the command in the executor sandbox instead of the
                        task sandbox
  --verbose, -v         Show verbose output
  --skip-hooks hook,hook,...
                        A comma-separated list of command hook names that
                        should be skipped. If the hooks cannot be skipped,
                        then the command will be aborted

> Simplify client help output
> ---------------------------
>                 Key: AURORA-994
>                 URL:
>             Project: Aurora
>          Issue Type: Story
>          Components: Client, Usability
>            Reporter: Bill Farner
>            Assignee: Bill Farner
> The default help in the client is overwhelming, as it includes an exhaustive list of
commands, subcommands, all options, and no prose.
> Here's a snippet:
> {noformat}
> $ aurora
> Aurora Client version none@Thursday Jan 08, 2015 00:18:27
> Usage:
> ==Commands for tasks
>   task run   [--verbose] [--threads=threads] [--ssh-user=ssh_username] [--executor-sandbox]
>   task ssh   [--verbose] [--ssh-user=ssh_username] [--executor-sandbox] [--tunnels=PORT:NAME]
[--command=unix_command_line] task_instance
> {noformat}
> Meanwhile, the help text already wired into argparse is much more consumable, allowing
you to drill down into subcommands:
> {noformat}
> $ aurora -h
> usage: aurora [-h] {task,quota,cron,job,config,sla,beta-update} ...
> positional arguments:
>   {task,quota,cron,job,config,sla,beta-update}
>     task                Work with a task running in an Apache Aurora cluster
>     quota               Work with quota settings for an Apache Aurora cluster
>     cron                Work with entries in the aurora cron scheduler
>     job                 Work with an aurora job
>     config              Work with an aurora configuration file
>     sla                 Work with SLA data in Aurora cluster.
>     beta-update         Interact with the aurora update service.
> optional arguments:
>   -h, --help            show this help message and exit
> {noformat}
> {noformat}
> $ aurora task -h
> usage: aurora task [-h] {run,ssh} ...
> positional arguments:
>   {run,ssh}
>     run       Usage: aurora task run cluster/role/env/job cmd Runs a shell
>               command on machines currently hosting instances of a single job.
>               This feature supports the same command line wildcards that are
>               used to populate a job's commands. This means anything in the
>               {{mesos.*}} and {{thermos.*}} namespaces.
>     ssh       usage: aurora task ssh cluster/role/env/job/instance [args...]
>               Initiate an SSH session on the machine that a task instance is
>               running on.
> optional arguments:
>   -h, --help  show this help message and exit
> {noformat}
> I suggest we drop the {{help}} subcommand and exhaustive help, and only use the output
from argparse.

This message was sent by Atlassian JIRA

View raw message