On 2012年04月24日 17:40, Guannan Ren wrote:
install_linux_cdrom.py: qemu process couldn't visit custom.iso that
resides in other user's home, so we copy
custom.iso into /tmp for easy use.
We need something like /var/cache/libvirt-test-API as a global
var in global.cfg.
install_linux_check.py: use hddriver and nicdriver name
Why? I guess the old "hdmode" and "nicmode" is not correct to represent
the actual argument, but it should be explained.
network/create.py: in the case of the network with 'isolate' type,
we need to remove '<forward mode="NETMODE"/>'line,
The bug is caused by changes on using xml files
network/define.py: the same as network/create.py
repos/snapshot/delete.py: the TESTCASE_check is reserved fuction name
for
framework, so change the name of its internal
'check' function
---
repos/domain/install_linux_cdrom.py | 14 +++++++++++---
repos/domain/install_linux_check.py | 6 +++---
repos/network/create.py | 4 ++++
repos/network/define.py | 6 +++++-
repos/snapshot/delete.py | 6 +++---
5 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/repos/domain/install_linux_cdrom.py
b/repos/domain/install_linux_cdrom.py
index 60d12a7..17052d4 100644
--- a/repos/domain/install_linux_cdrom.py
+++ b/repos/domain/install_linux_cdrom.py
@@ -47,13 +47,18 @@ def prepare_cdrom(*args):
ks_name = os.path.basename(ks)
new_dir = os.path.join(HOME_PATH, guestname)
+ customeiso_dir = os.path.join('/tmp/libvirt-test-API', guestname)
typo, custom. And in anycase, it should use the new global var in
global.cfg.
logger.info("creating a new folder for customizing custom.iso file in
it")
if os.path.exists(new_dir):
logger.info("the folder exists, remove it")
shutil.rmtree(new_dir)
+ if os.path.exists(customeiso_dir):
+ shutil.rmtree(customeiso_dir)
+
Why the dir should be deleted if exists? shouldn't we reuse it?