[Libvirt-cim] [PATCH 1 of 3] [TEST] add helpers function for LXC support

Guo Lian Yun yunguol at cn.ibm.com
Wed May 14 06:27:35 UTC 2008


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1210744666 25200
# Node ID 935b2c485f8857ddb396efd729d5fc7ff7b41614
# Parent  06c87ac466e374f7ca5b7e3dd1923ee32f1ef2ce
[TEST] add helpers function for LXC support

Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>

diff -r 06c87ac466e3 -r 935b2c485f88 lib/CimTest/Globals.py
--- a/lib/CimTest/Globals.py	Tue May 13 06:07:27 2008 -0700
+++ b/lib/CimTest/Globals.py	Tue May 13 22:57:46 2008 -0700
@@ -49,7 +49,7 @@ CIM_IP    = os.getenv("CIM_IP")
 CIM_IP    = os.getenv("CIM_IP")
 CIM_PORT = "5988"
 NM = "TEST LOG"
-platform_sup = ["Xen", "KVM", "XenFV"]
+platform_sup = ["Xen", "KVM", "XenFV", "LXC"]
 logging.basicConfig(filename='/dev/null')
 logger = logging.getLogger(NM)
 logging.PRINT = logging.DEBUG + 50
@@ -67,7 +67,7 @@ parser.add_option("-i", "--ip", dest="ip
                   help="IP address of machine to test, default: localhost")
 parser.add_option("-v", "--virt", dest="virt", type="choice",
                   choices=platform_sup, default="Xen",
-                  help="Virt type, select from: 'Xen' & 'KVM' & 'XenFV', default: Xen")
+                  help="Virt type, select from: 'Xen' & 'KVM' & 'XenFV' & 'LXC', default: Xen")
 parser.add_option("-d", "--debug-output", action="store_true", dest="debug",
                   help="Duplicate the output to stderr")
 
diff -r 06c87ac466e3 -r 935b2c485f88 lib/VirtLib/utils.py
--- a/lib/VirtLib/utils.py	Tue May 13 06:07:27 2008 -0700
+++ b/lib/VirtLib/utils.py	Tue May 13 22:57:46 2008 -0700
@@ -161,5 +161,7 @@ def virt2uri(virt):
         return "xen:///"
     if virt == "KVM":
         return "qemu:///system"
+    if virt == "LXC":
+        return "lxc:///system"
     return ""
 
diff -r 06c87ac466e3 -r 935b2c485f88 suites/libvirt-cim/lib/XenKvmLib/classes.py
--- a/suites/libvirt-cim/lib/XenKvmLib/classes.py	Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py	Tue May 13 22:57:46 2008 -0700
@@ -19,7 +19,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 #
 
-virt_types = ['Xen', 'KVM', 'XenFV']
+virt_types = ['Xen', 'KVM', 'XenFV', 'LXC']
 
 def get_typed_class(virt, basename):
     if virt not in virt_types:
diff -r 06c87ac466e3 -r 935b2c485f88 suites/libvirt-cim/main.py
--- a/suites/libvirt-cim/main.py	Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/main.py	Tue May 13 22:57:46 2008 -0700
@@ -51,7 +51,7 @@ parser.add_option("-c", "--clean-log",
                   help="Will remove existing log files before test run")
 parser.add_option("-v", "--virt", dest="virt", type="choice",
                   choices=platform_sup, default="Xen",
-                  help="Virt type, select from 'Xen' & 'KVM' & 'XenFV'(default: Xen). ")
+                  help="Virt type, select from 'Xen' & 'KVM' & 'XenFV' & 'LXC'(default: Xen). ")
 parser.add_option("-d", "--debug-output", action="store_true", dest="debug",
                   help="Duplicate the output to stderr")
 




More information about the Libvirt-cim mailing list