# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1222152882 25200
# Node ID 529b767f1bb57a6e8079623168bf01bb7a5182e1
# Parent 3afab9812f48fd6ebbd123c9f678b0200895a540
[TEST] Define Linux_ComputerSystem class in enumclass
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3afab9812f48 -r 529b767f1bb5 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Sep 22 03:47:59 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Sep 22 23:54:42 2008 -0700
@@ -63,6 +63,23 @@ class CIM_MyClass(CIM_Instance):
return self.inst[attr]
else:
return CimExt._Method(self.__invoke, attr)
+
+class Linux_ComputerSystem(CIM_Instance):
+ def __init__(self, server, keys):
+ conn = pywbem.WBEMConnection('http://%s' % server,
+ (Globals.CIM_USER, Globals.CIM_PASS),
+ Globals.CIM_NS)
+
+ try:
+ classname = self.__class__.__name__
+ ref = CIMInstanceName(classname,
+ keybindings=keys)
+ inst = conn.GetInstance(ref)
+ except pywbem.CIMError, arg:
+ raise arg
+
+ CIM_Instance.__init__(self, inst)
+
class CIM_ComputerSystem(CIM_MyClass):
pass