Skip to content

Commit

Permalink
Merge pull request avocado-framework#62 from ldoktor/yaml-descriptions
Browse files Browse the repository at this point in the history
docs: Add ReferenceGuide with avocado-virt params
  • Loading branch information
lmr committed Jun 23, 2015
2 parents 451aff7 + 28a574b commit 0daeb40
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
5 changes: 3 additions & 2 deletions avocado/virt/qemu/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def power_on(self):
auto_close=False,
output_func=genio.log_line,
output_params=("serial-console-%s.log" % self.short_id,),
prompt=self.params.get("shell_prompt", default="[\#\$]"))
prompt=self.params.get("shell_prompt",
"/plugins/virt/guest/*",
default="[\#\$]"))
self._screendump_thread_start()
finally:
os.remove(self.monitor_socket)
Expand Down Expand Up @@ -277,7 +279,6 @@ def screendump(self, filename, verbose=True):
def _screendump_thread_start(self):
self._screendump_thread_enable = self.params.get('enable',
'/plugins/virt/screendumps/*')
video_enable = 'virt.videos.enable'
self._video_enable = self.params.get('enable',
'/plugins/virt/videos/*')
if self._screendump_thread_enable:
Expand Down
61 changes: 61 additions & 0 deletions docs/source/ReferenceGuide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. _reference-guide:

===============
Reference Guide
===============

This guide presents information on the Avocado-virt basic design and its internals.

.. _available_params:

Basic avocado-virt params
=========================

Avocado-virt uses test params to affect the environment independently on the
test code. This can be used to reproduce the same steps on different setup,
for example various disk drivers. You can set these via multiplex ``YAML``
file.

Table of supported params:

+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| Params path | Params key | Description |
+================================+================================+==================================================================================+
| /plugins/virt/guest/* | disable_restore_image_test | Don't restore the image after each test |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/guest/* | image_path | Path to the guest image |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/guest/* | password | Guest remote login password |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/guest/* | shell_prompt | Regexp of the guest remote command line |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/guest/* | user | Guest remote login name |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/qemu/migrate/* | timeout | Migration timeout |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/qemu/paths/* | qemu_bin | Qemu binary path |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/qemu/paths/* | qemu_img_bin | Qemu-img binary path |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/qemu/paths/* | qemu_io_bin | Qemu-io binary path |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/qemu/template/* | contents | Template of the qemu command to be run instead of autogenerated one |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/screendumps/* | enable | Enable screendump service |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/screendumps/* | interval | Interval between screendumps |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/videos/* | enable | Encode screendumps into video after the test |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+
| /plugins/virt/videos/* | jpeg_quality | Quality of the screendump image postprocessing |
+--------------------------------+--------------------------------+----------------------------------------------------------------------------------+

.. note:: Some of these values can be modified in config files and/or
overridden on the command line. To view the setting on your system run
``avocado multiplex -s -c`` with avocado-virt enabled.

.. note:: Not all params are used in every run, some of them depends on each
other or on features touched in the test (for example when your test
doesn't use qemu-io executing the test with various values makes no sense.
Changing the qemu_bin on the other hand makes the test executed on
different qemu versions.)
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Contents:
GetStartedGuide
GuestConfiguration
WritingTests
ReferenceGuide

Indices and tables
==================
Expand Down

0 comments on commit 0daeb40

Please sign in to comment.