# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225777457 28800
# Node ID a6816c4c82d9557d52d93ee0fcc9133d9b03055c
# Parent 8118a0e17d219b6886b34176423c45c855f08576
[TEST]Delete the functions had been moved to xm_virt_util.py in lib/VirtLib/utils.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 8118a0e17d21 -r a6816c4c82d9 lib/VirtLib/utils.py
--- a/lib/VirtLib/utils.py Sun Nov 02 19:16:33 2008 -0800
+++ b/lib/VirtLib/utils.py Mon Nov 03 21:44:17 2008 -0800
@@ -111,57 +111,3 @@
cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command)
return run_remote(ip, cmd)
-
-
-def get_xmtest_files(ip, kernel):
- # get the xm-test disk from morbo
- rc, out = run_remote(ip,
- "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest")
- rc, out = run_remote(ip,
- "cd /tmp/boot ; wget
http://morbo.linux.ibm.com/pub/xmtest.disk.gz")
- if rc != 0:
- return 2, "fetching xmtest.disk failed:\n%s" % out
-
- # mount on /tmp/xmtest
- rc, out = run_remote(ip,
- "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop /tmp/boot/xmtest.disk
/tmp/xmtest")
- if rc != 0:
- run_remote(ip, "umount /tmp/xmtest")
- return 2, "mounting xmtest.disk failed:\n%s" % out
-
- # We need "uname -r" to name the kernel correctly
- rc, uname = run_remote(ip, "uname -r")
- if rc != 0:
- run_remote(ip, "umount /tmp/xmtest")
- return 2, "uname failed:\n%s" % out
-
- # get the kernel binary, put in /tmp/boot
- rc, out = run_remote(ip,
- "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel)
- if rc != 0:
- run_remote(ip, "umount /tmp/xmtest")
- return 2, "fetching kernel failed:\n%s" % out
-
- return 0, ""
-
-def customize_xmtest_ramdisk(ip):
- # customize modules on xm-test ramdisk
- # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd
- rc, out = run_remote(ip,
- "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd")
- if rc != 0:
- run_remote(ip, "umount /tmp/xmtest")
- return 2, "customizing ramdisk failed:\n%s" % out
-
- return 0, ""
-
-def virt2uri(virt):
- # convert cimtest --virt param string to libvirt uri
- if virt == "Xen" or virt == "XenFV":
- return "xen:///"
- if virt == "KVM":
- return "qemu:///system"
- if virt == "LXC":
- return "lxc:///system"
- return ""
-