
On 04/25/2012 04:10 PM, Osier Yang wrote:
On 2012年04月25日 12:23, Guannan Ren wrote:
On 04/25/2012 11:35 AM, Osier Yang wrote:
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?
We download boot.iso first, and add kickstart file into it recreate a new iso file named custom.iso. We can not tell it is rhel6u1 or rhel6u2 from the custom.iso, so remove it before creating a new one.
I mean why not change the utils/ksiso.sh to accept a argument, and create the custom.iso in the desired target dir, such as /var/cache/libvirt-test-API/$guest/
We can do that, if that is a better way. Currently, we keep all of this stuff in local folder for debugging or checking. If we have good reason to move the folder to /var/cache/libvirt-test-API it's ok for me.
Every time we install a new guest, we create a folder named after the name of the guest in root of libvirt-test-API. All of the related temporary files will be generated in this folder. The custom.iso is created in this folder.
I mean throw all of these stuffs into /var/cache/libvirt-test-API/$guest.