# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225336307 25200
# Node ID fa88d86bab22a44ea4c1ce221b326c8f020437c0
# Parent 408dbb3a61b43bd0def587a9ea7e648105def002
[TEST] Update helper function when remove some function in live.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_doms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20:11:47 2008 -0700
@@ -24,7 +24,7 @@
import tempfile
import os
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from CimTest.Globals import CIM_FUUID
try:
@@ -127,7 +127,7 @@
"""Destroy and undefine all domain to keep a
clean env for next testcase"""
- names = live.domain_list(server, virt)
+ names = domain_list(server, virt)
ids = virdomid_list(server, virt)
names.extend(ids)
uuid_list = get_uuid_list()
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_xml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20:11:47 2008 -0700
@@ -29,12 +29,13 @@
import sys
import random
from VirtLib import utils
-from VirtLib import live
from xml import xpath
from xml.dom import minidom, Node
from CimTest.Globals import logger
from XenKvmLib.test_doms import set_uuid, create_vnet
-from VirtLib.live import net_list, available_bridges, get_bridge_from_network_xml
+from VirtLib.live import available_bridges
+from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \
+bootloader
from CimTest.ReturnCodes import SKIP
image_dir = "/tmp"
@@ -116,7 +117,7 @@
</disk>
</devices>
</domain>
- """ % ( test_dom, set_uuid(), live.bootloader(server, gtype), \
+ """ % ( test_dom, set_uuid(), bootloader(server, gtype), \
kernel_path, init_path, mem*1024, vcpus, mac, disk_file_path, disk )
return test_xml
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 29 20:11:47 2008 -0700
@@ -25,7 +25,6 @@
import pywbem
from CimTest.CimExt import CIMMethodClass, CIMClassMOF
from CimTest import Globals
-from VirtLib import live
from XenKvmLib import const
from XenKvmLib.classes import get_typed_class, get_class_type, virt_types
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 29 20:11:47 2008 -0700
@@ -38,6 +38,7 @@
from xml.dom import minidom, Node
from xml import xpath
from VirtLib import utils, live
+from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader
from XenKvmLib.test_doms import set_uuid, viruuid
from XenKvmLib import vsms
from XenKvmLib import const
@@ -436,7 +437,7 @@
return br
def _set_vbridge(self, ip, virt_type, net_name):
- vbr = live.get_bridge_from_network_xml(net_name, ip, virt=virt_type)
+ vbr = get_bridge_from_network_xml(net_name, ip, virt=virt_type)
interface = self.get_node('/domain/devices/interface')
interface.setAttribute('type', 'bridge')
@@ -562,7 +563,7 @@
self.set_interface_details(devices, net_mac, net_type, net_name, 'Xen')
def set_bootloader(self, ip, gtype=0):
- bldr = live.bootloader(ip, gtype)
+ bldr = bootloader(ip, gtype)
self.add_sub_node('/domain', 'bootloader', bldr)
self.vssd.Bootloader = bldr
return bldr