Skip to content

Commit 99b05c8

Browse files
committed
Merge remote-tracking branch 'origin/pr/301'
* origin/pr/301: Improve new qvm-ls documentation & comments Update unittests for new qvm-ls options Update documentation for new qvm-ls options Add requested changes for qvm-ls, numeric sort Improve qvm-ls options to avoid parsing
2 parents 7d16977 + 615baf2 commit 99b05c8

File tree

3 files changed

+679
-63
lines changed

3 files changed

+679
-63
lines changed

doc/manpages/qvm-ls.rst

+113-28
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,48 @@
11
.. program:: qvm-ls
22

3-
:program:`qvm-ls` -- List VMs and various information about them
3+
:program:`qvm-ls` -- List qubes and various information about them
44
================================================================
55

66
Synopsis
77
--------
88

9-
:command:`qvm-ls` [-h] [--verbose] [--quiet] [--help-columns] [--help-formats] [--format *FORMAT* | --fields *FIELD*,...] [--tags *TAG* [*TAG* ...]] [--running] [--paused] [--halted]
9+
:command:`qvm-ls` [--verbose] [--quiet] [--help] [--all]
10+
[--exclude *EXCLUDE*] [--spinner] [--no-spinner]
11+
[--format *FORMAT* | --fields *FIELD* [*FIELD* ...] | --disk | --network | --kernel]
12+
[--tree] [--raw-data] [--raw-list] [--help-formats]
13+
[--help-columns] [--class *CLASS* [*CLASS* ...]]
14+
[--label *LABEL* [*LABEL* ...]] [--tags *TAG* [*TAG* ...]]
15+
[--exclude-tags *TAG* [*TAG* ...]] [--running] [--paused]
16+
[--halted] [--template-source *TEMPLATE* [*TEMPLATE* ...]]
17+
[--netvm-is *NETVM* [*NETVM* ...]] [--internal <y|n>]
18+
[--servicevm <y|n>] [--pending-update]
19+
[--features *FEATURE=VALUE* [*FEATURE=VALUE* ...]]
20+
[--prefs *PREFERENCE=VALUE* [*PREFERENCE=VALUE* ...]]
21+
[--sort *COLUMN*] [--reverse] [--ignore-case]
22+
[VMNAME ...]
1023

11-
Options
12-
-------
24+
25+
Positional arguments
26+
--------------------
27+
28+
.. option:: VMNAME ...
29+
30+
Zero or more domain names
31+
32+
General options
33+
---------------
1334

1435
.. option:: --help, -h
1536

1637
Show help message and exit
1738

18-
.. option:: --help-columns
39+
.. option:: --verbose, -v
1940

20-
List all available columns with short descriptions and exit.
41+
Increase verbosity.
2142

22-
.. option:: --help-formats
43+
.. option:: --quiet, -q
2344

24-
List all available formats with their definitions and exit.
45+
Decrease verbosity.
2546

2647
.. option:: --all
2748

@@ -32,6 +53,17 @@ Options
3253
Exclude the qube from --all. You need to use --all option explicitly to use
3354
--exclude.
3455

56+
.. option:: --spinner
57+
58+
Have a spinner spinning while the spinning mainloop spins new table cells.
59+
60+
.. option:: --no-spinner
61+
62+
No spinner today.
63+
64+
Formatting options
65+
------------------
66+
3567
.. option:: --format=FORMAT, -o FORMAT
3668

3769
Sets format to a list of columns defined by preset. All formats along with
@@ -43,14 +75,10 @@ Options
4375
:option:`--format`. All columns along with short descriptions can be listed
4476
with :option:`--help-columns`.
4577

46-
.. option:: --tags TAG ...
47-
48-
Shows only VMs having specific tag(s).
49-
50-
.. option:: --running, --paused, --halted
78+
.. option:: --tree, -t
5179

52-
Shows only VMs matching the specified power state(s). When none of these
53-
options is used (default), all VMs are shown.
80+
List qubes as a network tree. Qubes are sorted as they are connected to
81+
their netvms. Names are indented relative to the number of connected netvms.
5482

5583
.. option:: --raw-data
5684

@@ -62,11 +90,6 @@ Options
6290
Give plain list of VM names, without header or separator. Useful in scripts.
6391
Same as --raw-data --fields=name
6492

65-
.. option:: --tree, -t
66-
67-
List domains as a network tree. Domains are sorted as they are connected to
68-
their netvms. Names are indented relative to the number of connected netvms.
69-
7093
.. option:: --disk, -d
7194

7295
Same as --format=disk, for compatibility with Qubes 3.x
@@ -79,21 +102,83 @@ Options
79102

80103
Same as --format=kernel, for compatibility with Qubes 3.x
81104

82-
.. option:: --verbose, -v
105+
.. option:: --help-columns
83106

84-
Increase verbosity.
107+
List all available columns with short descriptions and exit.
85108

86-
.. option:: --quiet, -q
109+
.. option:: --help-formats
87110

88-
Decrease verbosity.
111+
List all available formats with their definitions and exit.
89112

90-
.. option:: --spinner
113+
Filtering options
114+
-----------------
91115

92-
Have a spinner spinning while the spinning mainloop spins new table cells.
116+
.. option:: --class CLASS ...
93117

94-
.. option:: --no-spinner
118+
Show only qubes of specific class(es)
95119

96-
No spinner today.
120+
.. option:: --label LABEL ...
121+
122+
Show only qubes with specific label(s)
123+
124+
.. option:: --tags TAG ...
125+
126+
Shows only qubes having specific tag(s).
127+
128+
.. option:: --exclude-tags TAG ...
129+
130+
Exclude qubes having specific tag(s).
131+
132+
.. option:: --running, --paused, --halted
133+
134+
Shows only qubes matching the specified power state(s). When none of these
135+
options is used (default), all qubes are shown.
136+
137+
.. option:: --template-source TEMPLATE ...
138+
139+
Filter results to the qubes based on the TEMPLATE(s)
140+
141+
.. option:: --netvm-is NETVM ...
142+
143+
Filter results to the qubes connecting via NETVM(s)
144+
145+
.. option:: --internal <y|n>
146+
147+
Show only internal qubes or exclude them from output
148+
149+
.. option:: --servicevm <y|n>
150+
151+
Show only servicevms or exclude them from output
152+
153+
.. option:: --pending-update
154+
155+
Filter results to qubes pending for update
156+
157+
.. option:: --features FEATURE=VALUE ...
158+
159+
Filter results to qubes that match all specified features. Omitted VALUE
160+
means None (unset). Empty value means "" or '' (blank)
161+
162+
.. option:: --prefs PREFERENCE=VALUE ...
163+
164+
Filter results to qubes that match all specified preferences. Omitted VALUE
165+
means None (unset). Empty value means "" or '' (blank)
166+
167+
Sorting options
168+
---------------
169+
170+
.. option:: --sort COLUMN
171+
172+
Sort based on provided column rather than NAME. Sort key must be in the
173+
output columns
174+
175+
.. option:: --reverse
176+
177+
Reverse sort
178+
179+
.. option:: --ignore-case
180+
181+
Ignore case distinctions when sorting
97182

98183
Authors
99184
-------

0 commit comments

Comments
 (0)