libvirt.test: Add 'bridge' type interface test for iface

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.test: Add more testcases for iface test

Add some case for nonexist interface test, including
protocol test, stp test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.test: Add 'vlan' and 'bond' type test for iface

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Add a test for disk startupPolicy testing

libvirt domain disk XML may has a startupPolicy element:
    <disk type='file' device='floppy'>
      <source file='xxx' startupPolicy='mandatory'/>
      <target dev='fda' bus='fdc'/>
    </disk>
The value may be mandatory, requisite or optional, which corresponds to
differet behavior when start domain. This test case aim to test the three
different values for CD-ROM and floppy disks.

Signed-off-by: Yanbing Du <ydu@redhat.com>
tests.migrate: Adjustments for migration parameters.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add PV related case for libguestfs
libvirt-tests: Add test case for nodesuspend

Test command: virsh nodesuspend <target> <duration>

This command will make host suspend or hibernate, running tests on testing
grid may cause unexpected behavior.

This tests only work when test runner setup a remote host (physical or
virtual) with testing version of libvirt daemon running. After that change
the remote_xxx parameters in configuration file to corresponding value.

Signed-off-by: Hao Liu <hliu@redhat.com>
Fix virsh nodesuspend test case.

* Use more straight forward debugging messages and exception messages.
* Added missed 'raise' keywords. When trying to raise an exception, this will
  make cases false PASS when that hosts is timeout when shutting down.
* Extend upper_tolerance of down time checking from 8 to 15. Apprently some
  hosts will take longer to recover from sleeping.

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

When creating a remote virsh session to another host, there is a
chance that the remote host is unreachable. In this case we expect
a SKIP rather than an FAIL.

Signed-off-by: Hao Liu <hliu@redhat.com>
nodesuspend: Avoid common remote* parameters

Change common remote* params to nodesuspend_remote* to avoid misuse of
this case by any chances, which might cause catastrophic result.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt.tests: add new negative case into virsh domstate

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
Merge pull request #56 from Hao-Liu/nodesuspend

libvirt-tests: Add test case for nodesuspend
libvirt.test: Add attach interface to VM case and fix some problems

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.test: Fix bugs in macvtap test
1.Fix the way to edit the file on remote
2.Remove unnecessary session creation

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Add virsh qemu-monitor-command test cases

The virsh qemu-monitor-command is for send QEMU monitor command directly
from virsh, which benefit debugging for devel or well knowledged user.

The qemu-* commands are not with support in RHEL products, so the testing
strategy is mainly focus on return status and libvirtd status after
command been executed.

Signed-off-by: Wayne Sun <gsun@redhat.com>
Add virsh qemu-agent-command test cases

The virsh qemu-agent-command is for send QEMU agent command directly
from virsh, which benefit debugging for devel or well knowledged user.

The qemu-* commands are not with support in RHEL products, so the testing
strategy is mainly focus on return status and libvirtd status after
command been executed.

Signed-off-by: Wayne Sun <gsun@redhat.com>
Add virsh qemu-attach test cases

The virsh qemu-attach is for attach QEMU process from virsh, the command
is requires the use of libvirt-qemu.so, and is therefore explicitly
unsupported by upstream libvirt folks. The whole idea of qemu-attach is
a development crutch and not a highly reliable mechanism.

So the testing strategy is mainly focus on libvirtd status after
command been executed.

Use qemu_vm.VM to init qemu process and set vm_type as "default" in cfg.

Check more details in bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1063837
https://bugzilla.redhat.com/show_bug.cgi?id=995312
https://bugzilla.redhat.com/show_bug.cgi?id=1010617

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

Add qemu-* command test cases
Merge pull request #218 from yumingfei/migration_parameters

tests.migrate: Adjustments for migration parameters.
snapshot_disk: Add pool volume snapshot cases

Current test is with snapshot disk in a created tmp dir, for support
pool volume testing with snapshot, create certain type pool and use
volume in the pool for snapshot testing.

Skip specific cases since upstream and rhel7 change.

Covered pool: "dir", "fs", "netfs", "iscsi", "logical" and "disk"

Signed-off-by: Wayne Sun <gsun@redhat.com>