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>
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>
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>