• Home
  • Raw
  • Download

Lines Matching refs:arguments

374 def _balance_model(arguments, afe, pool, labels, start_time, end_time):  argument
388 spare_pool = _DUTPool(afe, arguments.spare, labels, start_time, end_time)
392 if arguments.total is not None:
393 target_total = arguments.total
394 elif arguments.grow:
395 target_total += arguments.grow
396 elif arguments.shrink:
397 target_total -= arguments.shrink
409 if spares_needed or surplus_duts or arguments.verbose:
410 dry_run = arguments.dry_run
451 if (len(main_pool.broken_hosts) > arguments.max_broken and
452 not arguments.force_rebalance):
463 if arguments.verbose:
464 _log_info(arguments.dry_run, 'No exchange required.')
466 _exchange_labels(arguments.dry_run, surplus_duts,
468 _exchange_labels(arguments.dry_run, spare_duts,
594 arguments = parser.parse_args(argv[1:])
597 if arguments.models and arguments.all_models:
600 if (arguments.pool == _ALL_CRITICAL_POOLS and
601 arguments.spare != _SPARE_DEFAULT):
604 for p in (arguments.spare, arguments.pool):
607 return arguments
610 def infer_balancer_targets(afe, arguments, pools): argument
624 if arguments.all_models:
626 quarantine = _too_many_broken(inventory, pool, arguments)
635 if arguments.phase:
636 labels['phase'] = arguments.phase
643 for model in arguments.models:
646 if arguments.sku:
647 labels['sku'] = arguments.sku
648 if arguments.phase:
649 labels['phase'] = arguments.phase
660 arguments = _parse_command(argv)
661 if arguments.production:
671 afe = frontend_wrappers.RetryingAFE(server=arguments.web)
680 _balance_model(arguments, afe, pool, labels,
685 if arguments.pool == _ALL_CRITICAL_POOLS
686 else [arguments.pool])
687 balancer_targets = infer_balancer_targets(afe, arguments, pools)