tools/qvm-ls: add --kernel option for compatibility with R3.2

There was such option on Qubes 3.2, so add it here too. This is
especially useful for kernel package - preun script use it to verify if
given kernel isn't needed anymore.
This commit is contained in:
Marek Marczykowski-Górecki 2018-04-21 02:51:31 +02:00
parent f46afecfe4
commit fbd5ca4150
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,10 @@ Options
Same as --format=network, for compatibility with Qubes 3.x
.. option:: --kernel, -k
Same as --format=kernel, for compatibility with Qubes 3.x
.. option:: --verbose, -v
Increase verbosity.

View File

@ -430,6 +430,7 @@ class Table(object):
formats = {
'simple': ('name', 'state', 'class', 'label', 'template', 'netvm'),
'network': ('name', 'state', 'netvm', 'ip', 'ipback', 'gateway'),
'kernel': ('name', 'state', 'class', 'template', 'kernel', 'kernelopts'),
'full': ('name', 'state', 'class', 'label', 'qid', 'xid', 'uuid'),
# 'perf': ('name', 'state', 'cpu', 'memory'),
'disk': ('name', 'state', 'disk',
@ -551,6 +552,10 @@ def get_parser():
action='store_const', dest='format', const='network',
help='Same as --format=network')
parser.add_argument('--kernel', '-k',
action='store_const', dest='format', const='kernel',
help='Same as --format=kernel')
parser.set_defaults(spinner=True)
# parser.add_argument('--conf', '-c',