# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1228940678 28800
# Node ID 8a712008c399ece75ea266ac0d1db0757f77acea
# Parent 6060405e9a9c8d9fd3917d8277899d43b962bd11
[TEST] Move CIM_Instance definition to enumclass.py
There's no need for enumclass.py to import CIM_Instance from devices.py since
it's not being used in devices.py
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 6060405e9a9c -r 8a712008c399
suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Tue Dec 09 18:44:58
2008 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Wed Dec 10 12:24:38
2008 -0800
@@ -43,7 +43,7 @@
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, \
CIM_ERROR_GETINSTANCE
from XenKvmLib.const import do_main
-from XenKvmLib.devices import CIM_Instance
+from XenKvmLib.enumclass import CIM_Instance
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'KVM', 'XenFV']
diff -r 6060405e9a9c -r 8a712008c399 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Dec 09 18:44:58 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Dec 10 12:24:38 2008 -0800
@@ -31,7 +31,6 @@
from CimTest import Globals
from XenKvmLib import enumclass
from pywbem.cim_obj import CIMInstanceName
-from XenKvmLib.devices import CIM_Instance
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \
CIM_ERROR_GETINSTANCE
diff -r 6060405e9a9c -r 8a712008c399 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Tue Dec 09 18:44:58 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Dec 10 12:24:38 2008 -0800
@@ -25,12 +25,21 @@
#
import pywbem
from pywbem.cim_obj import CIMInstanceName
-from XenKvmLib.devices import CIM_Instance
from XenKvmLib.classes import get_typed_class
from CimTest import Globals, CimExt
from VirtLib import utils
from CimTest.Globals import logger
+class CIM_Instance:
+ def __init__(self, inst):
+ self.inst = inst
+
+
+ def __getattr__(self, attr):
+ return self.inst[attr]
+
+ def __str__(self):
+ print self.inst.items()
class CIM_CimtestClass(CIM_Instance):
def __init__(self, host, ref):
diff -r 6060405e9a9c -r 8a712008c399 suites/libvirt-cim/lib/XenKvmLib/rpcs.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rpcs.py Tue Dec 09 18:44:58 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/rpcs.py Wed Dec 10 12:24:38 2008 -0800
@@ -20,7 +20,7 @@
#
import pywbem
from pywbem.cim_obj import CIMInstanceName
-from XenKvmLib.devices import CIM_Instance
+from XenKvmLib.enumclass import CIM_Instance
from CimTest import Globals
class CIM_MyClass(CIM_Instance):