qemu.tests: make mutli_disk test works for linux guest

fix not all disk listed issue, get cdrom drive letter with
utils_misc.get_winutils_vol();

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest: Add unittest for libvirt_storage module.

* Replace real virsh module with a bogus virsh module
* Rewrite relative virsh pool functions for unittest.
  With setting output to static strings.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Fix small bug in storage_unittest

The pool_autostart function was not being overriden in virsh instance,
but dummy function already written.  I just added it into setUp() now
unittest is working perfectly when run as non-root.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Avoid future param. order problems

Signed-off-by: Chris Evich <cevich@redhat.com>
libvirt_xml_unittest: Fix wrong arguments passed to function

This unittest was calling vm_xml.VMXML.new_from_dumpxml
with wrong positional arguments, making the function
ignore the dummy virsh instance passed, causing errors.
Let's fix this bug.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools: add tool for pep8 reformatting

This calls the PEP8 linter called autopep8:

https://github.com/hhatto/autopep8

So we can make autotest to fully adhere to PEP8,
since there's a tool that can enforce the standard.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
tools: add pep8 check into check_patch

Integrate the PEP8 linter into the virt-test full
tree and patch verification process. It works by
verifying whether the PEP8 linter modified the file in
place, if it did, it means there are non compliances
in the code.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
tools: Add codespell

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/check_patch.py: Add codespell check

Integrate codespell to our own check_patch.py script.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run_pep8 refactor

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Mass spelling fixes

Using the program codespell

https://github.com/lucasdemarchi/codespell

We found a number of spelling mistakes, that could be
found and fixed. The result of the automated script
was double checked, of course.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/run_pep8.py: Ignoring E501,W601
PEP8 mass fixes

With the help of the PEP8 script, a semi-automated clean
of the code base was made, and effectively changing some
of the coding style rules of our code base:

 * No more 2 lines spacing among functions
 * No more combined module imports

In the end, it was going to be too difficult to take
into consideration E501 (line length > 80) errors and
W601 (.has_key() is deprecated), so these were ignored,
at least for now.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/check_patch.py: Fix incorrect logic

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add test for virsh autostart

Signed-off-by: Yanbing Du <ydu@redhat.com>