def parse_args(self, parser: argparse.ArgumentParser) -> None: arg_group = parser.add_argument_group( 'ClusterMetricsCollector options') add_cluster_arg(arg_group, required=True) add_env_config_path_arg(arg_group) add_disable_sensu_arg(arg_group) add_cluster_config_directory_arg(arg_group)
def parse_args(self) -> None: parser = argparse.ArgumentParser() arg_group = parser.add_argument_group( 'ClusterMetricsCollector options') add_cluster_arg(arg_group, required=True) add_env_config_path_arg(arg_group) add_cluster_config_directory_arg(arg_group) self.options = parser.parse_args()
def parse_args(self, parser): arg_group = parser.add_argument_group('AutoscalerMonitor options') add_cluster_arg(arg_group) add_pool_arg(arg_group) add_scheduler_arg(arg_group) add_env_config_path_arg(arg_group) add_cluster_config_directory_arg(arg_group) add_branch_or_tag_arg(arg_group) arg_group.add_argument( '--signal-root-directory', default='/code/signals', help='location of signal artifacts', )
def parse_args(self, parser): arg_group = parser.add_argument_group('AutoscalerBatch options') add_cluster_arg(arg_group, required=True) add_pool_arg(arg_group) add_scheduler_arg(arg_group) add_cluster_config_directory_arg(arg_group) add_env_config_path_arg(arg_group) arg_group.add_argument( '--dry-run', default=False, action='store_true', help= 'If true, will only log autoscaling decisions instead of modifying capacities', )
def parse_args(): parser = argparse.ArgumentParser() add_env_config_path_arg(parser) add_region_arg(parser, required=True) parser.add_argument( '--metric-type', choices=list(METRIC_TYPES), required=True, help='The type of metric to rename', ) parser.add_argument( '--mapping-file', required=True, help= 'A file containing a list of from -> two mappings to rename, one per line, separated by white space' ) return parser.parse_args()
def parse_args(self, parser): arg_group = parser.add_argument_group('SpotPriceCollector options') parser.add_argument( '--aws-region', required=True, choices=['us-west-1', 'us-west-2', 'us-east-1'], help='AWS region to collect spot pricing data for', ) add_env_config_path_arg(arg_group) add_disable_sensu_arg(arg_group) arg_group.add_argument( '--start-time', default=arrow.utcnow(), help=( 'Start of period to collect prices for. Default is now. ' 'Suggested format: 2017-01-13T21:10:34-08:00 (if no timezone, will be parsed as UTC).' ), type=lambda d: arrow.get(d).to('utc'), )