[PATCH] [TEST] Fixing reporting.py to work for SLES

# HG changeset patch # User Deepti B.Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1246528835 25200 # Node ID 75e1ba2b6c209dc1610f05c647df00232fd123a5 # Parent 479f287a17fd08e4e22ac37459393f6f8327315a [TEST] Fixing reporting.py to work for SLES Tested with KVM and current sources on SLES11. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r 479f287a17fd -r 75e1ba2b6c20 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Tue Jun 30 06:53:22 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Jul 02 03:00:35 2009 -0700 @@ -87,7 +87,10 @@ def get_env_data(ip, virt): - distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) + distro = get_cmd_val("cat /etc/issue | sed '/^$/d' | awk 'NR<=1'", ip) + if 'SUSE' in distro: + distro = (distro.split('-'))[0].split('to')[1] + kernel_ver = get_cmd_val("uname -r", ip) libvirt_ver, hyp_ver = get_libvirt_ver(ip)
participants (1)
-
Deepti B. Kalakeri