Revision cb4a5d9c kamaki/cli/argument.py
b/kamaki/cli/argument.py | ||
---|---|---|
398 | 398 |
|
399 | 399 |
_arguments = dict( |
400 | 400 |
config=_config_arg, |
401 |
cloud=ValueArgument('Chose a remote cloud to connect to', ('--cloud')), |
|
401 | 402 |
help=Argument(0, 'Show help message', ('-h', '--help')), |
402 | 403 |
debug=FlagArgument('Include debug output', ('-d', '--debug')), |
403 | 404 |
include=FlagArgument( |
404 |
'Include raw connection data in the output', |
|
405 |
('-i', '--include')), |
|
405 |
'Include raw connection data in the output', ('-i', '--include')), |
|
406 | 406 |
silent=FlagArgument('Do not output anything', ('-s', '--silent')), |
407 | 407 |
verbose=FlagArgument('More info at response', ('-v', '--verbose')), |
408 | 408 |
version=VersionArgument('Print current version', ('-V', '--version')), |
409 | 409 |
options=CmdLineConfigArgument( |
410 |
_config_arg, |
|
411 |
'Override a config value', |
|
412 |
('-o', '--options')) |
|
410 |
_config_arg, 'Override a config value', ('-o', '--options')) |
|
413 | 411 |
) |
414 |
"""Initial command line interface arguments""" |
|
415 |
|
|
416 |
|
|
417 |
""" |
|
418 |
Mechanism: |
|
419 |
init_parser |
|
420 |
parse_known_args |
|
421 |
manage top-level user arguments input |
|
422 |
find user-requested command |
|
423 |
add command-specific arguments to dict |
|
424 |
update_arguments |
|
425 |
""" |
|
412 |
|
|
413 |
|
|
414 |
# Initial command line interface arguments |
|
426 | 415 |
|
427 | 416 |
|
428 | 417 |
class ArgumentParseManager(object): |
Also available in: Unified diff