public DeploymentGroupInspectCommand(final Subparser parser) { super(parser); parser.help("inspect a deployment group"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); }
public DeploymentGroupStopCommand(final Subparser parser) { super(parser); parser.help("Stop a deployment-group or abort a rolling-update"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); }
public DeploymentGroupRemoveCommand(final Subparser parser) { super(parser); parser.help("remove a deployment-group. Note that this does not undeploy jobs previously " + "deployed by the deployment-group"); nameArg = parser.addArgument("deployment-group-name") .required(true) .help("Deployment group name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("--confirm-delete-everything") .action(Arguments.storeTrue()) .required(true) .help("indicate you understand this deletes everything in your database"); }
@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("-u", "--user") .dest("user") .type(String.class) .required(true) .help("The user to remove"); }
public DeploymentGroupStatusCommand(final Subparser parser) { super(parser); parser.help("Show deployment-group status"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); fullArg = parser.addArgument("-f") .action(storeTrue()) .help("Print full hostnames and job ids."); }
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"); }
.required(false) .type(String.class) .metavar("TOPIC") .required(false) .type(String.class) .dest("producerId") .required(true) .type(String.class) .metavar("HOST1:PORT1[,HOST2:PORT2[...]]") .required(true) .type(String.class) .metavar("HOST:PORT") .required(false) .type(String.class) .metavar("RECORD_SIZE") .required(false) .type(String.class) .metavar("PRODUCER_CLASS_NAME") .required(false) .type(String.class) .metavar("CONSUMER_CLASS_NAME") .required(false)
.type(String.class) .nargs("?") .required(false) .help("The local member identifier, used in intra-cluster communication."); parser.addArgument("--address", "-a") .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."); parser.addArgument("--config", "-c") .type(File.class) .nargs("*")
public static void main(String[] args) throws Exception { ArgumentParser parser = ArgumentParsers.newArgumentParser("ImpressionsToInfluxDb") .defaultHelp(true) .description("Read Seldon impressions and send stats to influx db"); parser.addArgument("-t", "--topic").setDefault("actions").help("Kafka topic to read from"); parser.addArgument("-c", "--client").required(true).help("Client to run item similarity"); parser.addArgument("-o", "--output-topic").required(true).help("Output topic"); parser.addArgument("-k", "--kafka").setDefault("localhost:9092").help("Kafka server and port"); parser.addArgument("-z", "--zookeeper").setDefault("localhost:2181").help("Zookeeper server and port"); parser.addArgument("-w", "--window-secs").type(Integer.class).setDefault(3600*5).help("streaming window size in secs, -1 means ignore"); parser.addArgument("-u", "--window-processed").type(Integer.class).setDefault(-1).help("streaming window size in processed count, -1 means ignore"); parser.addArgument("--output-poll-secs").type(Integer.class).setDefault(60).help("output timer polling period in secs"); parser.addArgument("--hashes").type(Integer.class).setDefault(100).help("number of hashes"); parser.addArgument("-m", "--min-activity").type(Integer.class).setDefault(200).help("min activity"); parser.addArgument("-p", "--parse-date-method").choices("json-time","json-utc","system").setDefault("json-time").help("min activity"); Namespace ns = null; try { ns = parser.parseArgs(args); ItemSimilarityProcessor processor = new ItemSimilarityProcessor(ns); processor.process(ns); } catch (ArgumentParserException e) { parser.handleError(e); System.exit(1); } }
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("-g", "--group") .required(true) .help("Specify the recipient group ID."); }
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("--uri") .required(true) .help("Specify the uri contained in the QR code shown by the new device."); }
.required(true) .help("Deployment group name");
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("-d", "--deviceId") .type(int.class) .required(true) .help("Specify the device you want to remove. Use listDevices to see the deviceIds."); }
@Override public void configureArguments(ArgumentParser parser) { ScriptEnvironment.configureArguments(parser); parser.addArgument("config_file") .metavar("CONFIG") .help("Load train-test configuration from CONFIG") .type(File.class) .required(true); }
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("number") .help("Specify the phone number, for which to set the trust.") .required(true); MutuallyExclusiveGroup mutTrust = subparser.addMutuallyExclusiveGroup(); mutTrust.addArgument("-a", "--trust-all-known-keys") .help("Trust all known keys of this user, only use this for testing.") .action(Arguments.storeTrue()); mutTrust.addArgument("-v", "--verified-fingerprint") .help("Specify the fingerprint of the key, only use this option if you have verified the fingerprint."); }
/** * Initialize the arg parser for the Sort sub command * * @param subparsers The Subparsers object to attach the new Subparser to */ @Override public void intializeSubCommand( Subparsers subparsers ) { Subparser sortParser = subparsers.addParser( "sort" ) .description( "Jolt CLI Sort Tool. This tool will ingest one JSON input (from a file or standard input) and " + "perform the Jolt sort operation on it. The sort order is standard alphabetical ascending, with a " + "special case for \"~\" prefixed keys to be bumped to the top. The program will return an exit code " + "of 0 if the sort operation is performed successfully or a 1 if an error is encountered." ) .defaultHelp( true ); sortParser.addArgument( "input" ).help( "File path to the input JSON that the sort operation should be performed on. " + "This file should contain valid JSON. " + "If this argument is not specified then standard input will be used." ) .type( Arguments.fileType().verifyExists().verifyIsFile().verifyCanRead() ) .nargs( "?" ).setDefault( (File) null ).required( false ); // these last two method calls make input optional sortParser.addArgument( "-u" ).help( "Turns off pretty print for the output. Output will be raw json with no formatting." ) .action( Arguments.storeTrue() ); }
@Override public void configure(Subparser subparser) { subparser.addArgument("gpx") .type(File.class) .required(true) .nargs("+") .help("GPX file"); }