Lines Matching full:arguments
7 Arguments for the DUT deployment commands require more processing than
9 validation process not only checks that arguments have allowable values,
10 but also may perform a dialog with the user to ask for missing arguments.
93 The function constructs the full GS URI from the arguments, and
250 def _validate_arguments(arguments): argument
251 """Check command line arguments, and account for defaults.
260 @param arguments Parsed results from
266 if arguments.hostnames and arguments.hostname_file:
271 if (arguments.hostname_file and
272 not _is_hostname_file_valid(arguments.hostname_file)):
276 if (not arguments.hostnames and not arguments.hostname_file and
277 (arguments.board or arguments.build)):
281 if arguments.board is not None:
282 if not _validate_board(arguments.board):
284 if (arguments.build is not None and
285 not _validate_build(arguments.board, arguments.build)):
423 def _read_arguments(input, arguments): argument
424 """Dialog to read all needed arguments from the user.
427 hostnames. Responses are stored in `arguments`. The user is
433 @param arguments Namespace object returned from
439 arguments.board = _read_board(input, arguments.board)
440 arguments.build = _read_build(input, arguments.board)
441 arguments.model = _read_model(input, arguments.model)
443 arguments.board, arguments.build)
445 arguments.hostnames = _read_hostnames(input)
478 def _get_upload_basename(arguments): argument
481 @param arguments Namespace object returned from argument parsing.
487 return '{time}-{board}'.format(time=timestamp, board=arguments.board)
512 def validate_arguments(arguments): argument
513 """Validate parsed arguments for a repair or deployment command.
515 The `arguments` parameter represents a `Namespace` object returned
516 by `cmdparse.parse_command()`. Check this for mandatory arguments;
520 Once all arguments are known to be filled in, validate the values,
524 @param arguments Standard `Namespace` object as returned by
527 if not arguments.board or not arguments.model:
528 _read_arguments(sys.stdin, arguments)
529 elif not _validate_arguments(arguments):
532 arguments.upload_basename = _get_upload_basename(arguments)
533 if not arguments.logdir:
534 arguments.logdir = os.path.join(os.environ['HOME'],
536 arguments.upload_basename)
537 os.makedirs(arguments.logdir)
538 elif not os.path.isdir(arguments.logdir):
539 os.mkdir(arguments.logdir)
541 if arguments.hostname_file:
542 # Populate arguments.hostnames with the hostnames from the file.
543 hostname_file_info_list = _parse_hostname_file(arguments.hostname_file)
544 arguments.hostnames = [host_info.hostname
546 arguments.host_info_list = hostname_file_info_list
548 arguments.host_info_list = []
549 return arguments