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>
snapshot_create_as: Fix negative test with quiesce without ga on running domain

As qemu-guest-agent change, start and stop the ga process differ
in different guest os. On RHEL7 and fedora, as take over by
systemd, it could be autostarted when os up, kill the process
could fail as new process be started immediately. So for stop it,
first try to kill the process, if process still detected, then
use systemctl to stop the service.

Update TestFail to TestNAError when check qemu-guest-agent
service.

This fix issue:
https://github.com/autotest/tp-libvirt/issues/135

Signed-off-by: Wayne Sun <gsun@redhat.com>
virsh_change_media: Add a case to cover floppy write & read test

Signed-off-by: Yanbing Du <ydu@redhat.com>
virsh_update-device: case expand and tiny bugs fix

1. Support different disk type: cdrom, floppy
2. Support different disk mode: none, readonly, shareable
3. Cover more sub test cases
4. Tiny bugs fix

Signed-off-by: Yanbing Du <ydu@redhat.com>
libvirt.test: Raise TestNAError if option not be supported

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.test: Fix a bug for update-device test

Disk maybe doesn't contain source element, use
'disk.source' will get LibvirtXMLNotFoundError.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
snapshot_create_as: Add autodestroy negative case

Add negative test case for snapshot on created autodestroy domain.

Signed-off-by: Wayne Sun <gsun@redhat.com>
snapshot_create_as: Add test case for "snapshot=no" in diskspec option

When snapshot=no given in diskspec, the specific disk will not be taken
snapshot. For support this, check "snapshot=no" in compose_disk_options
function and update cfg file.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virsh_blockcopy: Adjust lookup of mirror in check_xml

In libvirt 1.2.6 the <disk> .. <mirror> element is changing to accomodate
new forthcoming features for blockcopy/blockcommit code (to allow network
copy/commit).  This resulted in a change to the XML output during block
operations. Although back-compat features will keep the "file" attribute
within the <mirror> element - the (now) redundant, but yet desired action
will be to check a new <mirror> attribute "type" in order to determine
how to process a new <source> subelement of <mirror>.  For a "file" the
<source> element will contain the (now) duplicated "file" and "format"
attributes.  For other "type" attributes, the <source> element's attributes
will differ.

This PR will just make use of the new format for 1.2.6 and beyond.  Test
augmentation to perhaps handle block and network block commits is left for
future changes.
Add APIs: fill, fill-dir
virsh.schedinfo: skip checking the output when --config.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
attach_device: Add cases for --persistent and --current.

Signed-off-by: Dongsheng Yang <yangds.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>
libvirt.test: Fix a bug in start test

Perhaps there'is a process 'sleep 60' always exists, so the
original filter will fail to get the right sleep process.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Add APIs: fill-pattern,head,hexdump,more,less,hexedit,display,emacs,pread
Fix pep8
virsh.undefine: adapt undefine to lxc test.

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