# HG changeset patch
# User Guolian Yun <yunguol(a)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(a)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
+ elif options.virt == "LXC":
+ instIdval = "LXC:%s" % test_dom
else:
instIdval = "KVM:%s" % test_dom
diff -r 254bc5464030 -r 73e4e701cb90
suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
---
a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Wed
Jun 11 20:56:07 2008 +0800
+++
b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Thu
Jun 12 21:19:38 2008 +0800
@@ -64,7 +64,7 @@
from CimTest.Globals import CIM_USER, CIM_PASS, CIM_NS
from XenKvmLib.const import CIM_REV
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
@@ -115,7 +115,10 @@
test_disk = "hda"
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('Unable to create domain %s' % test_dom)