From 71dd34a3af56a6db0c779045aa000d28019c4e3e Mon Sep 17 00:00:00 2001 From: David Galloway Date: Tue, 13 Sep 2016 16:15:16 -0400 Subject: [PATCH] Add vmhosts to vmlist.py and run virsh in read-only mode 'virsh -r' allows vmlist.py to work with RHEV hypervisor hosts Signed-off-by: David Galloway --- tools/vmlist.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/vmlist.py b/tools/vmlist.py index bb5da59..bf1d09d 100755 --- a/tools/vmlist.py +++ b/tools/vmlist.py @@ -52,7 +52,9 @@ VM_HOSTS = textwrap.dedent('''\ irvingi05.front.sepia.ceph.com irvingi06.front.sepia.ceph.com irvingi07.front.sepia.ceph.com - irvingi08.front.sepia.ceph.com''') + irvingi08.front.sepia.ceph.com + hv01.front.sepia.ceph.com + hv02.front.sepia.ceph.com''') NOVACLIENT_VERSION = '2' @@ -112,7 +114,7 @@ def list_vms(host, outputfile=None): lxc_output = [line for line in lxc_output if line] virsh_output = subprocess.check_output( - ['ssh', host, 'sudo', 'virsh', 'list', '--all'] + ['ssh', host, 'sudo', 'virsh', '-r', 'list', '--all'] ).strip().split('\n') virsh_output = [line.split()[1] for line in virsh_output[2:] if line] virsh_output = [line for line in virsh_output if line] -- 2.39.5