On Sunday, February 5, 2012 at 9:31 PM, Cole Robinson wrote:
Koan uses the virtinst library for creating libvirt VMs. This is thesame code that virt-install and virt-manager use for a lot of theirlibvirt interaction.Problem is this virtinst never should have been a public API, it wasdesigned without much thought, and attempting to maintain back compatall these years hasn't really done much good.On the flip side, virt-install very much is intended to be a stableAPI: there are far more people out there using virt-install for scriptingand we plan on keeping those scripts working as long as possible.virtinst should really be an implementation detail of virt-install.So along that line of thinking, I want to deprecate virtinst as a publicAPI, and keep it private to virt-* tools. So here is a patch seriesswapping koan from virtinst to generating a virt-install command line.Ideally this patch makes it into fedora before march so I can deprecatevirtinst in upcoming fedora 17.In the process, I add unit testing and unify most of the libvirt koancode, so hopefully things are in a better state than before.One fairly sizable caveat though is that I haven't _actually_ testedkoan: unit tests prove it is doing something useful reality can alwaysbe different. Though judging by the state of the koan code I don't thinkit's getting a lot of usage, at least the imagecreate module hasbeen outright broken for near 6 months.Cole Robinson (5):setup.py: Add stub 'test' commandkoan: vmware: Drop unused importskoan: Port xen creation to virt-installkoan: Port qcreate to virt-installkoan: port imagecreate to virt-install.gitignore | 1 +koan/imagecreate.py | 171 +--------------------------koan/qcreate.py | 210 +--------------------------------koan/virtinstall.py | 289 +++++++++++++++++++++++++++++++++++++++++++++koan/vmwcreate.py | 7 +-koan/xencreate.py | 173 +--------------------------setup.py | 51 ++++++++-tests/koan/__init__.py | 1 +tests/koan/virtinstall.py | 128 ++++++++++++++++++++9 files changed, 484 insertions(+), 547 deletions(-)create mode 100755 koan/virtinstall.pycreate mode 100644 tests/koan/__init__.pycreate mode 100644 tests/koan/virtinstall.py--1.7.7.5_______________________________________________cobbler mailing list