utils_net: raise a right error for bring down interface

Signed-off-by: Yanbing Du <ydu@redhat.com>
utils_test.libvirt: Fix a regex

In some case, interface may has no MAC address:
$virsh iface-list
Name                 State      MAC Address
--------------------------------------------
brlo                 inactive
eth0                 active     44:37:e6:4a:42:d1

So fix the regex to get empty MAC address.

Signed-off-by: Yanbing Du <ydu@redhat.com>
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>
Merge pull request #1621 from will-Do/net_fix

Fix two  interface related problems
libvirt_vm: make normalize_connect_uri return exact uri rather than None when input is default.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Fix for vm.connect_uri when it is default.

Default is not always qemu.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: introduce two method to VM named is_lxc() and is_qemu().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Make destroy() support lxc.

If the vm is lxc container, we destroy it with virsh command
rather than send a shutdown into it.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>