Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Doug Hellmann
Well, yeah. I have my opinion, too, since I've used a few of these in the
past. But I was trying to encourage a bit of discussion, rather than just
settling on whatever template library made it through the review process in
openstack/requirements first. :-)

For example, I'm less concerned with how "easy" the language is to use and
than I am with how actively maintained the library is and how widely it is
used elsewhere. Runtime performance will matter more in some cases than
others (it doesn't seem like generating configuration files needs to be all
that fast, compared to web pages).

Doug


On Tue, Jul 16, 2013 at 1:58 PM, Sandy Walsh wrote:

>  There's a ton of reviews/comparisons out there, only a google away.
>
>
>  --
> *From:* Doug Hellmann [doug.hellm...@dreamhost.com]
> *Sent:* Tuesday, July 16, 2013 1:45 PM
>
> *To:* OpenStack Development Mailing List
> *Subject:* Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja
>
>   Great, I think I had the Mako syntax mixed up with a different
> templating language that depended on having a DOM to work on.
>
>  Can someone put together a more concrete analysis than "this is working"
> so we can compare the tools? :-)
>
>  Doug
>
> On Tue, Jul 16, 2013 at 12:29 PM, Nachi Ueno  wrote:
>
>> Hi Doug
>>
>> Mako looks OK for config generation
>> This is code in review.
>>
>> https://review.openstack.org/#/c/33148/23/neutron/services/vpn/device_drivers/template/ipsec.conf.template
>>
>>
>>
>> 2013/7/16 Doug Hellmann :
>>  >
>> >
>> >
>> > On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange <
>> berra...@redhat.com>
>> > wrote:
>> >>
>> >> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
>> >> > (This email is with regards to
>> https://review.openstack.org/#/c/36316/)
>> >> >
>> >> > Hello All,
>> >> >
>> >> > I have been implementing the Guru Meditation Report blueprint
>> >> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report
>> ),
>> >> > and the question of a templating engine was raised.  Currently, my
>> >> > version of the code includes the Jinja2 templating engine
>> >> > (http://jinja.pocoo.org/), which is modeled after the Django
>> >> > templating engine (it was designed to be an implementation of the
>> >> > Django templating engine without requiring the use of Django), which
>> >> > is used in Horizon.  Apparently, the Cheetah templating engine
>> >> > (http://www.cheetahtemplate.org/) is used in a couple places in
>> Nova.
>> >> >
>> >> > IMO, the Jinja template language produces much more readable
>> templates,
>> >> > and I think is the better choice for inclusion in the Report
>> framework.
>> >> >  It also shares a common format with Django (making it slightly
>> easier
>> >> > to write for people coming from that area), and is also similar to
>> >> > template engines for other languages. What does everyone else think?
>> >>
>> >> Repeating my comments from the review...
>> >>
>> >> I don't have an opinion on whether Jinja or Cheetah is a better
>> >> choice, since I've essentially never used either of them (beyond
>> >> deleting usage of ceetah from libvirt). I do, however, feel we
>> >> should not needlessly use multiple different templating libraries
>> >> across OpenStack. We should take care to standardize on one option
>> >> that is suitable for all our needs. So if the consensus is that
>> >> Jinja is better, then IMHO, there would need to be an blueprint
>> >> + expected timeframe to port existing Ceetah usage to use Jinja.
>> >>
>> >> Regards,
>> >> Daniel
>> >
>> >
>> > The most current release of Cheetah is from 2010. I don't have a problem
>> > adding a new dependency on a tool that is actively maintained, with a
>> plan
>> > to migrate off of the older tool to come later.
>> >
>> > The Neutron team seems to want to use Mako
>> > (https://review.openstack.org/#/c/37177/). Maybe we should pick one?
>> Keep in
>> > mind that we won't always be generating XML or HTML, so my first
>> question is
>> > "how well does Mako work for plain text?"
>> >
>> > Doug
>> >
>> >>
>> >> -

Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Sandy Walsh
There's a ton of reviews/comparisons out there, only a google away.



From: Doug Hellmann [doug.hellm...@dreamhost.com]
Sent: Tuesday, July 16, 2013 1:45 PM
To: OpenStack Development Mailing List
Subject: Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

Great, I think I had the Mako syntax mixed up with a different templating 
language that depended on having a DOM to work on.

Can someone put together a more concrete analysis than "this is working" so we 
can compare the tools? :-)

Doug

On Tue, Jul 16, 2013 at 12:29 PM, Nachi Ueno 
mailto:na...@ntti3.com>> wrote:
Hi Doug

Mako looks OK for config generation
This is code in review.
https://review.openstack.org/#/c/33148/23/neutron/services/vpn/device_drivers/template/ipsec.conf.template



2013/7/16 Doug Hellmann 
mailto:doug.hellm...@dreamhost.com>>:
>
>
>
> On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange 
> mailto:berra...@redhat.com>>
> wrote:
>>
>> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
>> > (This email is with regards to https://review.openstack.org/#/c/36316/)
>> >
>> > Hello All,
>> >
>> > I have been implementing the Guru Meditation Report blueprint
>> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
>> > and the question of a templating engine was raised.  Currently, my
>> > version of the code includes the Jinja2 templating engine
>> > (http://jinja.pocoo.org/), which is modeled after the Django
>> > templating engine (it was designed to be an implementation of the
>> > Django templating engine without requiring the use of Django), which
>> > is used in Horizon.  Apparently, the Cheetah templating engine
>> > (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
>> >
>> > IMO, the Jinja template language produces much more readable templates,
>> > and I think is the better choice for inclusion in the Report framework.
>> >  It also shares a common format with Django (making it slightly easier
>> > to write for people coming from that area), and is also similar to
>> > template engines for other languages. What does everyone else think?
>>
>> Repeating my comments from the review...
>>
>> I don't have an opinion on whether Jinja or Cheetah is a better
>> choice, since I've essentially never used either of them (beyond
>> deleting usage of ceetah from libvirt). I do, however, feel we
>> should not needlessly use multiple different templating libraries
>> across OpenStack. We should take care to standardize on one option
>> that is suitable for all our needs. So if the consensus is that
>> Jinja is better, then IMHO, there would need to be an blueprint
>> + expected timeframe to port existing Ceetah usage to use Jinja.
>>
>> Regards,
>> Daniel
>
>
> The most current release of Cheetah is from 2010. I don't have a problem
> adding a new dependency on a tool that is actively maintained, with a plan
> to migrate off of the older tool to come later.
>
> The Neutron team seems to want to use Mako
> (https://review.openstack.org/#/c/37177/). Maybe we should pick one? Keep in
> mind that we won't always be generating XML or HTML, so my first question is
> "how well does Mako work for plain text?"
>
> Doug
>
>>
>> --
>> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/
>> :|
>> |: http://libvirt.org  -o- http://virt-manager.org
>> :|
>> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/
>> :|
>> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc
>> :|
>>
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.org<mailto:OpenStack-dev@lists.openstack.org>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org<mailto:OpenStack-dev@lists.openstack.org>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org<mailto:OpenStack-dev@lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Doug Hellmann
Great, I think I had the Mako syntax mixed up with a different templating
language that depended on having a DOM to work on.

Can someone put together a more concrete analysis than "this is working" so
we can compare the tools? :-)

Doug

On Tue, Jul 16, 2013 at 12:29 PM, Nachi Ueno  wrote:

> Hi Doug
>
> Mako looks OK for config generation
> This is code in review.
>
> https://review.openstack.org/#/c/33148/23/neutron/services/vpn/device_drivers/template/ipsec.conf.template
>
>
>
> 2013/7/16 Doug Hellmann :
> >
> >
> >
> > On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange  >
> > wrote:
> >>
> >> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
> >> > (This email is with regards to
> https://review.openstack.org/#/c/36316/)
> >> >
> >> > Hello All,
> >> >
> >> > I have been implementing the Guru Meditation Report blueprint
> >> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
> >> > and the question of a templating engine was raised.  Currently, my
> >> > version of the code includes the Jinja2 templating engine
> >> > (http://jinja.pocoo.org/), which is modeled after the Django
> >> > templating engine (it was designed to be an implementation of the
> >> > Django templating engine without requiring the use of Django), which
> >> > is used in Horizon.  Apparently, the Cheetah templating engine
> >> > (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
> >> >
> >> > IMO, the Jinja template language produces much more readable
> templates,
> >> > and I think is the better choice for inclusion in the Report
> framework.
> >> >  It also shares a common format with Django (making it slightly easier
> >> > to write for people coming from that area), and is also similar to
> >> > template engines for other languages. What does everyone else think?
> >>
> >> Repeating my comments from the review...
> >>
> >> I don't have an opinion on whether Jinja or Cheetah is a better
> >> choice, since I've essentially never used either of them (beyond
> >> deleting usage of ceetah from libvirt). I do, however, feel we
> >> should not needlessly use multiple different templating libraries
> >> across OpenStack. We should take care to standardize on one option
> >> that is suitable for all our needs. So if the consensus is that
> >> Jinja is better, then IMHO, there would need to be an blueprint
> >> + expected timeframe to port existing Ceetah usage to use Jinja.
> >>
> >> Regards,
> >> Daniel
> >
> >
> > The most current release of Cheetah is from 2010. I don't have a problem
> > adding a new dependency on a tool that is actively maintained, with a
> plan
> > to migrate off of the older tool to come later.
> >
> > The Neutron team seems to want to use Mako
> > (https://review.openstack.org/#/c/37177/). Maybe we should pick one?
> Keep in
> > mind that we won't always be generating XML or HTML, so my first
> question is
> > "how well does Mako work for plain text?"
> >
> > Doug
> >
> >>
> >> --
> >> |: http://berrange.com  -o-
> http://www.flickr.com/photos/dberrange/
> >> :|
> >> |: http://libvirt.org  -o-
> http://virt-manager.org
> >> :|
> >> |: http://autobuild.org   -o-
> http://search.cpan.org/~danberr/
> >> :|
> >> |: http://entangle-photo.org   -o-
> http://live.gnome.org/gtk-vnc
> >> :|
> >>
> >> ___
> >> OpenStack-dev mailing list
> >> OpenStack-dev@lists.openstack.org
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> >
> >
> > ___
> > OpenStack-dev mailing list
> > OpenStack-dev@lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Nachi Ueno
Hi Doug

Mako looks OK for config generation
This is code in review.
https://review.openstack.org/#/c/33148/23/neutron/services/vpn/device_drivers/template/ipsec.conf.template



2013/7/16 Doug Hellmann :
>
>
>
> On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange 
> wrote:
>>
>> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
>> > (This email is with regards to https://review.openstack.org/#/c/36316/)
>> >
>> > Hello All,
>> >
>> > I have been implementing the Guru Meditation Report blueprint
>> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
>> > and the question of a templating engine was raised.  Currently, my
>> > version of the code includes the Jinja2 templating engine
>> > (http://jinja.pocoo.org/), which is modeled after the Django
>> > templating engine (it was designed to be an implementation of the
>> > Django templating engine without requiring the use of Django), which
>> > is used in Horizon.  Apparently, the Cheetah templating engine
>> > (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
>> >
>> > IMO, the Jinja template language produces much more readable templates,
>> > and I think is the better choice for inclusion in the Report framework.
>> >  It also shares a common format with Django (making it slightly easier
>> > to write for people coming from that area), and is also similar to
>> > template engines for other languages. What does everyone else think?
>>
>> Repeating my comments from the review...
>>
>> I don't have an opinion on whether Jinja or Cheetah is a better
>> choice, since I've essentially never used either of them (beyond
>> deleting usage of ceetah from libvirt). I do, however, feel we
>> should not needlessly use multiple different templating libraries
>> across OpenStack. We should take care to standardize on one option
>> that is suitable for all our needs. So if the consensus is that
>> Jinja is better, then IMHO, there would need to be an blueprint
>> + expected timeframe to port existing Ceetah usage to use Jinja.
>>
>> Regards,
>> Daniel
>
>
> The most current release of Cheetah is from 2010. I don't have a problem
> adding a new dependency on a tool that is actively maintained, with a plan
> to migrate off of the older tool to come later.
>
> The Neutron team seems to want to use Mako
> (https://review.openstack.org/#/c/37177/). Maybe we should pick one? Keep in
> mind that we won't always be generating XML or HTML, so my first question is
> "how well does Mako work for plain text?"
>
> Doug
>
>>
>> --
>> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/
>> :|
>> |: http://libvirt.org  -o- http://virt-manager.org
>> :|
>> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/
>> :|
>> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc
>> :|
>>
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Doug Hellmann
On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange wrote:

> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
> > (This email is with regards to https://review.openstack.org/#/c/36316/)
> >
> > Hello All,
> >
> > I have been implementing the Guru Meditation Report blueprint
> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
> > and the question of a templating engine was raised.  Currently, my
> > version of the code includes the Jinja2 templating engine
> > (http://jinja.pocoo.org/), which is modeled after the Django
> > templating engine (it was designed to be an implementation of the
> > Django templating engine without requiring the use of Django), which
> > is used in Horizon.  Apparently, the Cheetah templating engine
> > (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
> >
> > IMO, the Jinja template language produces much more readable templates,
> > and I think is the better choice for inclusion in the Report framework.
> >  It also shares a common format with Django (making it slightly easier
> > to write for people coming from that area), and is also similar to
> > template engines for other languages. What does everyone else think?
>
> Repeating my comments from the review...
>
> I don't have an opinion on whether Jinja or Cheetah is a better
> choice, since I've essentially never used either of them (beyond
> deleting usage of ceetah from libvirt). I do, however, feel we
> should not needlessly use multiple different templating libraries
> across OpenStack. We should take care to standardize on one option
> that is suitable for all our needs. So if the consensus is that
> Jinja is better, then IMHO, there would need to be an blueprint
> + expected timeframe to port existing Ceetah usage to use Jinja.
>
> Regards,
> Daniel
>

The most current release of Cheetah is from 2010. I don't have a problem
adding a new dependency on a tool that is actively maintained, with a plan
to migrate off of the older tool to come later.

The Neutron team seems to want to use Mako (
https://review.openstack.org/#/c/37177/). Maybe we should pick one? Keep in
mind that we won't always be generating XML or HTML, so my first question
is "how well does Mako work for plain text?"

Doug


> --
> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/:|
> |: http://libvirt.org  -o- http://virt-manager.org:|
> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/:|
> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc:|
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Change I30b127d6] Cheetah vs Jinja

2013-07-16 Thread Daniel P. Berrange
On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
> (This email is with regards to https://review.openstack.org/#/c/36316/)
> 
> Hello All,
> 
> I have been implementing the Guru Meditation Report blueprint
> (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
> and the question of a templating engine was raised.  Currently, my
> version of the code includes the Jinja2 templating engine
> (http://jinja.pocoo.org/), which is modeled after the Django
> templating engine (it was designed to be an implementation of the
> Django templating engine without requiring the use of Django), which
> is used in Horizon.  Apparently, the Cheetah templating engine
> (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
> 
> IMO, the Jinja template language produces much more readable templates,
> and I think is the better choice for inclusion in the Report framework.
>  It also shares a common format with Django (making it slightly easier
> to write for people coming from that area), and is also similar to
> template engines for other languages. What does everyone else think?

Repeating my comments from the review...

I don't have an opinion on whether Jinja or Cheetah is a better
choice, since I've essentially never used either of them (beyond
deleting usage of ceetah from libvirt). I do, however, feel we
should not needlessly use multiple different templating libraries
across OpenStack. We should take care to standardize on one option
that is suitable for all our needs. So if the consensus is that
Jinja is better, then IMHO, there would need to be an blueprint
+ expected timeframe to port existing Ceetah usage to use Jinja.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev