From: whuang <[email protected]>
Signed-off-by: whuang <[email protected]>
---
virttest/virsh.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/virttest/virsh.py b/virttest/virsh.py
index 21c6922..b006ab3 100644
--- a/virttest/virsh.py
+++ b/virttest/virsh.py
@@ -1622,3 +1622,19 @@ def cpu_stats(name, options, **dargs):
cmd += " %s" % options
return command(cmd, **dargs)
+
+def change_media(name, device, options, **dargs):
+ """
+ Change media of CD or floppy drive.
+
+ @param: name: VM's name.
+ @param: path: Fully-qualified path or target of disk device
+ @param: options: command change_media options.
+ @param: dargs: standardized virsh function API keywords
+ @return: CmdResult instance
+ """
+ cmd = "change-media %s %s " % (name, device)
+ if options:
+ cmd += " %s " % options
+ return command(cmd, **dargs)
+
--
1.8.1.4
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel