libvirt.tests: Add volume application test module(part 1).

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
tp-libvirt: Add attach-disk action with created volume

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.test: Add 'mode' test(agent) for virsh reboot

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Add testcases for migration with copy-storage-inc/all.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add unsafe option test for virsh.migrate.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add more testcases for virt-edit options.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh_attach_detach_disk: fix rhel version check.

As we need to run tests not only for rhel guest, we can not
assume "rpm -qa|grep redhat-release" should return 0.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virsh_attach_detach_disk: add test case for --persistent option.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virsh.list: When setting title, add proper option to virsh.desc

Commit id '58fd81a8' added the --title testing for virsh.list; however,
the add of the title was done to the --config and for a running domain
that didn't have expected results. Adjust the add of the title to be
based on the expected state of the domain.

Signed-off-by: John Ferlan <jferlan@redhat.com>
virsh.attach_device: Skip login if vm is not alive

For the case where the vm is not alive, then skip doing the login() call
since there are multiple timeouts in play. One in particular - the call
to wait_for_get_address() has a 300 second timeout. If we fall into that
timeout, we can wait for up to 6 minutes per test run. When there's 16
devices that adds up to 96 minutes of waiting for no good reason.

Signed-off-by: John Ferlan <jferlan@redhat.com>
libvirt.tests: Add test module for timer management.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Test setting of timer's present to no.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add stress relative cases for timer management.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add windows support for timer management.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
update_device: Add changes from prior to split

When tp-libvirt was split from virt-test, all PR's were closed - this
PR is adding back the changes made by myself and cevich from PR #1171.

Adjust the test to use the newer --live option rather than --persistent.

Also fix issue with shut_off_option testing.  When a guest is off, the
failure should only be if someone passed the --live flag.  Add the
shut_off_option testing to the normal_test list and use the diff_file
check to ensure that a shutdown guest would be updated.  The --live
option processing should only affect the running guest and not the
configuration after shutdown

Signed-off-by: John Ferlan <jferlan@redhat.com>
update_device: version-specific behavior

* Added --persistent and --config version-specific behavior checks.
* Updated test to use disk device XML class.
* Re-worked result checking logic to be easier to read

jferlan added cevich's change plus the suggested disk.xmltreefile.write()
call from code review

Signed-off-by: John Ferlan <jferlan@redhat.com>
update_device: Fixes to get things to work

Adjust prior set of changes to make things work.

1. Add a cdrom device to guest
   Not sure if somewhere along the way when the code was first developed
   if the cdrom was part of the guest or not or if some previous test just
   happened to leave one around... In any case, the current code doesn't
   have one for the guest - so I added code to add one

2. Adjust create_attach_xml
   Rather than rely on hardcoded device and bus, pass it along.  Some one
   in the future can do the work to make them more configurable to have
   virtio instead of ide, but for now go with the ide bus & hde device

3. Adjust is_attached
   Pass the device name and fix the indention on the return True; otherwise,
   it was never hit.

4. libvirt_library_version
   Remove the code from here - I actually moved this version of how to parse
   the 'virsh version' output into the provider code (see PR #82). Thus this
   code also makes use of that new code.

5. Moved the state/setup closer to where it's used

6. Modified the flag_list setup code - I found that doing a flag.split("--")
   of an empty flag list (eg. "".split("--")) returned [''] instead of [],
   so I adjusted the logic slightly to account for that.

7. Create the cdrom device in order for it to be updated.  Initial device
   will be "orig.iso" and it'll be changed to "test.iso" or "test_diff.iso".

8. Fix the "diff_iso" logic - it's a boolean not a value

9. Fix the 'inactive_attached' logic to look at the inactive_device

Signed-off-by: John Ferlan <jferlan@redhat.com>
libvirt.test: Add mode(agent) test for shutdown

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
schedinfo_qemu_posix: Add cases change schedinfo by xml

This patch changed cputune info in domain xml and then restart the
domain to validate it with cgroup observation. This is a regression
test base on a known bug.

Also the emulatorpin test is changed to fit new vm_xml.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #81 from Hao-Liu/fix_schedinfo

schedinfo_qemu_posix: Add cases change schedinfo by xml