virsh.volume: Fix test issues

Resolve multiple issues with the test:

 1. Calling utlv.define_pool() without a 4th parameter (cleanup_env)
    results in failure since 4th parameter is expected
 2. The local 'get_image_info' should be replaced by the virt-test
    virttest/utils_misc/get_image_info().  Doing so changes the name
    of the 'img_info' field 'capacity' to 'vsize'. Since this field
    is already an 'int' bytes value - the code in norm_capacity() to
    "read" the bytes value is no longer necessary and a straight
    assignment is possible.
 3. Various 'actual_info' dictionary key's were mis-capitalized.
libvirt.test: Fix a bug in setvcpus

In test, such fail will show up:
local variable 'status_error' referenced before assignment

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
tp-libvirt: Decouple secret_set_get

The original version of virsh_secret_set_get generates test cases that
couples to each other, which means one test case depends on another test
case. For example, first test case defines a secret, the following three
test case test on the former defined secret and a last test case clean
up the environment.

This method is helpful if we try to reuse some cases and works well when
we make them run together. But if we run a single case, it will fail or
leave a contaminated environment.

This patch decouples these dependencies and make every test case define
and clean up environment, making every case can work independently.

Signed-off-by: Hao Liu <hliu@redhat.com>
Add a public function for create lvm, and remove lvm option from
cfg file
Add some lvm cases for libguestfs
Add case for testing lvuuid, lvm-set-filter and lvm-clear-filter
test.volume_application: Check parameters before running.

Put parameters in config-file may cause preprocess error.
So move them to test module and check cdrom before running.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
tests.volume_application: Fix bugs.

 * Parted device in vms is optional because parted command
   may not exist.
 * Disk volumes couldn't be created in disk pool, so create
   them before create_volumes(...).
 * Pools will be in busy if we do not detach them on vms.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #138 from jferlan/volume

virsh.volume: Fix test issues
Merge pull request #175 from Hao-Liu/fix_secret_get_set

tp-libvirt: Decouple secret_set_get
libvirt.tests: Add filter for migrate speed with bz1083483.

Signed-off-by: John Ferlan <jferlan@redhat.com>
libvirt.tests: Wrap set_get_speed operations to single function.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt_pci_passthrough: Rewrite the configuration file.

As the original way to test pci passthrough is not secure
for all host. This patch make user to provide the pci_label
to find the pci device.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Add test for secret-define/undefine
secret_define_undefine: Add libvirt API acl test case for secret commands

Update secret_define_undefine case for cover virStoragePoolPtr set
acl testing. The covered APIs in the case are 'delete', 'save',
'read-secure', and 'write'.

Signed-off-by: Wayne Sun <gsun@redhat.com>
Merge pull request #185 from yangdongsheng/libvirt_pci

libvirt_pci_passthrough: Rewrite the configuration file.
Merge pull request #115 from kylazhang/secret-define-undefine

Add test for secret-define/undefine
libvirt_pci_passthrough: Add a parameter check in the beginning of the test script.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #187 from yangdongsheng/libvirt_pci

libvirt_pci_passthrough: Add a parameter check in the beginning of the t...
libvirt.test: Add more options test for attach-disk

Add some more test for attach-disk, for example:
--serial, --address, --multifunction, --subdriver, etc.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>