[openstack-dev] [fuel] FF Exception request for Templates for Networking feature

Aleksey Kasatkin akasatkin at mirantis.com
Tue Jul 28 10:13:41 UTC 2015


>
> We don't promise use Junja (or whatever) template language for this
> feature.
> If some jinja features allowed for parsing Network template -- it's a bug.
> We should check it and fix it.
> Only value substitutions should allow in the network templates.
>

Yes, we just use jinja for values substitution. We could replace it with
anything else suitable here.
I don't see any reason to stick to jinja anyhow.

That is not correct, every template has it's own syntax, so people have to
> care about
> specific implementation i.e. Jinja or ERB, and there will be confusion
> when somebody will
> try to use ERB specific features, and she/he will fail because you hide
> Jinja under ERB
> syntax.
>

Format of template should be defined in docs finally. It is defined in spec
and there is explanation in slides for Demo.
It is not about jinja or ERB. It is just a token for substitution of
values. There is no jinja nor ERB features granted within template language.



Aleksey Kasatkin


On Tue, Jul 28, 2015 at 12:25 PM, Sergey Vasilenko <svasilenko at mirantis.com>
wrote:

>
> On Tue, Jul 28, 2015 at 11:52 AM, Evgeniy L <eli at mirantis.com> wrote:
>
>> Hi Alexander, I don't agree with your statements
>>
>> >> [1] - I just uses <% and %> to substitute values.
>>
>> It's what templating is about, you have some text preprocessor to
>> substitute values.
>>
>
> Network templates feature don't mean any  "text preprocessor" actions.
> Only value substitutions
>
>
>> >> That is not ERB style template language.
>>
>> ERB uses the same syntax, hence it Is ERB style.
>>
>
> ... hence it looks like ERB. not more.
> Not only ruby used for programming. Non only EBD -- is template language.
> ;)
>
>
>> >> [2] - We are not using Jinja templating (it is just yaml file, not
>> html template), we are using Jinja placeholder substitution.
>>
>> We *are using* jinja templating (I don't understand why you mention here
>> html),
>> with all it's features and here is the proof [1].
>>
>
> We don't promise use Junja (or whatever) template language for this
> feature.
> If some jinja features allowed for parsing Network template -- it's a bug.
> We should check it and fix it.
> Only value substitutions should allow in the network templates.
>
>
>> >> [3] - Templates are for people who do not care about Jinja/ERB (maybe
>> some familiar with Puppet/Chef), so no confusion.
>>
>> That is not correct, every template has it's own syntax, so people have
>> to care about
>> specific implementation i.e. Jinja or ERB, and there will be confusion
>> when somebody will
>> try to use ERB specific features, and she/he will fail because you hide
>> Jinja under ERB
>> syntax.
>>
>
> I, partially, agree with you. But please honored to following facts:
> * In the deployers world used Jinja and ERB syntax.
> * ERB used more often, because Ansible (I don't know another popular
> deployers tools with Jinja templating) is to young.
> * Plenty of syntax features is a really hell.
>
> In the Network templates we don't suppose anything other than a simple
> substitution variable values.
> All logic of template processing implementing on Nailgun side. Now on the
> template parsing, later -- on the network manipulation class.
> Allowance of mix template language and Nailgun logic may lead to heavy
> diagnostic issues.
> Meantime I don't see any cases, where required something more, than
> substitution.
>
>
>
> /sv
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150728/0a77c131/attachment.html>


More information about the OpenStack-dev mailing list