libvirt.tests: Add unsafe option test for virsh.migrate.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh_start: Fix pause bug in cleanup.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Add test for secret-dumpxml
virsh_start: add cases for more options.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Modify for secret-list wrap changed in
Add virsh command testcase virsh_secret_list
guestfish_block_dev: Add sfdisk, sfdisk-l, sfdiskM, sfdisk-N
guestfish_block_dev: Add sfdisk-disk-geometry,sfdisk-kernel-geometry
Add new file guestfish_lvm.cfg and guestfish_lvm.py for test lvm
related APIs
fix a issue that can not sfdisk for lvm
tp-libvirt: Fix iface-trans

Using `locate` utility to find a file could result into undesired
results and it also depends on whether the test system is indexed
properly. To find the `netcf-transaction` script, we use the autotest
`find_command()` to do the job. For system using SYSV init service
manager, we hard code the script location for a work around.

Also, alway cleanup enviroment in case a broken job influence
consecutive jobs.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #114 from kylazhang/secret-list

Add test for secret-list
Merge pull request #116 from kylazhang/secret-dumpxml

Add test for secret-dumpxml
Address the complain from inspekt style.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Revert "virsh.domdisplay: Only add port if nonzero for vnc"

This reverts commit 9cba9b688c72181af5574cfbc4512f17db77ec13.

This patch is wrong as it was a libvirt bug. We should be careful
about adapting tests to actual libvirt behavior as the libvirt could
be wrong, not the test itself.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
tp-libvirt: Fix libvirt network bandwidth

* The portgroup attribute is only applicable with virtual network
  interface, So skip the test if the default interface is not a
  'network' type.

Signed-off-by: Hao Liu <hliu@redhat.com>
blockresize: Add more options for test

Adjust the cfg matrix to add the 'qed' disk type as well as an option
for using 'kb' and 'kib' as the scale/type of the value provided. The
virsh command will accept k, kib, and kb. Set the initial disk to
500K so that the resize will actually attempt something.  Using 1M
as an initial size and then using values that are the same for 'b', 'k',
and 'm' doesn't do anything.

Modify the test code to handle the new options and be able to account
for the lack of the fix for bz1002813 which results in an error when
'1000kb' is provided since 1000kb is not evenly divisible by 512 as
is required by qemu.  The libvirt code supplied for the bz will resize
the value to be aligned on 512 byte boundaries - so our test test will
need to account for that too.

As a side note the existing math to change values from the cfg
supplied value to an 'expected_value' made an assumption that
the value was 1024M to start with.
snapshot_edit

Fix issue when/if the snapshot_create_as() fails the 'snapshot_oldlist'
wouldn't be generated resulting in a failure during the finally: segment
and not cleaning up after ourselves fully.
Merge pull request #160 from Hao-Liu/fix_iface_trans

tp-libvirt: Fix iface-trans
tp-libvirt: Fix libvirt_pci_passthrough

* Fixed a bug when no storage device name matches target name, it can't
  properly raise an exception

* Alway SKIP the test when the target node devices are not found, else
  the tests will FAIL if the default `ENTER.YOUR...` are not changed.

* When testing storage passthrough, alway check whether its parent node
  device is a PCI device. It might be `scsi` as well, and will get an
  unexpected behaviour.

Signed-off-by: Hao Liu <hliu@redhat.com>