shared.cfg: disable jumbo test on SLES.10.4 guest

since SLES.10.4 kernel is too old, not support change MTU > 1500
for virtio-net.
Merge pull request #1037 from spcui/sles10.4_fix

shared.cfg: disable jumbo test on SLES.10.4 guest
virttest.qemu_devices: Fix cdrom filename

CDROM filenames doesn't use suffixes. Use image_raw_device to
get the correct image name.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #1039 from ldoktor/add_device3

virttest.qemu_devices: Fix cdrom filename
virt: propcan clean some old style construction.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: propcan change __slots__ listing to avoid waste a memory.

class X:
   __slots__ = ['a', 'b']

class Y(X):
   __slots__ = X.__slots__ + ['c']

Double declaring of slots causes a waste of memory
and aims to bad manners to slots.

Signed-off-by: Jiří Župka <jzupka@redhat.com>

Conflicts:
	virttest/utils_net.py
	virttest/virsh.py

Conflicts:
	virttest/libvirt_xml/devices/address.py
	virttest/libvirt_xml/network_xml.py
virt: Replace class method with class attribute

There are very few places that need to re-calculate all ancestor
__slots__ values. It's more efficient to just store them as
an instance attribute, set from __new__().  I also updated
all users dependent on the old __slots__ behavior to use
the new __all_slots__ attribute instead.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Make special methods in propcan special

Burried in docstrings are instructions that using propcan's
special dict_set, super_set, etc. methods is for subclasses only
(i.e. not for test-modules!)  One test was doing this, so I assume
the convension is/could/would be lost on other people also.  Renamed
these special methods with double-underscore names to flag them as
being special.  Updated documentation (in case it gets read) also,
but I'm assuming the new names will serve as a better deterance
to using them.

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

Conflicts:
	virttest/virsh.py

Conflicts:
	virttest/libvirt_xml/vm_xml.py
virt-libvirt: virsh_cpu_compare test shouldn't use special methods

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: nodev-xml unittest bugfixes

The unittests were mistakenly relying on the host system's
virsh/libvird state.  Mocked up the used dumpxml method
to make the unittest self-contained.  There was also a bug
in passing the dummy virsh instance in as a positional instead
of named parameter.  API changes were made but unittests never
updated.  They're all passing now.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Fix vm_xml to use new propcan methods

The propcan dict_get, dict_set, dict_del were renamed
with double-underscores in a prior commit, but updating
this module was missed.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Propcan additional fixes

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Fix propcan problems with pickle.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Propcan another fixes in classes for compatibility.

Signed-off-by: Jiří Župka <jzupka@redhat.com>

Conflicts:
	qemu/cfg/multi-host-tests.cfg
	virttest/utils_test.py
virttest.openvswitch: remove the whitespace from the result

Whitespace character("\n") exist in the stdout data, when run
'ovs-vsctl' command in some system. better remove it before return

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.utils_net: check whether ovs is none before using it

Now when using find_current_bridge, if the host not install openvswitch
it will raise like:
AttributeError: 'NoneType' object has no attribute 'port_to_br'

This patch add a check whether ovs is exist before using it.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.qemu_vm: make test loop run correctly when using openvswitch

Currently, when close tap device, it's can not automatically cleaned
from openvswitch-db, sinece openvswitch have it's own userspace db, and
that ovsdb is considered to be only modified by the user. when
qemu exit by error, the ovs will never delete the port from it's
db, even kernel have destroied the port, as a result, when we run a
loop using ovs, it alway raise error for the port already exist.

This patch just add a workaround, make the test loop using ovs
can run normally.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.utils_test: Fix submodule importing

Due to a very bad mistake of mine, I hose the ability
to access utils_test.qemu and utils_test.libvirt. By
importing libvirt and qemu internally those problems
should be fixed. Sorry guys.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.staging: Fix importing problem and interface change

Turns out staging also needed __init__.py fixing. Sorry
about that once again.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_devices: Workaround unsupported -drive addr=...

Antient versions of qemu don't support -drive addr=... option.
This workaround logs and ignores setting of addr.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>