Lines Matching refs:arguments
140 def _include_status(status, arguments): argument
156 return arguments.working
158 return arguments.broken
161 def _print_host_summaries(history_list, arguments): argument
175 if not _include_status(status, arguments):
200 def _print_hosts(history_list, arguments): argument
215 if not _include_status(status, arguments):
218 if arguments.full_history:
221 elif arguments.diagnosis:
226 def _validate_time_range(arguments): argument
241 if (arguments.duration is not None and
242 arguments.since is not None and arguments.until is not None):
246 if (arguments.until is None and (arguments.since is None or
247 arguments.duration is None)):
248 arguments.until = int(time.time())
249 if arguments.since is None:
250 if arguments.duration is None:
251 arguments.duration = _DEFAULT_DURATION
252 arguments.since = (arguments.until -
253 arguments.duration * 60 * 60)
254 elif arguments.until is None:
255 arguments.until = (arguments.since +
256 arguments.duration * 60 * 60)
259 def _get_host_histories(afe, arguments): argument
279 for hostname in arguments.hostnames:
282 afe, hostname, arguments.since, arguments.until)
294 def _validate_host_list(afe, arguments): argument
315 if arguments.board or arguments.pool or arguments.model:
316 if arguments.hostnames:
322 labels['board'] = arguments.board
323 labels['pool'] = arguments.pool
324 labels['model'] = arguments.model
326 afe, arguments.since, arguments.until, labels.getlabels())
328 histories = _get_host_histories(afe, arguments)
335 def _validate_format_options(arguments): argument
348 if (not arguments.oneline and not arguments.diagnosis and
349 not arguments.full_history):
350 arguments.oneline = (not arguments.working and
351 not arguments.broken)
352 if not arguments.working and not arguments.broken:
353 arguments.working = True
354 arguments.broken = True
357 def _validate_command(afe, arguments): argument
377 _validate_time_range(arguments)
378 _validate_format_options(arguments)
379 return _validate_host_list(afe, arguments)
446 arguments = parser.parse_args(argv[1:])
447 return arguments
456 arguments = _parse_command(argv)
457 afe = frontend.AFE(server=arguments.web)
458 history_list = _validate_command(afe, arguments)
459 if arguments.oneline:
460 _print_host_summaries(history_list, arguments)
462 _print_hosts(history_list, arguments)