[Libvirt-cim] [PATCH] [TEST] Update VirtualSystemSettingDataComponent.02&03 for LXC support
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Jun 11 15:42:20 UTC 2008
yunguol at cn.ibm.com wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1213276778 -28800
> # Node ID 73e4e701cb907af69177fe92fa741b9e0428615d
> # Parent 254bc5464030a03b6f791fd49acd208f6ec1db23
> [TEST] Update VirtualSystemSettingDataComponent.02&03 for LXC support
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r 254bc5464030 -r 73e4e701cb90 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Wed Jun 11 20:56:07 2008 +0800
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Jun 12 21:19:38 2008 +0800
> @@ -57,7 +57,7 @@
> from CimTest.ReturnCodes import PASS, FAIL
> from XenKvmLib.const import CIM_REV
>
> -sup_types = ['Xen', 'XenFV', 'KVM']
> +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
>
> test_dom = "VSSDC_dom"
> test_vcpus = 1
> @@ -143,7 +143,10 @@
> else:
> test_disk = "hdb"
> virt_xml = vxml.get_class(options.virt)
> - cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk)
> + if options.virt == "LXC":
> + cxml = virt_xml(test_dom)
> + else:
> + cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk)
> ret = cxml.create(options.ip)
> if not ret:
> logger.error("Failed to create the dom: %s", test_dom)
> @@ -152,6 +155,8 @@
>
> if options.virt == "Xen" or options.virt == "XenFV":
> instIdval = "Xen:%s" % test_dom
Since both Xen and XenFV both use the Xen prefix in the InstanceID, it
makes sense to handle them as a separate case.
> + elif options.virt == "LXC":
> + instIdval = "LXC:%s" % test_dom
> else:
> instIdval = "KVM:%s" % test_dom
However, instead of adding an additional case for LXC, you could instead
change the else here to:
else:
instIdval = "%s:%s" % (options.virt, test_dom)
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list