/** * Adds the configuration file argument for the configured command. * @param subparser The subparser to register the argument on * @return the register argument */ protected Argument addFileArgument(Subparser subparser) { return subparser.addArgument("file") .nargs("?") .help("application configuration file"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("output").nargs(1).help("output directory"); }
public JobStopCommand(Subparser parser) { super(parser); parser.help("stop a running job without undeploying it"); hostsArg = parser.addArgument("hosts") .nargs("+") .help("The hosts to stop the job on."); tokenArg = parser.addArgument("--token") .nargs("?") .setDefault("") .help("Insecure access token"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("tag-name") .dest("tag-name") .nargs(1) .required(true) .help("The tag name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-i", "--include-default") .action(Arguments.storeTrue()) .dest("include-default") .help("Also render the template with the default name"); subparser.addArgument("names").nargs("*"); }
public JobRemoveCommand(Subparser parser) { super(parser); parser.help("remove a job"); tokenArg = parser.addArgument("--token") .nargs("?") .setDefault("") .help("Insecure access token"); yesArg = parser.addArgument("--yes") .action(Arguments.storeTrue()) .help("Automatically answer 'yes' to the interactive prompt."); }
public JobUndeployCommand(final Subparser parser) { super(parser); parser.help("undeploy a job from hosts"); hostsArg = parser.addArgument("hosts") .nargs("*") .help("The hosts to undeploy the job from."); tokenArg = parser.addArgument("--token") .nargs("?") .setDefault("") .help("Insecure access token"); allArg = parser.addArgument("-a", "--all") .action(storeTrue()) .help("Undeploy from all currently deployed hosts."); yesArg = parser.addArgument("--yes") .action(storeTrue()) .help("Automatically answer 'yes' to the interactive prompt."); }
public DeploymentGroupCreateCommand(final Subparser parser) { super(parser); parser.help("create a deployment group"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); hostSelectorsArg = parser.addArgument("host_selectors") .action(append()) .setDefault(Lists.newArrayList()) .nargs("+") .help("Host selector expression. Hosts matching this expression will be part of the " + "deployment-group. Multiple conditions can be specified, separated by spaces (as " + "separate arguments). If multiple conditions are given, all must be fulfilled. " + "Operators supported are =, !=, in and notin. Example: foo=bar baz!=qux"); quietArg = parser.addArgument("-q") .action(storeTrue()) .help("only print job id"); }
public JobDeployCommand(final Subparser parser) { super(parser); parser.help("deploy a job to hosts"); hostsArg = parser.addArgument("hosts") .nargs("+") .help("The hosts to deploy the job on."); tokenArg = parser.addArgument("--token") .nargs("?") .setDefault("") .help("Insecure access token"); noStartArg = parser.addArgument("--no-start") .action(storeTrue()) .help("Deploy job without starting it."); watchArg = parser.addArgument("--watch") .action(storeTrue()) .help("Watch the newly deployed job (like running job watch right after)"); intervalArg = parser.addArgument("--interval") .setDefault(1) .help("if --watch is specified, the polling interval, default 1 second"); }
parser.addArgument("--member", "-m") .type(String.class) .nargs("?") .required(false) .help("The local member identifier, used in intra-cluster communication."); .type(addressArgumentType) .metavar("HOST:PORT") .nargs("?") .required(false) .help("The address for the local member. If no address is specified, the first public interface will be used."); parser.addArgument("--host") .type(String.class) .nargs("?") .required(false) .help("The host on which this member runs, used for host-aware partition management."); parser.addArgument("--rack") .type(String.class) .nargs("?") .required(false) .help("The rack on which this member runs, used for rack-aware partition management."); parser.addArgument("--zone") .type(String.class) .nargs("?") .required(false) .help("The zone in which this member runs, used for zone-aware partition management."); .metavar("CONF|JSON|PROPERTIES") .type(File.class)
public JobWatchCommand(Subparser parser) { super(parser); parser.help("watch jobs"); jobsArg = parser.addArgument("job") .help("Job reference"); intervalArg = parser.addArgument("--interval") .type(Integer.class) .setDefault(1) .help("polling interval, default 1 second"); prefixesArg = parser.addArgument("hosts") .nargs("*") .help("The hostname prefixes to watch the job on."); exactArg = parser.addArgument("--exact") .action(storeTrue()) .help("Show status of job for every host in hosts"); }
public JobListCommand(final Subparser parser) { super(parser); parser.help("list jobs"); patternArg = parser.addArgument("pattern") .nargs("?") .help("Job reference to filter on"); fullArg = parser.addArgument("-f") .action(storeTrue()) .help("Print full job id's."); quietArg = parser.addArgument("-q") .action(storeTrue()) .help("only print job id's"); deployedArg = parser.addArgument("-y") .action(storeTrue()) .help("only show deployed jobs"); }
.nargs("?") .help("Job name:version[:hash]"); .nargs("?") .help("Container image"); .nargs("?") .help("Container hostname"); .nargs("?") .setDefault(EMPTY_TOKEN) .help("Insecure access token meant to prevent accidental changes to your job " .nargs("*") .help("Command line arguments"); .nargs("?") .help("Runtime to use with this container.");
/** * Adds the configuration file argument for the configured command. * @param subparser The subparser to register the argument on * @return the register argument */ protected Argument addFileArgument(Subparser subparser) { return subparser.addArgument("file") .nargs("?") .help("application configuration file"); }
.nargs("?") .help("Insecure access token meant to prevent accidental changes to your job " + "(e.g. undeploys).");
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("-g", "--group") .help("Specify the recipient group ID."); subparser.addArgument("-n", "--name") .help("Specify the new group name."); subparser.addArgument("-a", "--avatar") .help("Specify a new group avatar image file"); subparser.addArgument("-m", "--member") .nargs("*") .help("Specify one or more members to add to the group"); }