autotest/virt-test — pull request #218 by cevich (2013-02-26 20:10:17+00:00)
Title: Libvirt_xml module to package + Major Read/Codeability enhancements

(From git log...)
virt-libvirt: Fixup tests for updated libvirt_xml
virt-libvirt: Reapply dropped libvirt_xml patches

virt-libvirt: Update libvirt_xml_unittest
* Added new testcase class to test the accessors module
* Updated all classes to use package/submodules
* Updated all classes to use accessors module fully

virt-libvirt: Package libvirt_xml w/ accessor generator
The module was growing too rapidly to be contained within a single
module and remain comprehensible. Also The vast majority of
libvirt's XML can be operated on via a small collection of
common operations. For example adding/removing a single tag
somewhere in the tree.
* Break libvirt_xml into a package, with submodules containing
updated versions of the original classes.
* Impliment an accessor submodule to consolidates common
operations into generator classes of callable subclass instances.
* The LibvirtXMLBase base-class is utilized by many subclasses
soas to avoid circular dependencies, it was moved into its
own 'base' module.
* All exception definitions would also have caused circular
dependencies, so they were moved to a dedicated xcepts module.
* The LibvirtXML class (for working with 'capabilities') was
moved into a sub-module and updated to use the accessors module.
* The network_xml module now fully support all basic aspects of
libvirt's host-network XML format. It was updated extensivly
to make use of common accessor methods. New classes were added
to help handle IP addresses and associated DHCP ranges for XML bridge
description.
* The VMXML class was moved to the vm_xml module where it remains
fairly basic/unchanged for now. Becides converting classes to
use the new accessor methods, little else was changed.

virt: Small propcan module tweaks
* Updated docs
* Separated out Semi-private methods from PropcanBase class
to reduce pylint noise coming from other modules.
* Changed __setitem__ to disallow setting properties not defined in
__slots__ (as was original intention of class)

virt: Add method to rebase an XML element to root
This is a convenience when you want some behavior to
only operate on a subtree of an XML document as if
it were a separate XML tree.

This functionality is provided by a 'private' name
in the ElementTree module to protect users from
some negative implications. This method masks
those negative aspects and provides a public name.