# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1216793420 25200
# Node ID 73fa12d7cfcbc69a683dde7e953996d447bceaab
# Parent 3703b7be5a107c67e901546978e974546b3d5562
[TEST] Convert NetworkPort.02_np_gi_errors.py for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3703b7be5a10 -r 73fa12d7cfcb
suites/libvirt-cim/cimtest/NetworkPort/02_np_gi_errors.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/02_np_gi_errors.py Wed Jul 16 07:23:32 2008
-0700
+++ b/suites/libvirt-cim/cimtest/NetworkPort/02_np_gi_errors.py Tue Jul 22 23:10:20 2008
-0700
@@ -31,11 +31,11 @@
from XenKvmLib import assoc
from XenKvmLib.common_util import try_getinstance
from XenKvmLib.classes import get_typed_class
-from XenKvmLib.vxml import XenXML, KVMXML, get_class
+from XenKvmLib.vxml import XenXML, KVMXML, LXCXML, get_class
from CimTest.ReturnCodes import PASS, SKIP
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
expr_values = {
@@ -242,8 +242,11 @@
test_dom = "nettest_domain"
test_mac = "00:11:22:33:44:55"
-
- vsxml = get_class(options.virt)(test_dom, mac=test_mac)
+
+ if options.virt == 'LXC':
+ vsxml = get_class(options.virt)(test_dom)
+ else:
+ vsxml = get_class(options.virt)(test_dom, mac=test_mac)
ret = vsxml.define(options.ip)
if ret != 1:
logger.error("Define domain failed!")