Revision 9cdb9578
b/lib/cli.py | ||
---|---|---|
54 | 54 |
"SYNC_OPT", |
55 | 55 |
"TAG_SRC_OPT", |
56 | 56 |
"USEUNITS_OPT", |
57 |
"VERBOSE_OPT", |
|
57 | 58 |
# Generic functions for CLI programs |
58 | 59 |
"GenericMain", |
59 | 60 |
"GetClient", |
... | ... | |
459 | 460 |
" check steps and verify it it could be" |
460 | 461 |
" executed")) |
461 | 462 |
|
463 |
VERBOSE_OPT = cli_option("-v", "--verbose", default=False, |
|
464 |
action="store_true", |
|
465 |
help="Increase the verbosity of the operation") |
|
466 |
|
|
462 | 467 |
|
463 | 468 |
def _ParseArgs(argv, commands, aliases): |
464 | 469 |
"""Parser for the command line arguments. |
b/scripts/gnt-debug | ||
---|---|---|
165 | 165 |
], |
166 | 166 |
"[opts...] <duration>", "Executes a TestDelay OpCode"), |
167 | 167 |
'submit-job': (GenericOpCodes, [ArgFile(min=1)], |
168 |
[DEBUG_OPT, |
|
168 |
[DEBUG_OPT, VERBOSE_OPT,
|
|
169 | 169 |
cli_option("--op-repeat", type="int", default="1", |
170 | 170 |
dest="rep_op", |
171 | 171 |
help="Repeat the opcode sequence this number" |
... | ... | |
174 | 174 |
dest="rep_job", |
175 | 175 |
help="Repeat the job this number" |
176 | 176 |
" of times"), |
177 |
cli_option("-v", "--verbose", default=False, |
|
178 |
action="store_true", |
|
179 |
help="Make the operation more verbose"), |
|
180 | 177 |
cli_option("--timing-stats", default=False, |
181 | 178 |
action="store_true", |
182 | 179 |
help="Show timing stats"), |
b/tools/burnin | ||
---|---|---|
114 | 114 |
default=128, type="unit", metavar="<size>", |
115 | 115 |
completion_suggest=("128M 256M 512M 1G 4G 8G" |
116 | 116 |
" 12G 16G").split()), |
117 |
cli.cli_option("-v", "--verbose", |
|
118 |
action="store_true", dest="verbose", default=False, |
|
119 |
help="print command execution messages to stdout"), |
|
117 |
cli.VERBOSE_OPT, |
|
120 | 118 |
cli.cli_option("--no-replace1", dest="do_replace1", |
121 | 119 |
help="Skip disk replacement with the same secondary", |
122 | 120 |
action="store_false", default=True), |
b/tools/cfgupgrade | ||
---|---|---|
287 | 287 |
" output file") |
288 | 288 |
parser.add_option(cli.FORCE_OPT) |
289 | 289 |
parser.add_option(cli.DEBUG_OPT) |
290 |
parser.add_option('-v', '--verbose', dest='verbose', |
|
291 |
action="store_true", |
|
292 |
help="Verbose output") |
|
290 |
parser.add_option(cli.VERBOSE_OPT) |
|
293 | 291 |
parser.add_option('--path', help="Convert configuration in this" |
294 | 292 |
" directory instead of '%s'" % constants.DATA_DIR, |
295 | 293 |
default=constants.DATA_DIR, dest="data_dir") |
b/tools/lvmstrap | ||
---|---|---|
142 | 142 |
parser.add_option("-d", "--disks", dest="disks", |
143 | 143 |
help="Choose disks (e.g. hda,hdg)", |
144 | 144 |
metavar="DISKLIST") |
145 |
parser.add_option("-v", "--verbose", |
|
146 |
action="store_true", dest="verbose", default=False, |
|
147 |
help="print command execution messages to stdout") |
|
145 |
parser.add_option(cli.VERBOSE_OPT) |
|
148 | 146 |
parser.add_option("-r", "--allow-removable", |
149 | 147 |
action="store_true", dest="removable_ok", default=False, |
150 | 148 |
help="allow and use removable devices too") |
Also available in: Unified diff