[openstack-dev] [fuel] FF Exception request for Templates for Networking feature
eli at mirantis.com
Tue Jul 28 10:02:36 UTC 2015
Thanks, now I see why we had misunderstanding. The problem is currently
all set of features which Jinja2 provides is available for the user. As far
I know there is no way in Jinja to disable all of the functionality except
If we need only substitution, probably it's better to use standard
in python , there is a way to redefine tokens, so you will be able to use
<% %> syntax if you want to.
On Tue, Jul 28, 2015 at 12:25 PM, Sergey Vasilenko <svasilenko at mirantis.com>
> 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
>> >>  - 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.
>> >>  - 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
>> with all it's features and here is the proof .
> We don't promise use Junja (or whatever) template language for this
> 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.
>> >>  - 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
> 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
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev