libguestfs.tests: Add test module for partition operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add test module for volume operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add test module for virt_inspect_operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
pool_create: Resolve test errors

Originally posted to virt-test before the commit as PR 1236:

https://github.com/autotest/virt-test/pull/1236

This replaces and resolves issues mentioned from review. The main
difference between this version and the last one posted previously
is that the code now handles the transient 'default' storage pool
not being started prior to the test being run in the "error" case.
I also cleaned up and commented more the finally logic.
attach_device: Change SKIP into PASS/FAIL

If a failure is expected for an unsupported option, then we should return
PASS not SKIP. Likewise, if it wasn't expected we should return FAIL.
Since expectedly failing is a return of True, analyze_negative_results()
also needs to adjust its expectations with respect to return status.
find_storage_pool_sources_as: Check for required utilities

In order to run the iscsi and logical tests, the 'tgtadm' and
'iscsiadm' utilities must be installed; otherwise, tests fail.
Add check and skip if not installed.
Add try/except for login_iscsi and create_vg failure

Add a try/except for login_iscsi or create_vg failure.  If the login_iscsi
fails, then we leave with the iscsiadm still logged in if the creation
of the vg fails.  If either fails, then use the exception to propagate
the error.
libvirt.tests: Add test for virsh find-storage-pool-sources

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #18 from will-Do/find_pool_sources

libvirt.test: Add test for virsh find-storage-pool-sources
Merge pull request #33 from jferlan/storage_pool_sources_as

find_storage_pool_sources_as: Check for required utility
Merge pull request #25 from jferlan/pool_create

pool_create: Resolve test errors
Merge pull request #35 from yumingfei/virt_part_oper

libguestfs.tests: Add testcases.
Add virsh testcase virsh_save_image_edit

domain/virsh_save_image_edit.cfg
domain/virsh_save_image_edit.py

Signed-off-by: Guannan Ren <gren@redhat.com>
Add testcase virsh_net_edit

New files:
network/virsh_net_edit.cfg
network/virsh_net_edit.py

Signed-off-by: Guannan Ren <gren@redhat.com>
libvirt.tests: Re-write virsh_pool.py to cover more pool types and commands

    1. Expend case to cover more pool types
    2. Expend case to cover more virsh pool commands
    3. Remove the vol-create/delete part which can be covered in virsh
       volume testing

Signed-off-by: Yanbing Du <ydu@redhat.com>
libvirt-test: Add test cases for nodedev-list

Test command: nodedev-list [--tree] [--cap <string>]

1) Run nodedev-list command and check return code.
2) If `cap_option == one`, results are also compared
   with devices get from sysfs.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt: Fix nodedev_list in nodedev_create_destroy

1) Change nodedev_list according to change of API in virsh.py.
   There are two references of old nodedev_list API, one is fixed
   in this commit, and another used in nodedev_reset is no need to
   fix.

2) We don't need to start VM when testing host node devices. this
   will save us a little time.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt: Fix nodedev_list in pci_passthrough

1) Change nodedev_list according to change of API in virsh.py.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt-tests: Add '--daemon' option test for virsh version

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Add test for virsh blockjob

Signed-off-by: Yanbing Du <ydu@redhat.com>