
create_diskpool_file
-sup_types = ['Xen'] +sup_types = ['Xen', 'KVM', 'XenFV']
Need to add LXC to the list.
+def eapf_list(server, virt="Xen"): + disk_inst = get_typed_class(virt, "LogicalDisk") + proc_inst = get_typed_class(virt, "Processor") + net_inst = get_typed_class(virt, "NetworkPort") + mem_inst = get_typed_class(virt, "Memory") + disk = { 'SystemName' : test_dom, - 'CreationClassName' : "Xen_LogicalDisk", - 'DeviceID' : "%s/%s" % (test_dom,test_disk), + 'CreationClassName' : disk_inst, + 'DeviceID' : "%s/%s" % (test_dom, test_disk), 'Name' : test_disk } proc = { 'SystemName' : test_dom, - 'CreationClassName' : "Xen_Processor", + 'CreationClassName' : proc_inst, 'DeviceID' : "%s/%s" % (test_dom,0) } net = { 'SystemName' : test_dom, - 'CreationClassName' : "Xen_NetworkPort", + 'CreationClassName' : net_inst, 'DeviceID' : "%s/%s" % (test_dom, test_mac), 'NetworkAddresses' : test_mac } mem = { 'SystemName' : test_dom, - 'CreationClassName' : "Xen_Memory", + 'CreationClassName' : mem_inst, 'DeviceID' : "%s/%s" % (test_dom, "mem"), 'NumberOfBlocks' : test_mem * 1024 } - eaf_values = { "Xen_Processor" : proc, - "Xen_LogicalDisk" : disk, - "Xen_NetworkPort" : net, - "Xen_Memory" : mem + eaf_values = { proc_inst : proc, + disk_inst : disk, + net_inst : net, + mem_inst : mem }
You'll need to make this part LXC specific. You'll need to change the "exp_len = 4" value accordingly (in the main function, before check_len() is called.
return eaf_values
@@ -152,13 +133,14 @@ def get_inst_for_dom(assoc_val):
+ destroy_and_undefine_all(server) + virt_type = get_class(virt) + if virt == 'LXC': + vsxml = virt_type(test_dom) + else: + vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac, + disk = test_disk) + + ret = vsxml.define(server) + if not ret: + logger.error("Failed to Create the dom: '%s'", test_dom) + return FAIL
# Verify DiskPool on machine status = create_diskpool_file() if status != PASS: return status -
You'll need to define a network pool as well. Otherwise, the test will fail if a network pool isn't present on the host: HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - KVM_HostedResourcePool returned 3 Device Pool objects -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com