avocado-framework/avocado-virt — pull request #25 by ruda (2014-12-02 21:38:13+00:00)
Title: avocado.virt.qemu: Introduce qemu templates.

Introduce qemu templates to create custom command line invocations.
The templates are native Python string templates with custom
tags that comes from values of `avocado.virt.qemu.devices` API.

The current tags are:

* {avocado_defaults} all options, with qemu binary path included
* {avocado_qemu_binary} the qemu binary path
* {avocado_devices} the devices, without the qemu binary path
* {avocado_qmp} qmp device
* {avocado_display} display device
* {avocado_vga} vga device
* {avocado_drive} drive device
* {avocado_network} network device
* {avocado_serial} serial device
* {avocado_vnc} vnc device
* {avocado_fd} floppy disk device

Some tags accepts to get internal values. For example,
from `avocado_drive` you can get the default disk image
with `{avocado_drive.drive_file}`.

Samples available in examples/*.tpl.

Here's a valid template:

```
{avocado_qemu_binary}
-sandbox on -m 64
{avocado_devices}
```

The invocation from the command line:

`avocado run --qemu-template example.tpl tests/qemu/boot.py`

Signed-off-by: Rudá Moura