[PATCH] [TEST] Update Profile.01 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212140258 -28800
# Node ID 9e2b90555485a540ddc87c1d220a2abcd549bd32
# Parent 3ac66cf562f082546883c1de0d748471b557cd39
[TEST] Update Profile.01 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3ac66cf562f0 -r 9e2b90555485 suites/libvirt-cim/cimtest/Profile/01_enum.py
--- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri May 30 17:37:38 2008 +0800
@@ -33,7 +33,7 @@
from CimTest.Globals import do_main, logger
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM']
+sup_types = ['Xen', 'KVM', 'LXC']
@do_main(sup_types)
def main():
diff -r 3ac66cf562f0 -r 9e2b90555485 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 30 17:37:38 2008 +0800
@@ -99,6 +99,9 @@
pass
class KVM_RegisteredProfile(CIM_RegisteredProfile):
+ pass
+
+class LXC_RegisteredProfile(CIM_RegisteredProfile):
pass
class Xen_VirtualSystemSettingData(CIM_MyClass):
16 years, 5 months
[PATCH] [TEST] Update ElementSettingData.01 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212139075 -28800
# Node ID c8021d56cff8acb3a3084741234f2b7317c98a27
# Parent 3ac66cf562f082546883c1de0d748471b557cd39
[TEST] Update ElementSettingData.01 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3ac66cf562f0 -r c8021d56cff8 suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri May 30 17:17:55 2008 +0800
@@ -55,7 +55,7 @@
from CimTest import Globals
from CimTest.Globals import do_main
-sup_types = ['Xen', 'KVM']
+sup_types = ['Xen', 'KVM', 'LXC']
esd_cn = 'ElementSettingData'
vssd_cn = 'VirtualSystemSettingData'
vssdc_cn = 'VirtualSystemSettingDataComponent'
diff -r 3ac66cf562f0 -r c8021d56cff8 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 30 17:17:55 2008 +0800
@@ -105,6 +105,9 @@
pass
class KVM_VirtualSystemSettingData(CIM_MyClass):
+ pass
+
+class LXC_VirtualSystemSettingData(CIM_MyClass):
pass
class Xen_LogicalDisk(CIM_LogicalDevice):
16 years, 5 months
[PATCH] [TEST] #2 LXC support for ComputerSystem.01, 02, 05 & 22
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1212128798 -28800
# Node ID 5c77329cb53e6340cd6ddbf9c044462fb994eb88
# Parent 3ac66cf562f082546883c1de0d748471b557cd39
[TEST] #2 LXC support for ComputerSystem.01, 02, 05 & 22
Updates: removing test cases that depends on DefineSystem().
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 3ac66cf562f0 -r 5c77329cb53e suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri May 30 14:26:38 2008 +0800
@@ -30,7 +30,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
-SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV']
+SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(SUPPORTED_TYPES)
def main():
diff -r 3ac66cf562f0 -r 5c77329cb53e suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri May 30 14:26:38 2008 +0800
@@ -31,7 +31,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
def clean_system(host, virt):
l = live.domain_list(host, virt)
diff -r 3ac66cf562f0 -r 5c77329cb53e suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri May 30 14:26:38 2008 +0800
@@ -50,7 +50,7 @@
from XenKvmLib.common_util import call_request_state_change
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "DomST1"
mem = 128 # MB
bug_no = "00002"
diff -r 3ac66cf562f0 -r 5c77329cb53e suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri May 30 14:26:38 2008 +0800
@@ -37,7 +37,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domgst"
@do_main(sup_types)
16 years, 5 months
[PATCH] [TEST] Update HostedResourcePool.01~04 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212125627 -28800
# Node ID f03185d9684f996141b3e151a22a2207dc88251d
# Parent 3ac66cf562f082546883c1de0d748471b557cd39
[TEST] Update HostedResourcePool.01~04 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3ac66cf562f0 -r f03185d9684f suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri May 30 13:33:47 2008 +0800
@@ -29,10 +29,11 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import do_main
from XenKvmLib.classes import get_typed_class
-@do_main(platform_sup)
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+@do_main(sup_types)
def main():
options = main.options
status = FAIL
diff -r 3ac66cf562f0 -r f03185d9684f suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri May 30 13:33:47 2008 +0800
@@ -28,10 +28,11 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import do_main
from XenKvmLib.classes import get_typed_class
-@do_main(platform_sup)
+sup_types=['Xen', 'KVM', 'XenFV', 'LXC']
+@do_main(sup_types)
def main():
options = main.options
status = PASS
diff -r 3ac66cf562f0 -r f03185d9684f suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri May 30 13:33:47 2008 +0800
@@ -29,14 +29,15 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import do_main
from XenKvmLib.classes import get_typed_class
expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \
"desc" : "No such instance"
}
-@do_main(platform_sup)
+sup_types=['Xen', 'KVM', 'XenFV', 'LXC']
+@do_main(sup_types)
def main():
options = main.options
status = PASS
diff -r 3ac66cf562f0 -r f03185d9684f suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri May 30 13:33:47 2008 +0800
@@ -28,9 +28,10 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS
-from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import do_main
from XenKvmLib.classes import get_typed_class
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
expr_values = {
"Invalid_InstanceID_KeyName" : {
"rc" : pywbem.CIM_ERR_FAILED, \
@@ -42,7 +43,7 @@
}
}
-@do_main(platform_sup)
+@do_main(sup_types)
def main():
options = main.options
status = PASS
16 years, 5 months
[PATCH] [TEST] Update HostedDependency tc for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212117460 -28800
# Node ID 729be78aaf6da7cfab0275c5eb4d3981d2e5ea57
# Parent 3ac66cf562f082546883c1de0d748471b557cd39
[TEST] Update HostedDependency tc for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3ac66cf562f0 -r 729be78aaf6d suites/libvirt-cim/cimtest/HostedDependency/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri May 30 11:17:40 2008 +0800
@@ -55,7 +55,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM']
+sup_types = ['Xen', 'KVM', 'LXC']
test_dom = "hd_domain"
test_mac = "00:11:22:33:44:55"
@@ -66,7 +66,10 @@
status = PASS
virtxml = vxml.get_class(options.virt)
- cxml = virtxml(test_dom, mac = test_mac)
+ if options.virt == "LXC":
+ cxml = virtxml(test_dom)
+ else:
+ cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.define(options.ip)
if not ret:
Globals.logger.error("Failed to Create the dom: %s", test_dom)
diff -r 3ac66cf562f0 -r 729be78aaf6d suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri May 30 11:17:40 2008 +0800
@@ -50,7 +50,7 @@
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM']
+sup_types = ['Xen', 'KVM', 'LXC']
test_dom = "hd_domain"
test_mac = "00:11:22:33:44:55"
@@ -61,7 +61,10 @@
status = PASS
virtxml = vxml.get_class(options.virt)
- cxml = virtxml(test_dom, mac = test_mac)
+ if options.virt == "LXC":
+ cxml = virtxml(test_dom)
+ else:
+ cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.create(options.ip)
if not ret:
diff -r 3ac66cf562f0 -r 729be78aaf6d suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri May 30 11:17:40 2008 +0800
@@ -38,7 +38,7 @@
from XenKvmLib.common_util import get_host_info, try_assoc
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-sup_types = ['Xen', 'KVM']
+sup_types = ['Xen', 'KVM', 'LXC']
test_dom = "hd_domain1"
test_mac = "00:11:22:33:44:55"
@@ -109,7 +109,10 @@
status = PASS
server = options.ip
virtxml = vxml.get_class(options.virt)
- cxml = virtxml(test_dom, mac = test_mac)
+ if options.virt == "LXC":
+ cxml = virtxml(test_dom)
+ else:
+ cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.create(options.ip)
if not ret:
16 years, 5 months
[PATCH] [TEST] Update ElementConforms.01~04 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1211896263 -28800
# Node ID 05a50a59c4e926933fd6ae3b190b8a36d13e5672
# Parent 3233a070377270931b4cc1d790b6782fee17d1b6
[TEST] Update ElementConforms.01~04 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3233a0703772 -r 05a50a59c4e9 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue May 27 21:51:03 2008 +0800
@@ -42,7 +42,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "domU"
def verify_cs(item, id):
diff -r 3233a0703772 -r 05a50a59c4e9 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Tue May 27 21:51:03 2008 +0800
@@ -53,7 +53,7 @@
from XenKvmLib.classes import get_typed_class
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "domgst"
diff -r 3233a0703772 -r 05a50a59c4e9 suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Tue May 27 21:51:03 2008 +0800
@@ -60,7 +60,7 @@
from CimTest import Globals
from CimTest.Globals import logger, CIM_USER, CIM_PASS, do_main
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
bug = '92642'
diff -r 3233a0703772 -r 05a50a59c4e9 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue May 27 21:51:03 2008 +0800
@@ -89,7 +89,7 @@
from CimTest.ReturnCodes import PASS, FAIL
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
bug = '92642'
test_dom = "domU"
diff -r 3233a0703772 -r 05a50a59c4e9 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Tue May 27 21:51:03 2008 +0800
@@ -99,6 +99,9 @@
pass
class KVM_RegisteredProfile(CIM_RegisteredProfile):
+ pass
+
+class LXC_RegisteredProfile(CIM_RegisteredProfile):
pass
class Xen_VirtualSystemSettingData(CIM_MyClass):
16 years, 5 months
[PATCH] Add polling for domain undefine in VSMigrationService
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1212097721 25200
# Node ID 8c3b74f06d88a4a8b6aa7451e65b82e2f3c502a5
# Parent 05a5ba2fda5d03facdea4e0cdfdc26d4a47d80fd
Add polling for domain undefine in VSMigrationService.
Use the same timeout duration used for the domain shutdown. This should be more than enough time for the guest to complete migration.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 05a5ba2fda5d -r 8c3b74f06d88 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed May 28 14:04:50 2008 -0700
+++ b/src/Virt_VSMigrationService.c Thu May 29 14:48:41 2008 -0700
@@ -977,8 +977,34 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
virDomainPtr newdom = NULL;
+ virDomainPtr dom;
+ int i;
+ int ret;
- if (virDomainUndefine(ldom) == -1) {
+ for (i = 0; i < MIGRATE_SHUTDOWN_TIMEOUT; i++) {
+ if ((i % 30) == 0) {
+ CU_DEBUG("Polling to undefine guest %s...",
+ virDomainGetName(ldom));
+ }
+
+ dom = virDomainLookupByName(virDomainGetConnect(ldom),
+ virDomainGetName(ldom));
+ if (dom == NULL) {
+ CU_DEBUG("Unable to re-lookup domain");
+ ret = -1;
+ break;
+ }
+
+ ret = virDomainUndefine(dom);
+ virDomainFree(dom);
+
+ if (ret == 0)
+ break;
+
+ sleep(1);
+ }
+
+ if (ret != 0) {
CU_DEBUG("Undefine of local domain failed");
}
16 years, 5 months
[PATCH] Make VCPU RASD Add/Remove fail and Modify behave correctly
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1212078794 25200
# Node ID 3f3dd6c106e07bc3c1dfc9a53947180ab893e44d
# Parent 05a5ba2fda5d03facdea4e0cdfdc26d4a47d80fd
Make VCPU RASD Add/Remove fail and Modify behave correctly
With the recent VCPU changes, this needs to be in place for VSMS to function
properly.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 05a5ba2fda5d -r 3f3dd6c106e0 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Wed May 28 14:04:50 2008 -0700
+++ b/libxkutil/device_parsing.c Thu May 29 09:33:14 2008 -0700
@@ -1002,29 +1002,26 @@
return 1;
}
-static int change_vcpus(virDomainPtr dom, int delta)
+static int change_vcpus(virDomainPtr dom, struct virt_device *dev)
{
int ret;
- virDomainInfo info;
- ret = virDomainGetInfo(dom, &info);
- if (ret == -1) {
- CU_DEBUG("Failed to get domain info for %s",
- virDomainGetName(dom));
+ if (dev->dev.vcpu.quantity <= 0) {
+ CU_DEBUG("Unable to set VCPU count to %i",
+ dev->dev.vcpu.quantity);
return 0;
}
- ret = virDomainSetVcpus(dom, info.nrVirtCpu + delta);
+ ret = virDomainSetVcpus(dom, dev->dev.vcpu.quantity);
if (ret == -1) {
CU_DEBUG("Failed to set domain vcpus to %i",
- info.nrVirtCpu + delta);
+ dev->dev.vcpu.quantity);
return 0;
}
- CU_DEBUG("Changed %s vcpus from %i to %i",
+ CU_DEBUG("Changed %s vcpus to %i",
virDomainGetName(dom),
- info.nrVirtCpu,
- info.nrVirtCpu + delta);
+ dev->dev.vcpu.quantity);
return 1;
}
@@ -1034,8 +1031,6 @@
if ((dev->type == CIM_RES_TYPE_NET) ||
(dev->type == CIM_RES_TYPE_DISK))
return _change_device(dom, dev, true);
- else if (dev->type == CIM_RES_TYPE_PROC)
- return change_vcpus(dom, 1);
CU_DEBUG("Unhandled device type %i", dev->type);
@@ -1047,8 +1042,6 @@
if ((dev->type == CIM_RES_TYPE_NET) ||
(dev->type == CIM_RES_TYPE_DISK))
return _change_device(dom, dev, false);
- else if (dev->type == CIM_RES_TYPE_PROC)
- return change_vcpus(dom, -1);
CU_DEBUG("Unhandled device type %i", dev->type);
@@ -1059,6 +1052,8 @@
{
if (dev->type == CIM_RES_TYPE_MEM)
return change_memory(dom, dev);
+ else if (dev->type == CIM_RES_TYPE_PROC)
+ return change_vcpus(dom, dev);
CU_DEBUG("Unhandled device type %i", dev->type);
diff -r 05a5ba2fda5d -r 3f3dd6c106e0 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Wed May 28 14:04:50 2008 -0700
+++ b/libxkutil/xmlgen.c Thu May 29 09:33:14 2008 -0700
@@ -254,21 +254,17 @@
static bool vcpu_to_xml(char **xml, struct virt_device *dev)
{
- int count;
int ret;
+ char *_xml;
- if (*xml == NULL) {
- ret = asprintf(xml, "<vcpu>1</vcpu>");
- return ret != -1;
- }
+ ret = asprintf(&_xml, "<vcpu>%" PRIu64 "</vcpu>\n",
+ dev->dev.vcpu.quantity);
+ if (ret == -1)
+ return false;
+ else
+ astrcat(xml, _xml);
- if (sscanf(*xml, "<vcpu>%i</vcpu>\n", &count) != 1)
- return false;
-
- free(*xml);
- ret = asprintf(xml, "<vcpu>%i</vcpu>\n", count + 1);
-
- return ret != -1;
+ return true;
}
static bool mem_to_xml(char **xml, struct virt_device *dev)
diff -r 05a5ba2fda5d -r 3f3dd6c106e0 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed May 28 14:04:50 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Thu May 29 09:33:14 2008 -0700
@@ -447,6 +447,14 @@
return NULL;
}
+static const char *proc_rasd_to_vdev(CMPIInstance *inst,
+ struct virt_device *dev)
+{
+ cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity);
+
+ return NULL;
+}
+
static const char *_sysvirt_rasd_to_vdev(CMPIInstance *inst,
struct virt_device *dev,
uint16_t type)
@@ -458,7 +466,7 @@
} else if (type == CIM_RES_TYPE_MEM) {
return mem_rasd_to_vdev(inst, dev);
} else if (type == CIM_RES_TYPE_PROC) {
- return NULL; /* FIXME: replace when processor is done */
+ return proc_rasd_to_vdev(inst, dev);
}
return "Resource type not supported on this platform";
16 years, 5 months
[PATCH] [TEST] Add LXC support to AllocationCapabilities.01 & 02
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1212078285 -28800
# Node ID af35c2dcc8c55b876e03ac9535ff9365c95f2709
# Parent 3233a070377270931b4cc1d790b6782fee17d1b6
[TEST] Add LXC support to AllocationCapabilities.01 & 02
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 3233a0703772 -r af35c2dcc8c5 suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri May 30 00:24:45 2008 +0800
@@ -27,7 +27,8 @@
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, platform_sup
from CimTest.ReturnCodes import PASS, FAIL
-@do_main(platform_sup)
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+@do_main(sup_types)
def main():
options = main.options
diff -r 3233a0703772 -r af35c2dcc8c5 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri May 30 00:24:45 2008 +0800
@@ -71,7 +71,8 @@
procid = "%s/%s" % ("ProcessorPool", 0)
rev = 463
-@do_main(platform_sup)
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+@do_main(sup_types)
def main():
options = main.options
diff -r 3233a0703772 -r af35c2dcc8c5 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 30 00:24:45 2008 +0800
@@ -119,10 +119,16 @@
class KVM_MemoryPool(CIM_ResourcePool):
pass
+class LXC_MemoryPool(CIM_ResourcePool):
+ pass
+
class Xen_ProcessorPool(CIM_ResourcePool):
pass
class KVM_ProcessorPool(CIM_ResourcePool):
+ pass
+
+class LXC_ProcessorPool(CIM_ResourcePool):
pass
class Xen_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities):
@@ -149,10 +155,16 @@
class KVM_DiskPool(CIM_ResourcePool):
pass
+class LXC_DiskPool(CIM_ResourcePool):
+ pass
+
class Xen_NetworkPool(CIM_ResourcePool):
pass
class KVM_NetworkPool(CIM_ResourcePool):
+ pass
+
+class LXC_NetworkPool(CIM_ResourcePool):
pass
class Xen_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities):
@@ -165,6 +177,9 @@
pass
class KVM_AllocationCapabilities(CIM_AllocationCapabilities):
+ pass
+
+class LXC_AllocationCapabilities(CIM_AllocationCapabilities):
pass
class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData):
16 years, 5 months
CimTest Report on XenFV 29-05-2008
by Deepti B Kalakeri
======================================
CIM Test Report for XenFV
======================================
Distro : RHEL 5.2 Beta
Kernel : 2.6.18-88.el5xen
Xen version : 3.1.2-88.el5
Libvirt : libvirt-0.3.3-7.el5
CIMOM : pegasus
PyWBEM : pywbem-3.14
CIM Schema : cimv216Experimental
LibCMPIutil : 79
LibVirtCIM : 592
CIMTEST : 160
======================================
PASS : 87
FAIL : 19 [ 10 test cases passed when ran manually , so 9 tc are
failing now]
XFAIL : 1
SKIP : 22
-----------------
Total : 129
======================================
List of tc that are failing:
ComputerSystem - 03_defineVS.py: FAIL
--Passed when run manually
ComputerSystem - 04_defineStartVS.py: FAIL
ComputerSystem - 06_paused_active_suspend.py: FAIL
ComputerSystem - 23_suspend_suspend.py: FAIL
ComputerSystem - 32_start_reboot.py: FAIL
ComputerSystem - 33_suspend_reboot.py: FAIL
ComputerSystem - 35_start_reset.py: FAIL
ElementConforms - 01_forward.py: FAIL
--Passed when run manually
ElementConforms - 02_reverse.py: FAIL
--Passed when run manually
EnabledLogicalElementCapabilities - 01_enum.py: FAIL
--Passed when run manually
HostSystem - 02_hostsystem_to_rasd.py: FAIL
--Passed when run manually
LogicalDisk - 03_ld_gi_errs.py: FAIL
--Passed when run manually
Memory - 01_memory.py: FAIL
--Passed when run manually
NetworkPort - 01_netport.py: FAIL
--Passed when run manually
ResourceAllocationFromPool - 02_reverse.py: FAIL
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
--Passed when run manually
VSSD - 04_vssd_to_rasd.py: FAIL
--Passed when run manually
VirtualSystemManagementService - 02_destroysystem.py: FAIL
VirtualSystemManagementService - 08_modifyresource.py: FAIL
Please find the complete report attached with the mail.
Thanks and Regards,
Deepti.
Starting test suite: libvirt-cim
Cleaned log files.
Testing XenFV hypervisor
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: PASS
ComputerSystem - 03_defineVS.py: FAIL
ERROR - Failed to enumerate the class of Xen_ComputerSystem
ERROR - Exception: No defined domain (domU1) is found
ERROR - Error: property values are not set for VS domU1
ComputerSystem - 04_defineStartVS.py: FAIL
ERROR - Error: property values are not set for VS domguest
ComputerSystem - 05_activate_defined_start.py: XFAIL Bug: 00002
ERROR - ERROR: VS DomST1 transition from Defined State to Activate state was not Successful
Bug:<00002>
ComputerSystem - 06_paused_active_suspend.py: FAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain not running')
ERROR - Unable to suspend dom DomST1 using RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 27_define_suspend_errs.py: PASS
ComputerSystem - 32_start_reboot.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 33_suspend_reboot.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 35_start_reset.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 40_RSC_start.py: PASS
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: PASS
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
ElementAllocatedFromPool - 04_forward_errs.py: PASS
ElementCapabilities - 01_forward.py: PASS
ElementCapabilities - 02_reverse.py: PASS
ElementCapabilities - 03_forward_errs.py: PASS
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: FAIL
ERROR - Failed to get associators information for ElementConformsToProfile
ERROR - Exception: not enough arguments for format string
ElementConforms - 02_reverse.py: FAIL
ERROR - ERROR: Instance for domgst not created
ElementConforms - 03_ectp_fwd_errs.py: PASS
ElementConforms - 04_ectp_rev_errs.py: PASS
ElementSettingData - 01_forward.py: SKIP
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: SKIP
EnabledLogicalElementCapabilities - 01_enum.py: FAIL
ERROR - Get domain list error, the number of domains is not equal
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: FAIL
ERROR - Xen_HostSystem with CrossClass_GuestDom was not returned
HostSystem - 03_hs_to_settdefcap.py: PASS
HostSystem - 04_hs_to_EAPF.py: SKIP
HostSystem - 05_hs_gi_errs.py: PASS
HostSystem - 06_hs_to_vsms.py: PASS
HostedDependency - 01_forward.py: SKIP
HostedDependency - 02_reverse.py: SKIP
HostedDependency - 03_enabledstate.py: SKIP
HostedDependency - 04_reverse_errs.py: SKIP
HostedResourcePool - 01_forward.py: PASS
HostedResourcePool - 02_reverse.py: PASS
HostedResourcePool - 03_forward_errs.py: PASS
HostedResourcePool - 04_reverse_errs.py: PASS
HostedService - 01_forward.py: PASS
HostedService - 02_reverse.py: PASS
HostedService - 03_forward_errs.py: PASS
HostedService - 04_reverse_errs.py: PASS
LogicalDisk - 01_disk.py: PASS
LogicalDisk - 02_nodevs.py: PASS
LogicalDisk - 03_ld_gi_errs.py: FAIL
ERROR - Failed to get instance by the class of Xen_LogicalDisk
ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)')
Memory - 01_memory.py: FAIL
ERROR - Capacity should be 262144 MB instead of 131072 MB
Memory - 02_defgetmem.py: PASS
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: FAIL
ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)')
NetworkPort - 02_np_gi_errors.py: PASS
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: PASS
Processor - 02_definesys_get_procs.py: PASS
Processor - 03_proc_gi_errs.py: PASS
Profile - 01_enum.py: SKIP
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: SKIP
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
ReferencedProfile - 01_verify_refprof.py: PASS
ReferencedProfile - 02_refprofile_errs.py: PASS
ResourceAllocationFromPool - 01_forward.py: PASS
ResourceAllocationFromPool - 02_reverse.py: FAIL
ERROR - No associated pool for Domain-0/0
CIM_ERR_NOT_FOUND: No such instance (Domain-0/0)
ResourceAllocationFromPool - 03_forward_errs.py: PASS
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
ERROR - Xen_NetResourceAllocationSettingData returned 0 instances, excepted atleast 1 instance
ERROR - ------FAILED: to verify the RAFP.------
ResourcePool - 01_enum.py: SKIP
ResourcePool - 02_rp_gi_errors.py: SKIP
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
ResourcePoolConfigurationService - 01_enum.py: PASS
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: PASS
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: PASS
SettingsDefineCapabilities - 03_forward_errs.py: PASS
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
VSSD - 04_vssd_to_rasd.py: FAIL
ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned
ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: FAIL
ERROR - Unknow exception happened
ERROR - (1, u'CIM_ERR_FAILED: Unable to retrieve domain name.')
ERROR - Destroyed multiple domains
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name.
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: FAIL
ERROR - Error invoking ModifyRS
ERROR - (1, u'CIM_ERR_FAILED: Failed to create domain')
InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Failed to create domain
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationSettingData - 01_enum.py: PASS
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
VirtualSystemSettingDataComponent - 01_forward.py: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
16 years, 5 months