KVM test: Added floppy and tftp options to qemu command

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>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3808 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index d4461d3..82f1eb4 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -264,6 +264,18 @@
             iso = kvm_utils.get_path(root_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(root_dir, floppy)
+            qemu_cmd += " -fda %s" % floppy
+
+        tftp = params.get("tftp")
+        if tftp:
+            tftp = os.path.join(root_dir, tftp)
+            qemu_cmd += " -tftp %s" % tftp
+
         extra_params = params.get("extra_params")
         if extra_params:
             qemu_cmd += " %s" % extra_params