[Libvirt-cim] [PATCH 1 of 3] [TEST] add lxc file creation function

Guo Lian Yun yunguol at cn.ibm.com
Tue May 20 07:44:56 UTC 2008


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1211269259 25200
# Node ID 5f0a469e6a9a1fe02cc26a9f81e87a80286a43d5
# Parent  b2b2bb6cc8d87ba0eeddcf3d361d3085104d3492
[TEST] add lxc file creation function

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

diff -r b2b2bb6cc8d8 -r 5f0a469e6a9a suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py	Mon May 19 10:43:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py	Tue May 20 00:40:59 2008 -0700
@@ -359,3 +359,16 @@ def create_netpool_conf(server, virt):
         logger.error("Exception: In fn create_netpool_conf(): %s", detail)
         status=FAIL
     return status, test_network
+
+def create_lxc_file(lxc_file):
+    status = PASS
+    try:
+        f = open(lxc_file, 'w')
+        f.write('%s' % 'exec /bin/sh')
+        f.close()
+    except Exception,detail:
+        logger.error("Exception: %s", detail)
+    
+    if status != PASS:
+        logger.error("Creation of LXC file Failed")
+    return status




More information about the Libvirt-cim mailing list