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

Evgeniy L eli at mirantis.com
Tue Jul 28 08:52:18 UTC 2015


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.

>> That is not ERB style template language.

ERB uses the same syntax, hence it Is ERB style.

>> [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].

>> And in current code we have a problem with content at first parsed from
yaml and that parser treats { and [ as a start if a dict or an array.

key: "{{blha}}"

>> [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.

[1]
https://github.com/stackforge/fuel-web/blob/master/nailgun/nailgun/objects/node.py#L854-L855


On Tue, Jul 28, 2015 at 11:29 AM, Alexander Kostrikov <
akostrikov at mirantis.com> wrote:

> Completely agree with Sergey.
>
> >Currently network template uses ERB [1] style template language,
> but in fact it's Jinja [2], it was agreed to change it [3], no to confuse
> the user
>
> [1] - I just uses <% and %> to substitute values. That is not ERB style
> template language.
> [2] - We are not using Jinja templating (it is just yaml file, not html
> template), we are using Jinja placeholder substitution. And in current code
> we have a problem with content at first parsed from yaml and that parser
> treats { and [ as a start if a dict or an array.
> [3] - Templates are for people who do not care about Jinja/ERB (maybe some
> familiar with Puppet/Chef), so no confusion.
>
>
>
>
> On Tue, Jul 28, 2015 at 10:57 AM, Sergey Vasilenko <
> svasilenko at mirantis.com> wrote:
>
>>
>> On Mon, Jul 27, 2015 at 1:10 PM, Evgeniy L <eli at mirantis.com> wrote:
>>
>>> Currently network template uses ERB [1] style template language,
>>> but in fact it's Jinja [2], it was agreed to change it [3], no to confuse
>>> the user, with ERB which is in fact jinja and doesn't have any ERB
>>> features.
>>>
>>
>> we have not so much syntax choices for  convenient templating. Network
>> temptales will be used by system administrators.
>> The '<%  %>' pair is a de-facto standart in this area. In the puppet
>> world. Not every system administrator will meaning ERB when seeing '<% %>'
>> pair.
>> Another pairs (i.e. '<$ $>' , '<< >>', etc) looks more
>> non-standart. Plenty of syntax features are annoy and make usability of
>> product less convenient.
>> I propose do not make extra essences on the clean area...
>>
>> We never say in the docs about ERB. IMHO it's enough for leave '<%  %>'
>> as is.
>>
>>
>> /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
>>
>>
>
>
> --
>
> Kind Regards,
>
> Alexandr Kostrikov,
>
> Mirantis, Inc.
>
> 35b/3, Vorontsovskaya St., 109147, Moscow, Russia
>
>
> Tel.: +7 (495) 640-49-04
> Tel.: +7 (925) 716-64-52 <%2B7%20%28906%29%20740-64-79>
>
> Skype: akostrikov_mirantis
>
> E-mail: akostrikov at mirantis.com <elogutova at mirantis.com>
>
> *www.mirantis.com <http://www.mirantis.ru/>*
> *www.mirantis.ru <http://www.mirantis.ru/>*
>
> __________________________________________________________________________
> 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/db00bbe4/attachment.html>


More information about the OpenStack-dev mailing list