-
-def init_list():
+status = PASS
No need to define status here - define it as needed in main().
+
+def init_list(virt='Xen'):
+
+ if virt == 'Xen' or virt == 'XenFV':
+ test_disk = 'xvda'
+ test_mac = "00:11:22:33:44:aa"
+ else:
+ test_disk = 'hda'
+ test_mac = '11:22:33:aa:bb:cc'
Are different values for test_mac needed? It seems like you can use the
same value for all virtualization types.
You could then define test_mac in main() and pass test_mac as a
parameter into this function. I'd do the same with test_disk. Define
it in main() and pass it into this function.
This helps reduce the number of values the function returns.
key_list = { 'InstanceID' : instIdval }
+ vssd_cn = get_typed_class(options.virt, 'VirtualSystemSettingData')
try:
vssd = enumclass.getInstance(options.ip, \
- enumclass.Xen_VirtualSystemSettingData, \
- key_list)
+ 'VirtualSystemSettingData', \
+ key_list, \
+ options.virt)
if vssd is None:
logger.error("VSSD instance for %s not found" % test_dom)
- test_domain_function(test_dom, options.ip, "undefine")
+ cxml.undefine(options.ip)
return FAIL
vssd_vals = build_vssd_info(options.ip, vssd)
I'd remove this function all together. In assoc_values(), you can call
compare_all_prop(). See the ESD patch I recently sent. This patch
isn't in the tree yet, but should be soon.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com