# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259878320 28800
# Node ID e9de3634a25633777e40bd80cc400a07ed42c6e1
# Parent 60eb89c3ac9db80ef89401c48a9711e59f12b4bc
[TEST] Clean up CS 01 - import necessary items from Globals
No need to import Globals directly. Also, clean up formatting of error
messages.
diff -r 60eb89c3ac9d -r d3e61b6dde50 suites/libvirt-cim/cimtest/ComputerSystem/0
1_enum.py
diff -r 60eb89c3ac9d -r e9de3634a256 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Tue Dec 01 15:08:50 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Dec 03 14:12:00 2009 -0800
@@ -28,7 +28,7 @@
from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib.classes import get_typed_class
from VirtLib import utils
-from CimTest import Globals
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
from CimTest.ReturnCodes import PASS, FAIL
SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -48,20 +48,20 @@
idx = live_cs.index(name)
del live_cs[idx]
except ValueError, detail:
- Globals.logger.error("Provider reports system `%s', \
-but virsh does not", name)
+ logger.error("Provider reports system `%s', but virsh does
not",
+ name)
status = FAIL
for system in live_cs:
- Globals.logger.error("Provider does not report system `%s', \
-but virsh does", system)
+ logger.error("Provider does not report system `%s', but virsh
does",
+ system)
status = FAIL
except IndexError, detail:
- Globals.logger.error("Exception: %s", detail)
+ logger.error("Exception: %s", detail)
except Exception, detail:
- Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, 'ComputerSystem')
- Globals.logger.error("Exception: %s", detail)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, 'ComputerSystem')
+ logger.error("Exception: %s", detail)
return status