# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1219102467 25200
# Node ID 38154e9f4053f0264293470b3346c52301bfed40
# Parent 0ffa5529fe3bc599cba875ac3927efe9e56b8626
[TEST] Add support for passed in parameters and RefConf to cim_define()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 0ffa5529fe3b -r 38154e9f4053 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 14:08:49 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 16:34:27 2008 -0700
@@ -513,15 +513,23 @@
mallocunits=mem_allocunits,
name=dom_name)
- def cim_define(self, ip):
+ def cim_define(self, ip, params=None, ref_conf=None):
service = vsms.get_vsms_class(self.virt)(ip)
- sys_settings = str(self.vssd)
- res_settings = [str(self.dasd), str(self.nasd),
- str(self.pasd), str(self.masd)]
+ if params is None:
+ sys_settings = str(self.vssd)
+ res_settings = [str(self.dasd), str(self.nasd),
+ str(self.pasd), str(self.masd)]
+ else:
+ sys_settings = params['vssd']
+ res_settings = params['rasds']
+
+ if ref_conf is None:
+ ref_conf = ' '
+
try:
service.DefineSystem(SystemSettings=sys_settings,
ResourceSettings=res_settings,
- ReferenceConfiguration=' ')
+ ReferenceConfiguration=ref_conf)
except pywbem.CIMError, (rc, desc):
logger.error('Got CIM error %s with return code %s' % (desc, rc))
return False