Fw: [Fwd: [Libvirt-cim] [PATCH] [TEST] A few migration related fixes]
by Guo Lian Yun
----- Forwarded by Guo Lian Yun/China/IBM on 2008-07-01 10:29 -----
Guo Lian Yun/China/IBM
2008-07-01 10:24
To
Kaitlin Rupert <kaitlin(a)linux.vnet.ibm.com>
cc
Subject
Re: [Fwd: [Libvirt-cim] [PATCH] [TEST] A few migration related fixes]
Kaitlin Rupert <kaitlin(a)linux.vnet.ibm.com> wrote on 2008-07-01 00:05:03:
> Can I get a review of this patch?
>
> Thanks!
> --
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin(a)linux.vnet.ibm.com
>
> ----- Message from Kaitlin Rupert <kaitlin(a)linux.vnet.ibm.com> on
> Wed, 25 Jun 2008 14:18:23 -0700 -----
>
> To:
>
> libvirt-cim(a)redhat.com
>
> Subject:
>
> [Libvirt-cim] [PATCH] [TEST] A few migration related fixes
>
> # HG changeset patch
> # User Kaitlin Rupert <karupert(a)us.ibm.com>
> # Date 1214423985 25200
> # Node ID ef376bdad2e186904b15cda1afd230d8056e8015
> # Parent 5c90c9a2fd567d7cf592932db189afbc8a4756f8
> [TEST] A few migration related fixes.
>
> Fixes:
> -Remove destroy_and_undefine_domain() call from
> migrate_guest_to_host(). This call takes the domain name as a
> parameter, but migrate_guest_to_host() doesn't take the domain name
> So calling destroy_and_undefine_domain() resulted in an error.
> -Add a hack to get_typed_class() so it supports Virt_MigrationJob
> (which doesn't fit the typical <virt>_<basename> pattern.
>
> Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
>
> diff -r 5c90c9a2fd56 -r ef376bdad2e1 suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
> --- a/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
> Thu Jun 19 10:35:59 2008 -0700
> +++ b/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
> Wed Jun 25 12:59:45 2008 -0700
> @@ -90,10 +90,10 @@
> return FAIL
>
> status, ret = migrate_guest_to_host(service, cs_ref, target_ip)
> -
> if status == FAIL:
> logger.error("MigrateVirtualSystemToHost: unexpected list
length %s"
> % len(ret))
> + destroy_and_undefine_domain(dom_name, options.ip)
> return status
> elif len(ret) == 2:
> id = ret[1]['Job'].keybindings['InstanceID']
> @@ -102,7 +102,7 @@
> guest_name, local_migrate)
>
>
> - destroy_and_undefine_domain(dom_name, options.ip)
> + destroy_and_undefine_domain(dom_name, options.ip)
>
> return status
>
Do you think we should also to call destroy_and_undefine_domain() below
based
on your patch?
status, cs_ref = start_guest_get_ref(options.ip, dom_name)
if status != PASS:
+ destroy_and_undefine_domain(dom_name, options.ip)
return FAIL
> diff -r 5c90c9a2fd56 -r ef376bdad2e1 suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
> --- a/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
> Thu Jun 19 10:35:59 2008 -0700
> +++ b/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
> Wed Jun 25 12:59:45 2008 -0700
> @@ -145,12 +145,11 @@
>
> logger.info("Migrating guest with the following options:")
> logger.info("%s" % item)
> - status, ret = migrate_guest_to_host(service, cs_ref, target_ip,
> - item)
> -
> + status, ret = migrate_guest_to_host(service, cs_ref, target_ip,
item)
> if status == FAIL:
> logger.error("MigrateVirtualSystemToHost: unexpected
> list length %s"
> % len(ret))
> + destroy_and_undefine_domain(dom_name, options.ip)
> return status
> elif len(ret) == 2:
> id = ret[1]['Job'].keybindings['InstanceID']
> diff -r 5c90c9a2fd56 -r ef376bdad2e1 suites/libvirt-
> cim/lib/XenKvmLib/classes.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Thu Jun 19 10:
> 35:59 2008 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Jun 25 12:
> 59:45 2008 -0700
> @@ -23,7 +23,8 @@
>
> def get_typed_class(virt, basename):
> if virt not in virt_types:
> - raise ValueError('Invalid class type')
> + if virt != "Virt" and basename != "MigrationJob":
> + raise ValueError('Invalid class type')
>
> if basename == None or basename == '':
> raise ValueError('Invalide class base name')
> diff -r 5c90c9a2fd56 -r ef376bdad2e1 suites/libvirt-
> cim/lib/XenKvmLib/vsmigrations.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Thu Jun 19
> 10:35:59 2008 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Jun 25
> 12:59:45 2008 -0700
> @@ -95,10 +95,10 @@
> except Exception, details:
> logger.error("Error invoke method
'MigrateVirtualSystemToHost\'.")
> logger.error("%s", details)
> + return FAIL, ret
>
> if len(ret) == 0:
> logger.error("MigrateVirtualSystemToHost returns an empty
list")
> - destroy_and_undefine_domain(test_dom, ip)
> return FAIL, ret
>
> return PASS, ret
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim(a)redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
16 years, 2 months
[PATCH] Fix CSI failure path
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1214857687 25200
# Node ID 02aaaea433146ad4f6dc5c63b34701bc46567fb4
# Parent f72441bf10fdd467d3f47d33e4bfb29537cc53e1
Fix CSI failure path
Since connect_by_classname() can return NULL without it being an
error condition, printing the status message is not valid unless you
check the s.rc field. I don't think the message adds much here, since there
is only one place that the message is filled out, and it's a static string.
Instead, change the debug message to something useful to avoid the SEGV.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r f72441bf10fd -r 02aaaea43314 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c Mon Jun 30 13:12:21 2008 -0700
+++ b/src/Virt_ComputerSystemIndication.c Mon Jun 30 13:28:07 2008 -0700
@@ -339,7 +339,8 @@
conn = connect_by_classname(_BROKER, args->classname, &s);
if (conn == NULL) {
- CU_DEBUG("Failed to connect: %s", CMGetCharPtr(s.msg));
+ CU_DEBUG("Unable to start lifecycle thread: "
+ "Failed to connect (cn: %s)", args->classname);
goto out;
}
16 years, 2 months
[PATCH] Remove explicit "Xen" from VSMS indication trigger
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1214856741 25200
# Node ID f72441bf10fdd467d3f47d33e4bfb29537cc53e1
# Parent 834563d8520b1876d99bf579cc3319b1dfa09795
Remove explicit "Xen" from VSMS indication trigger
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 834563d8520b -r f72441bf10fd src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Mon Jun 30 12:02:43 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Mon Jun 30 13:12:21 2008 -0700
@@ -774,14 +774,14 @@
static bool trigger_indication(const CMPIContext *context,
const char *base_type,
- const char *ns)
+ const CMPIObjectPath *ref)
{
char *type;
CMPIStatus s;
- type = get_typed_class("Xen", base_type);
+ type = get_typed_class(CLASSNAME(ref), base_type);
- s = stdi_trigger_indication(_BROKER, context, type, ns);
+ s = stdi_trigger_indication(_BROKER, context, type, NAMESPACE(ref));
free(type);
@@ -814,7 +814,7 @@
trigger_indication(context,
"ComputerSystemCreatedIndication",
- NAMESPACE(reference));
+ reference);
out:
return s;
}
@@ -862,7 +862,7 @@
rc = IM_RC_OK;
trigger_indication(context,
"ComputerSystemDeletedIndication",
- NAMESPACE(reference));
+ reference);
}
error:
@@ -936,7 +936,7 @@
if (s.rc == CMPI_RC_OK) {
trigger_indication(context,
"ComputerSystemModifiedIndication",
- NAMESPACE(ref));
+ ref);
}
out:
16 years, 2 months
[PATCH 0 of 3] Indications for state changes
by Dan Smith
This set:
- Makes domain state an explicit factor in the dom_changed() determination
for CSI
- Makes CS trigger CSI on state change to avoid waiting for the loop
- Fixes up registration of KVM_ and LXC_ CSI variants
16 years, 2 months
[PATCH] [TEST] Fixing the ComputerSystem tc's
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1214830309 25200
# Node ID 197ecb3db922d841a2cdfbcdec5a4bf149dddc83
# Parent 0c3bd5f782c4776719799ad5c74226c95e70092e
[TEST] Fixing the ComputerSystem tc's.
Updated the tc to report XFAIL since the tc are failing as the requested_state property is not being set appropriately.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Jun 30 05:51:49 2008 -0700
@@ -52,7 +52,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
SUSPND_STATE = 9
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +62,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -106,8 +109,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jun 30 05:51:49 2008 -0700
@@ -51,7 +51,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
REBOOT_STATE = 10
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -60,13 +61,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -105,8 +108,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Jun 30 05:51:49 2008 -0700
@@ -54,7 +54,8 @@ SUSPND_STATE = 9
SUSPND_STATE = 9
REBOOT_STATE = 10
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -63,13 +64,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -109,8 +112,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Jun 30 05:51:49 2008 -0700
@@ -52,7 +52,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
RESET_STATE = 11
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +62,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -106,8 +109,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
16 years, 2 months
[PATCH] [TEST] #2 Fixing the ComputerSystem tc's
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1214892426 25200
# Node ID cc7716fa4252235924577a0e9bb16c89fc55870b
# Parent 0c3bd5f782c4776719799ad5c74226c95e70092e
[TEST] #2 Fixing the ComputerSystem tc's.
Changes:
-------
Patch 2:
-------
1) Removed the bug no 00001.
2) Removed the XFAIL_RC associated with bug 00001.
Patch 1:
--------
Updated the tc to report XFAIL since the tc are failing as the requested_state property is not being set appropriately.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 0c3bd5f782c4 -r cc7716fa4252 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Jun 30 23:07:06 2008 -0700
@@ -52,7 +52,7 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
SUSPND_STATE = 9
-bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +61,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -97,7 +99,6 @@ def main():
if status != PASS:
logger.error("Unable to %s dom %s using \
RequestedStateChange()", action, default_dom)
- status = XFAIL_RC(bug)
break
# FIX ME
@@ -106,8 +107,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r cc7716fa4252 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jun 30 23:07:06 2008 -0700
@@ -51,7 +51,7 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
REBOOT_STATE = 10
-bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -60,13 +60,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -96,7 +98,6 @@ def main():
if status != PASS:
logger.error("Unable to %s dom %s using \
RequestedStateChange()", action, default_dom)
- status = XFAIL_RC(bug)
break
# FIX ME
@@ -105,8 +106,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r cc7716fa4252 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Jun 30 23:07:06 2008 -0700
@@ -54,7 +54,7 @@ SUSPND_STATE = 9
SUSPND_STATE = 9
REBOOT_STATE = 10
-bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -63,13 +63,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -100,7 +102,6 @@ def main():
if status != PASS:
logger.error("Unable to %s dom %s using \
RequestedStateChange()", action, default_dom)
- status = XFAIL_RC(bug)
break
# FIX ME
@@ -109,8 +110,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r cc7716fa4252 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Jun 30 23:07:06 2008 -0700
@@ -52,7 +52,7 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
RESET_STATE = 11
-bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +61,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -97,7 +99,6 @@ def main():
if status != PASS:
logger.error("Unable to %s dom %s using \
RequestedStateChange()", action, default_dom)
- status = XFAIL_RC(bug)
break
# FIX ME
@@ -106,8 +107,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
16 years, 2 months
[PATCH] [TEST] Fix HostSystem - 04_hs_to_EAPF.py to verify proper mem val
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)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(a)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
16 years, 2 months