diff mbox

[1/6] KVM test: Added floppy and tftp options to qemu command

Message ID 1249339134-5600-2-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Aug. 3, 2009, 10:38 p.m. UTC
This allows you to not specify the full path in the
config file, appends to the image dir.

Signed-off-by: David Huff <dhuff@redhat.com>
---
 client/tests/kvm/kvm_vm.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 2ea6681..f65b78c 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -256,6 +256,18 @@  class VM:
             iso = os.path.join(iso_dir, iso)
             qemu_cmd += " -cdrom %s" % iso
 
+        # We may want to add {floppy_otps} parameter for -fda
+        # {fat:floppy:}/path/. However vvfat is not usually recommended
+        floppy = params.get("floppy")
+        if floppy:
+            floppy = os.path.join(image_dir, floppy)
+            qemu_cmd += " -fda %s" % floppy
+
+        tftp = params.get("tftp")
+        if tftp:
+            tftp = os.path.join(image_dir, tftp)
+            qemu_cmd += " -tftp %s" % tftp
+
         extra_params = params.get("extra_params")
         if extra_params:
             qemu_cmd += " %s" % extra_params