<HTML>
<HEAD>
<TITLE>Re: [Openstack] Tempita usage?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Cool,<BR>
<BR>
Maybe I can get a branch out there that u can start hooking in by early feb.<BR>
<BR>
That would seem like a good use of time :-)<BR>
<BR>
On 1/6/12 3:21 AM, "Daniel P. Berrange" <<a href="berrange@redhat.com">berrange@redhat.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On Thu, Jan 05, 2012 at 10:33:00AM -0800, Joshua Harlow wrote:<BR>
> Hmmm, so the RNG schemas aren't stable? Is that basically<BR>
> the problem there (or part of it)? That seems not so good,<BR>
> since I thought the whole point of publishing schemas was<BR>
> for people to use them, darn :(<BR>
<BR>
Well there are two different things here to be considered:<BR>
<BR>
 1. The XML document described by the schema<BR>
 2. The XML schema itself<BR>
<BR>
Item 1 is long term stable, item 2 is not stable.<BR>
<BR>
> This libvirt-gconfig does sound good though, is there anyway<BR>
> we can get the dependencies relaxed to versions that other<BR>
> distributions can actually handle (without having more<BR>
> dependencies that need to be custom built). Is there a need<BR>
> for the glib dependency to be that recent (or is the gobject<BR>
> introspection-stuff just that new?).<BR>
<BR>
Unfortunately the only way would be to custom compile a new<BR>
glib + gobject introspection stuff for old distros. While the<BR>
introspection stuff has been in development for a year or two,<BR>
it was only declared stable at approx the same time GNOME 3<BR>
was released.<BR>
<BR>
> Still though I think what the above does is still just provide the lower level or the idea I was thinking:<BR>
><BR>
> The three levels were:<BR>
><BR>
><BR>
>  1.  Object format that contains methods/properties for exactly what we use with libvirt<BR>
>     *   Not connected to #2 or #3 in any way<BR>
>  2.  Formatter layer that takes in #1 and outputs a string/file (or something similar) using various #3 lower level formats<BR>
>     *   One formatter could be a TempitaLibvirtFormatter<BR>
>     *   Second could be RngLibvirtFormatter (or GconfigLibvirtFormatter when that happens...)<BR>
>  3.  Lower level objects/libraries<BR>
>     *   This would be where RNG->python objects would live or the libvirt-gconfig objects<BR>
>     *   This could also use a tempita library<BR>
><BR>
> Right now basically there is libvirt/connection.py which<BR>
> interacts with #3 (tempita), instead of interacting with #1.<BR>
> So this could be phased, get #1, #2, #3 working with the current<BR>
> stuff (actually a simplified tempita since I really want to get<BR>
> rid of the usage of tempita as a mini-scripting language, since<BR>
> the last time I checked we are in python to begin with). #3 could<BR>
> then use this simplified tempita template, until this libvirt-gconfig<BR>
> comes along (is there a timeline for that?).<BR>
><BR>
> Thoughts?<BR>
<BR>
This sounds like a good abstraction idea, since it is cleanly separating<BR>
out domain configuration from the LibvirtConnection class. So IIUC, the<BR>
'to_xml' method in LibvirtConnection would get an instance of the<BR>
abstract LibvirtDomainFormatter class, and call a to_xml() like method<BR>
on that todo the formatting. We could start with a simple subclass called<BR>
LibvirtTempitaDomaiNFormatter which just contains the current code from<BR>
_prepare_xml_info. Then in the future we would then introduce new subclasses<BR>
like LibvirtGConfigDomainFormatter, or whatever else we like.<BR>
<BR>
WRT to libvirt-gconfig, my intention was to start experimenting on an<BR>
Nova impl using that towards the end of January / early Feb.<BR>
<BR>
Daniel<BR>
--<BR>
|: <a href="http://berrange.com">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/">http://www.flickr.com/photos/dberrange/</a> :|<BR>
|: <a href="http://libvirt.org">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org">http://virt-manager.org</a> :|<BR>
|: <a href="http://autobuild.org">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/">http://search.cpan.org/~danberr/</a> :|<BR>
|: <a href="http://entangle-photo.org">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc">http://live.gnome.org/gtk-vnc</a> :|<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>