Lines Matching +full:- +full:- +full:subcommands
2 # Use of this source code is governed by a BSD-style license that can be
5 """Command-line parsing for the DUT deployment tool.
17 `chromeos-firmwareupdate` to install dev-signed RO and RW firmware.
18 The DUT must begin in dev-mode, with hardware write-protect
22 stick, and run `chromeos-install` to install the OS.
29 `deploy test-image`: Install the test image. Optionally, first
31 `deploy repair`: Equivalent to `deploy test-image`, except that
47 USB image. The build is in a form like 'R66-10447.0.0'.
57 side-effect. This option implicitly overrides and disables all
84 This add a pair of options, named `--<name>` and `--no<name>`.
101 exclusion_group.add_argument('--%s' % name, action='store_true',
103 exclusion_group.add_argument('--no%s' % name, action='store_false',
110 # so default for --web is `None`.
111 parser.add_argument('-w', '--web', metavar='SERVER', default=None,
113 parser.add_argument('-d', '--dir', dest='logdir',
115 parser.add_argument('-n', '--dry-run', action='store_true',
117 parser.add_argument('-i', '--build',
119 parser.add_argument('-f', '--hostname_file',
134 def _add_subcommand(subcommands, name, upload_default, description): argument
138 `subcommands.add_parser()`). The parser is populated with the
139 standard arguments required by all `deploy` subcommands.
141 @param subcommands Subcommand object as returned by
144 @param upload_default Default setting for the `--upload` option.
148 subparser = subcommands.add_parser(name, description=description)
151 subparser.add_argument('-b', '--board', metavar='BOARD',
153 subparser.add_argument('-m', '--model', metavar='MODEL',
160 def _add_servo_subcommand(subcommands): argument
161 """Add the `servo` subcommand to `subcommands`.
163 @param subcommands Subcommand object as returned by
167 subcommands, 'servo', True,
185 def _add_firmware_subcommand(subcommands): argument
186 """Add the `firmware` subcommand to `subcommands`.
188 @param subcommands Subcommand object as returned by
192 subcommands, 'firmware', True,
196 '--using-servo', action='store_true',
204 def _add_test_image_subcommand(subcommands): argument
205 """Add the `test-image` subcommand to `subcommands`.
207 @param subcommands Subcommand object as returned by
211 subcommands, 'test-image', True,
220 def _add_repair_subcommand(subcommands): argument
221 """Add the `repair` subcommand to `subcommands`.
223 @param subcommands Subcommand object as returned by
227 subcommands, 'repair', False,
228 'Re-install test image on DUT from servo')
236 def _add_labstation_subcommand(subcommands): argument
237 """Add the `labstation` subcommand to `subcommands`.
239 @param subcommands Subcommand object as returned by
243 subcommands, 'labstation', False,
256 subcommands. Then parse the command line arguments, and return an
267 subcommands = parser.add_subparsers()
268 _add_servo_subcommand(subcommands)
269 _add_firmware_subcommand(subcommands)
270 _add_test_image_subcommand(subcommands)
271 _add_repair_subcommand(subcommands)
272 _add_labstation_subcommand(subcommands)