[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [RFC] virtinst: build libvirt storage xml



On Wed, Jul 23, 2008 at 11:51:40AM -0400, Cole Robinson wrote:
> I've been working on a virtinst API to build and install xml
> for libvirt storage objects. The current version is attached:
> so far only nfs, filesystem and dir pools are implemented, as
> well as their associated file volumes, but the remainder will
> be mostly a cut and paste job. I have some UI wizards for 
> building these in virt-manager mostly complete, so this has
> been tested to be pretty solid, though there is still some clean
> up that needs doing.

I think this is generally sound - the proof of any such API is how well
it suits its users, so if it works well for virt-manager and virt-install
CLI then go for it.

> The general workflow is as follows:
> 
> =========================================
> import virtinst.Storage.StoragePool as sp
> 
> # This gives the appropriate class for the specified pool type
> pool_class = sp.get_pool_class(sp.TYPE_FOO)
> 
> # Only required params are a conn/uri and name. Default formats
> # and target paths have default values, but source paths/
> # devices and hostnames obviously have no sensible default, but
> # they still aren't required for object instantiation
> pool = pool_class(name="foo", uri="xen:///")

Should proably allow a existing connection to be passed in, otherwise
this class has to deal with authentication issues too.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]