Skip to content

Commit c9525b8

Browse files
committed
Manage the all option (in the Vms plugin)
1 parent 8e4b9d9 commit c9525b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

conf/glances.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ port_default_gateway=True
465465
disable=False
466466
# Define the maximum VMs size name (default is 20 chars)
467467
max_name_size=20
468-
# By default, Glances only display running VMs
469-
# Set the following key to True to display all VMs
468+
# By default, Glances only display running VMs with states: 'Running', 'Starting' or 'Restarting'
469+
# Set the following key to True to display all VMs regarding their states
470470
all=False
471471

472472
[containers]

glances/plugins/vms/engines/multipass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def update(self, all_tag) -> Tuple[Dict, List[Dict]]:
103103
for k, v in info_stats.items():
104104
# Only display when VM in on 'running' states
105105
# See states list here: https://multipass.run/docs/instance-states
106-
if self._want_display(v, 'state', ['Running', 'Starting', 'Restarting']):
106+
if all_tag or self._want_display(v, 'state', ['Running', 'Starting', 'Restarting']):
107107
returned_stats.append(self.generate_stats(k, v))
108108

109109
return version_stats, returned_stats

0 commit comments

Comments
 (0)