Add new testcase virsh_save_image_define

The testcase virsh_save_image_define make a test for
virsh subcommand: save-image-dumpxml save-image-define

Signed-off-by: Guannan Ren <gren@redhat.com>
lvsb.tests: add network options test cases for the virt-sandbox cmdline

Signed-off-by: Alex Jia <ajia@redhat.com>
Tests.vol_create_from: Replace pool operations with libvirt_storage module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Move nfs/iscsi setup&cleanup to utils_test module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Replace volume operations with libvirt_storage.PoolVolume.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
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.
libvirt-test/pci_passthrough: Add a case in pcipassthrough to test SRIOV.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Adjust vol_create_from test.

Functions for preparing pool and volume for test is useful
in other test modules. So move it to utils_test.libvirt.

Then in some failed conditions, it will leave many iscsi
devices on host. We should keep it clean.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Fix virsh.vol_create_from test bug.

When creating logical pool, pool_target should be volume
group's path. But it has been fixed to vg_logical in pre_pool,
so target in configuration should be vg_logical too.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
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 test case for migrate-compcache

Test command: migrate-compcache <domain> [--size <number>]

* Run migrate-compcache command and check return code

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>
tp-libvirt: Add macvtap interface test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
snapshot_disk: Perform xml save/restore

For some reason this test failed in a long run, subsequent tests failed
because improper cleanup left a snapshot in the xml, but not in the file
system resulting in the next test(s) failing to find the file.
libvirt-tests: Add test for command perf kvm.

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