[Libvirt-cim] [PATCH] [TEST] Use enumclass.py to cover computersystem.py behavior and update CS tests

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Aug 29 16:14:00 UTC 2008


>  class CIM_AllocationCapabilities(CIM_MyClass):
> @@ -357,3 +382,12 @@
>          return None 
>          
>      return inst
> +
> +def get_cs_class(virt):
> +    if virt in virt_types:
> +        return eval(get_typed_class(virt, 'ComputerSystem'))

This function is no longer needed.  The tests can use get_typed_class 
for this.

> +
> +def system_of(server, iname):
> +    t = eval(iname["CreationClassName"])
> +
> +    return t(server, iname["Name"])
> 

Only one test is using this function.  Instead of putting it in a 
library, it can be moved to the specific test case instead.

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list