소스 검색

qvm-ls: don't exclude dom0 when using --all

Fixes QubesOS/qubes-issues#5248.
Pawel Marczewski 4 년 전
부모
커밋
b112ef250d
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      qubesadmin/tools/qvm_ls.py

+ 8 - 0
qubesadmin/tools/qvm_ls.py

@@ -690,6 +690,14 @@ def main(args=None, app=None):
     else:
         domains = args.app.domains
 
+    if args.all_domains:
+        # Normally, --all means "all domains except for AdminVM".
+        # However, in the case of qvm-ls it does not make sense to exclude
+        # AdminVMs, so we override the list from parser.
+        domains = [
+            vm for vm in args.app.domains if vm.name not in args.exclude
+        ]
+
     if args.tags:
         # filter only VMs having at least one of the specified tags
         domains = [dom for dom in domains