
DK> +def setup_env(): DK> + vsxml_info = None DK> + vsxml_info = get_class(virt)(test_dom, mem=test_mem, vcpus = test_vcpus, As discussed with Zhen Gang and Daisy's patches, please store the class in a temporary variable for clarity. DK> +def init_list(virt): DK> + """ DK> + Creating the lists that will be used for comparisons. DK> + """ DK> + procrasd = { DK> + "InstanceID" : '%s/%s' %(test_dom,0),\ DK> + "ResourceType" : 3,\ DK> + "CreationClassName": get_typed_class(virt, 'ProcResourceAllocationSettingData') DK> + } DK> + DK> + netrasd = { DK> + "InstanceID" : '%s/%s' %(test_dom,test_mac), \ DK> + "ResourceType" : 10 , \ DK> + "ntype1": "bridge", \ DK> + "ntype2": "ethernet", \ DK> + "CreationClassName": get_typed_class(virt, 'NetResourceAllocationSettingData') DK> + } DK> + DK> + address = vsxml.xml_get_disk_source() DK> + diskrasd = { DK> + "InstanceID" : '%s/%s' %(test_dom, test_disk), \ DK> + "ResourceType" : 17, \ DK> + "Address" : address, \ DK> + "CreationClassName": get_typed_class(virt, 'DiskResourceAllocationSettingData') DK> + } DK> + memrasd = { DK> + "InstanceID" : '%s/%s' %(test_dom, "mem"), \ DK> + "ResourceType" : 4, \ DK> + "AllocationUnits" : "MegaBytes",\ DK> + "VirtualQuantity" : (test_mem * 1024), \ DK> + "CreationClassName": get_typed_class(virt, 'MemResourceAllocationSettingData') DK> + } DK> + return procrasd, netrasd, diskrasd, memrasd You don't need the '\' characters at the ends of those lines. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com