libvirt: Add test module for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add virsh function for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add get_disk_source() for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: fix a bug for virsh domblkinfo

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: Avoid size check if disk format isn't 'raw'.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest/qemu_vm:Fix unable to add nodefaults qemu command line

has_option(help_text, "use_nodefaults") will always return false because
qemu help_text just has 'nodefaults' line, instead of 'use_nodefaults'.
So -nodefaults will never be used as qemu command line.

This patch is to avoid this error situation

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
qemu.enospc:update the test.bindir to data_dir.get_data_dir

Now use test.bindir will not find the image file, just update it
to new interface data_dir.get_data_dir

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Merge pull request #444 from QiuMike/qemu.enospc_update_the_test.bindir_to_data_dir.get_data_dir

qemu.enospc:update the test.bindir to data_dir.get_data_dir
Merge pull request #435 from QiuMike/virttest_qemu_vm_Fix_unable_to_add_nodefaults_qemu_command_line

virttest/qemu_vm:Fix unable to add nodefaults qemu command line
Merge pull request #318 from liyangfnst/domblkinfo

Add test for virsh domblkinfo v4
virttest.qemu_storage: FIX Don't overwrite backup image during preprocess

After the test during check_image the backup image was still being
overwritten.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
utils_net : Add the lost api in utils_net

This patch add the lost APIs in utils_net, something wrong happended
when rebase the patch(commit 9efb355).

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.qemu_vm: Add get_monitors_by_type() function

This function can be used to get monitors of the given type.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.qmp_*: Use VM.get_monitory_by_type() function

Use VM.get_monitory_by_type() function to get QMP monitor(s).

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.qmp_event_notification: Fix config main_monitor

The main monitor name is overriden to hmp1 and causes test failures...

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.qmp_*: Pylint/style changes

No actual changes.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Revert "virttest.qemu_vm: Add freq option to usb device"

This reverts commit fadf99e6c0b1bdd86315040b3d3a35a804a550e8.

The freq option was removed in commit:
https://github.com/autotest/autotest/commit/93acc8819c8d912f2f3bf6f4d5d66bc2c99181a4
Thus revert this commit from virt-test.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Get usb device pci address with get_free_pci_addr()

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Refactory get_free_usb_port function

This patch rewrites the get_free_usb_port function:
 * Moving it out of make_create_command function.
 * Creating some helper function.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Add support for usb-hub device

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>