On 04/01/2013 08:37 AM, [email protected] wrote:
From: whuang <[email protected]>
Some trailing whitespaces on this patch, I've fixed them, but please pay more attention next time.
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) +
_______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
