Implement qvm-ls --list-fields
This commit is contained in:
parent
02d8f273f2
commit
6ddf141376
@ -34,6 +34,8 @@ OPTIONS
|
||||
List only VM names one per line
|
||||
--raw-data
|
||||
Display specify data of specified VMs. Intended for bash-parsing.
|
||||
--list-fields
|
||||
List field names valid for --raw-data
|
||||
|
||||
AUTHORS
|
||||
=======
|
||||
|
@ -134,9 +134,17 @@ def main():
|
||||
help="Display specify data of specified VMs.\
|
||||
Intended for bash-parsing.")
|
||||
|
||||
parser.add_argument("--list-fields", dest="list_fields",
|
||||
action="store_true", default=False,
|
||||
help="List field names valid for --raw-data")
|
||||
|
||||
|
||||
arguments = parser.parse_args ()
|
||||
|
||||
if arguments.list_fields:
|
||||
print '\n'.join(sorted(fields.keys()))
|
||||
return
|
||||
|
||||
qvm_collection = QubesVmCollection()
|
||||
qvm_collection.lock_db_for_reading()
|
||||
qvm_collection.load()
|
||||
|
Loading…
Reference in New Issue
Block a user