Add attach_disk and dettach_disk in VM class.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add a method named 'sync' to VMXML class.

Lots of times to call vmxml.undefine() and vmxml.define(), to
make our config in vmxml take effect in vm.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add test for svirt attach disk.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
virttest.test_setup: Improve error message

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_vm: Fix coding style

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_vm: Fix error in string repr of MigrateError

The problem was that the arguments for the string interpolation
were not passed as a tuple, as they should. When hitting
an unknown migration protocol error, the return would raise
a TypeError. Let's fix it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
physical_resources_check: Convert exceptions to strings before concatenation

There might be an occasion where we get the following
error:

TypeError: unsupported operand type(s) for +: 'MonitorProtocolError' and 'str'

So let's try to convert the exception class to a string
first.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
bootstrap: Create gpg directory upon data dir creation

Since a GPG file is a user provided data (like isos
and guest images), it makes more sense to have it
under shared/data/gpg than shared/gpg. So remove the
later and fix things in the bootstrap module.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt-libvirt: Add floppy test for virsh change-media

Since "change-media" command is for cdrom and floppy,
only test cdrom is not enough, so I added test cases
for floppy.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>