+1 from me.


libvirt-cim-bounces@redhat.com wrote on 2008-09-23 01:02:30:

> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1222102928 25200
> # Node ID a680024808eb6878d71b90ef5632d28448475e66
> # Parent  16fd8f75598442d71eeb0199fb680ca6564656bc
> [TEST] Add a check to verify virtualization type is valid for system.
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r 16fd8f755984 -r a680024808eb suites/libvirt-cim/main.py
> --- a/suites/libvirt-cim/main.py   Mon Sep 22 09:45:55 2008 -0700
> +++ b/suites/libvirt-cim/main.py   Mon Sep 22 10:02:08 2008 -0700
> @@ -89,7 +89,12 @@
>  
>      print "Cleaned log files."
>  
> -def pre_check(ip):
> +def pre_check(ip, virt):
> +    cmd = "virsh -c %s version " % utils.virt2uri(virt)
> +    ret, out = utils.run_remote(ip, cmd)
> +    if ret != 0:
> +        return "This libvirt install does not support %s"  % virt
> +
>      cmd = "ps -ef | grep -v grep | grep cimserver"
>      rc, out = utils.run_remote(ip, cmd)
>      if rc != 0:
> @@ -168,7 +173,7 @@
>          parser.print_help()
>          return 1
>  
> -    env_ready = pre_check(options.ip)
> +    env_ready = pre_check(options.ip, options.virt)
>      if env_ready != None:
>          print "\n%s.  Please check your environment.\n" % env_ready
>          return 1
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim