virttest.qemu_vm: Remove init_pci_addr from VM.

Now vm.init_pci_addr is effected by previous vm.

We set init_pci_addr to 3 in multi_disk.max_disk, but this case still
fail for:
VMPCIOutOfRangeError: Too many PCI devices added on vm 'virt-tests-vm1',
 max supported '31'

because previous case use default value 4.

As init_pci_addr only used in get_free_pci_addr, so remove it from vm
 and only get init_pci_addr in get_free_pci_addr().
Also set default for init_pci_addr to 3.

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #527 from FengYang/pci_addr

virttest.qemu_vm: Remove init_pci_addr from VM.
virttest.qemu_storage: Refactoring and new compare_images method

Refactor qemu_storage.QemuImg() so that it's more logical
to query for available qemu-img commands. Also, introduce
a method .compare_images() method that will take 2 images
and compare them using the subcommand 'compare', if it is
available.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.test: merge block_mirror test

* Fix incorrect command when run test with qmp monitor;
* Fix logical error that target image file should not
  be opened before the reopen step;
* Merge configuration file into drive_mirror.cfg
* Use by default upstream block mirror names rather than
  assuming RHEL block mirror names.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Xu Tian <xutian@redhat.com>
virt: Unifies composition of path.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: ignore github report tool cache files

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: lv_xml_devices add emulator XML support

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Fix vm_xml seclabel implementation details

* added del_seclabel accessor method so we have a complete set.

* get_seclabel() accessor method should raise exception
  for non-existant value instead of returning None value.

* set_seclabel() accessor method should not set unspecified
  imput attribute values.

* set_seclabel() should not perform non-data manipulation actions
  (self.define/undefine) since can introduce hidden side-effects.

* Made libvirt_xml_unittests fail tests for any subject-call
  which uses undefined dummy_virsh commands.

* Extended seclabel unittests for multi-mode access and
  exception checking.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Implement stub for all XML devices

Accessing any vm_xml.devices member requiring an undefined
device xml module resulted in an extremely unhelpful error:

AttributeError: "type object 'exceptions.NotImplementedError' has no
attribute 'new_from_element'"

This commit adds a stub-class generating metaclass for undefined
devices.  The generated stub-class provides the minimal required
interface for the higher-level vm_xml.VMXMLDevices class.  Each
stub class will raise one-warning upon first use.  This is to notify
and make clear to all uses of these devices, that the interface
will likely change in the future.

Added unittests to verify functionality of stub-class metaclass.  Also
added plenty of docstrings and docstring updates.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: character device xml docstrings

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Stub-in classes for all device xml

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Simple VMXMLDevices device filter

Also added unittest

Signed-off-by: Chris Evich <cevich@redhat.com>