[Libvirt-cim] [PATCH 1 of 5] [TEST] devices lib changes for XenFV and KVM support

Zhengang Li zli at linux.vnet.ibm.com
Tue Apr 1 01:36:50 UTC 2008


Guo Lian Yun wrote:

> @@ -93,13 +93,13 @@ class KVM_Processor(CIM_Processor):
>  class KVM_Processor(CIM_Processor):
>      pass
> 
> -def enumerate(server, devtype, keys):
> +def enumerate(server, devtype, keys, virt='Xen'):
>      conn = pywbem.WBEMConnection('http://%s' % server,
>                                   (Globals.CIM_USER, Globals.CIM_PASS),
>                                   Globals.CIM_NS)
> 
>      list = []
> -
> +    devtype = eval(get_typed_class(virt, devtype))
I updated this function in another patch.
We need to have an agreement on what devtype contains. It was a class 
object inside devices. I turned it to a string representation of the 
class. And here it's likely to be the basename of the class name string 
(excluding the 'Xen_'/'KVM_' prefix).


>      try:
>          names = conn.EnumerateInstanceNames(devtype.__name__)
>      except pywbem.CIMError, arg:
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
> 


-- 
- Zhengang




More information about the Libvirt-cim mailing list