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.
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>
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 virsh domcontrol test case

Check domain control interface state while with or without job (dump,
save, restore, managedsave) on domain. When with job on domain, "occupied"
or "background job" is expected, "ok" is also expected since state is in
change. When without job on domain, 'ok' is expected.

In the test case, use subprocess to create job on domain, while run
domcontrol in loop to check domain control interface state, no strict
check on state as it is changing, only check the command status.

Signed-off-by: Wayne Sun <gsun@redhat.com>
Merge pull request #39 from waynesun09/virsh_domcontrol

libvirt.tests: Add virsh domcontrol test case
libvirt-tests: add cases for cellno options in virsh.freecell test.

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

libvirt-tests: add cases for cellno options in virsh.freecell test.
Merge pull request #40 from Hao-Liu/nodedev_list

libvirt-test: Add test cases for nodedev-list
Merge pull request #43 from Guannan-Ren/save_image_edit

Add virsh command testcase virsh_save_image_edit
libvirt.tests: Prevent endless image encoding for save_image_edit.

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

attach_device: Change SKIP into PASS/FAIL
libvirt.virsh_cmd: virsh_save_image_edit PEP8 Fix

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
libvirt.virsh_cmd: virsh_sendkey PEP8 Fix

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>