virttest.libvirt_vm: Add functions to get device details.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Add functions for remote disk operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Support lvm for RemoteDiskManager.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Add attaching operations for libvirt vm.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.init: Add function for RemoteDiskManager.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.HostStress: Set default value for params.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Pass correct args to control file.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.run_autotest: Support to pass args for control.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add functions to get disk slots and disk type in xml.
virttest.virsh: add blkiotune command wrapper

Signed-off-by: Alex Jia <ajia@redhat.com>
virttest.utils_misc: add functions for getting major and minor numbers of the device

Signed-off-by: Alex Jia <ajia@redhat.com>
virttest.libvirt_xml.vm_xml: parse block I/O elements from XML

Signed-off-by: Alex Jia <ajia@redhat.com>
env_process: Check if VM exists when preprocessing

Before this patch when running test cases without a main VM exists,
say `virt-tests-vm1`, the test still goes on, it will raise a `TestFail`
if it tries to start the non-exist VM or if test was configured not to be
started at the preprocess progress, there will be strange outputs.

This patch check the existence of target VM, and raise a `TestError` if
`main_vm` don't exist or a `TestNAError` if a non-`main_vm` don't exist.

Signed-off-by: Hao Liu <hliu@redhat.com>
virttest.utils_libguestfs: Add some PV commands
virttest.utils_libguestfs: Add some VG related APIs
virttest.utils_net: support ip address deleting

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
virttest.env_process: Fix bug of postprocess_image.

When VM image cannot be found, image.info() will return None.
Then postprocess_image will raise following exception:
    raise virt_vm.VMError("Failures occurred while postprocess:%s" % err)
        VMError: Failures occurred while postprocess:
        Postprocess: 'NoneType' object has no attribute 'splitlines'
and test will be failed(None of testcase's business).
So check it before splitlines().

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.data_dir: Fix bug setting an alternate data dir

With 948635a9, we broke the ability to set a data dir in
virt test through --data-dir. This fixes the problem.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.data_dir: Fix PEP8 mistake

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1681 from Hao-Liu/fix_preprocess

env_process: Check if VM exists when preprocessing