+1 from me =).
libvirt-cim-bounces@redhat.com wrote on 2008-07-01
00:59:06:
> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1214845116 25200
> # Node ID 692121d37b3aefafce0d6856d81468add629514d
> # Parent 450c5a235e0c95d7be7ef4a967fcb30d2f2abb9c
> [TEST] Fix HostSystem - 04_hs_to_EAPF.py to verify proper mem val
>
> The memory value used for NumberOfBlocks needs to be multiplied by
> 1024, since the memory value supplied when the guest is created is
> multiplied by 1024.
>
> Also removed an extraneous print statement. Removed some functions
> that were no longer being used. Also fixed some line length
issues.
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r 450c5a235e0c -r 692121d37b3a suites/libvirt-
> cim/cimtest/HostSystem/04_hs_to_EAPF.py
> --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
Mon
> Jun 30 09:27:42 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
Mon
> Jun 30 09:58:36 2008 -0700
> @@ -76,8 +76,9 @@
>
> def setup_env(server):
> destroy_and_undefine_all(server)
> - test_xml, bridge = testxml_bridge(test_dom, mem = test_mem,
> vcpus = test_vcpus, \
> -
mac = test_mac, disk =
> test_disk, server = server)
> + test_xml, bridge = testxml_bridge(test_dom, mem = test_mem,
> +
vcpus = test_vcpus,
mac = test_mac,
> +
disk = test_disk,
server = server)
> if bridge == None:
> logger.error("Unable to find
virtual bridge")
> return SKIP
> @@ -100,14 +101,6 @@
> def print_err(err, detail, cn):
> logger.error(err % cn)
> logger.error("Exception: %s", detail)
> -
> -def field_err(assoc_info, field_list, fieldname):
> - logger.error("%s Mismatch", fieldname)
> - logger.error("Returned %s instead of %s",
> assoc_info[fieldname], field_list[fieldname])
> -
> -def spec_err(fieldvalue, field_list, fieldname):
> - logger.error("%s Mismatch", fieldname)
> - logger.error("Returned %s instead of %s",
fieldvalue,
> field_list[fieldname])
>
> def pool_init_list(pool_assoc):
> """
> @@ -142,14 +135,13 @@
> 'SystemName'
: test_dom,
> 'CreationClassName'
: "Xen_Memory",
> 'DeviceID'
: "%s/%s" % (test_dom, "mem"),
> - 'NumberOfBlocks'
: test_mem
> + 'NumberOfBlocks'
: test_mem * 1024
> }
> eaf_values = { "Xen_Processor"
: proc,
>
"Xen_LogicalDisk" : disk,
>
"Xen_NetworkPort" : net,
>
"Xen_Memory" : mem
> }
> - print eaf_values
> return eaf_values
>
> def get_inst_for_dom(assoc_val):
> @@ -171,7 +163,8 @@
>
CreationClassName=cn,
>
Name = hostname)
> if len(assoc_info) < 1:
> - logger.error("%s returned
%i %s objects" % (an,
> len(assoc_info), qcn))
> + logger.error("%s returned
%i %s objects" % (an,
> +
len(assoc_info), qcn))
> status = FAIL
>
> except Exception, detail:
> @@ -186,7 +179,8 @@
>
> def check_len(an, assoc_list_info, qcn, exp_len):
> if len(assoc_list_info) != exp_len:
> - logger.error("%s returned %i %s
objects" % (an,
> len(assoc_list_info), qcn))
> + logger.error("%s returned %i %s
objects" % (an,
> +
len(assoc_list_info), qcn))
> return FAIL
> return PASS
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim