tools/qvm-ls: add --network and --disk compatibility options

Shortcuts for new --format=...
This commit is contained in:
Marek Marczykowski-Górecki 2017-12-22 23:23:57 +01:00
parent 080b563ae2
commit b16f3ab79b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 16 additions and 0 deletions

View File

@ -53,6 +53,14 @@ Options
Give plain list of VM names, without header or separator. Useful in scripts.
Same as --raw-data --fields=name
.. option:: --disk, -d
Same as --format=disk, for compatibility with Qubes 3.x
.. option:: --network, -n
Same as --format=network, for compatibility with Qubes 3.x
.. option:: --verbose, -v
Increase verbosity.

View File

@ -543,6 +543,14 @@ def get_parser():
parser.add_argument('--raw-list', action='store_true',
help='Same as --raw-data --fields=name')
parser.add_argument('--disk', '-d',
action='store_const', dest='format', const='disk',
help='Same as --format=disk')
parser.add_argument('--network', '-n',
action='store_const', dest='format', const='network',
help='Same as --format=network')
parser.set_defaults(spinner=True)
# parser.add_argument('--conf', '-c',