<div dir="ltr">Hi Sergey,<div><br></div><div>Thanks, now I see why we had misunderstanding. The problem is currently</div><div>all set of features which Jinja2 provides is available for the user. As far as</div><div>I know there is no way in Jinja to disable all of the functionality except just</div><div>substitution.</div><div><br></div><div>If we need only substitution, probably it's better to use standard templating</div><div>in python [1], there is a way to redefine tokens, so you will be able to use</div><div><% %> syntax if you want to.</div><div><br></div><div>[1] <a href="https://docs.python.org/dev/library/string.html#template-strings">https://docs.python.org/2.6/library/string.html#template-strings</a></div><div>[2] <a href="http://pymotw.com/2/string/#advanced-templates">http://pymotw.com/2/string/#advanced-templates</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 12:25 PM, Sergey Vasilenko <span dir="ltr"><<a href="mailto:svasilenko@mirantis.com" target="_blank">svasilenko@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Jul 28, 2015 at 11:52 AM, Evgeniy L <span dir="ltr"><<a href="mailto:eli@mirantis.com" target="_blank">eli@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Alexander, I don't agree with your statements<div><br></div><div><span><div>>> [1] - I just uses <% and %> to substitute values.</div><div><br></div></span><div>It's what templating is about, you have some text preprocessor to substitute values.</div></div></div></blockquote><div><br></div></span><div>Network templates feature don't mean any  "text preprocessor" actions. Only value substitutions</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span><div></div><div>>> That is not ERB style template language.</div><div><br></div></span><div>ERB uses the same syntax, hence it Is ERB style.</div></div></div></blockquote><div><br></div></span><div>... hence it looks like ERB. not more. </div><div>Not only ruby used for programming. Non only EBD -- is template language. ;)</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span><div>>> [2] - We are not using Jinja templating (it is just yaml file, not html template), we are using Jinja placeholder substitution.<br></div><div><br></div></span><div><div>We *are using* jinja templating (I don't understand why you mention here html),</div><div>with all it's features and here is the proof [1].</div></div></div></div></blockquote><div><br></div></span><div>We don't promise use Junja (or whatever) template language for this feature.</div><div>If some jinja features allowed for parsing Network template -- it's a bug. We should check it and fix it. </div><div>Only value substitutions should allow in the network templates.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span><div>>> [3] - <span>Templates</span> are for people who do not care about Jinja/ERB (maybe some familiar with Puppet/Chef), so no confusion.<br></div></span></div><div><br></div><div>That is not correct, every template has it's own syntax, so people have to care about</div><div>specific implementation i.e. Jinja or ERB, and there will be confusion when somebody will</div><div>try to use ERB specific features, and she/he will fail because you hide Jinja under ERB</div><div>syntax.</div></div></blockquote></span></div><div class="gmail_extra"><br></div>I, partially, agree with you. But please honored to following facts:</div><div class="gmail_extra">* In the deployers world used Jinja and ERB syntax. </div><div class="gmail_extra">* ERB used more often, because Ansible (I don't know another popular deployers tools with Jinja templating) is to young.<br>* <span style="font-size:12.8000001907349px">Plenty of syntax features is a really hell.</span></div><div class="gmail_extra"><br></div><div class="gmail_extra">In the Network templates we don't suppose anything other than a simple substitution variable values. </div><div class="gmail_extra">All logic of template processing implementing on Nailgun side. Now on the template parsing, later -- on the network manipulation class. </div><div class="gmail_extra">Allowance of mix template language and Nailgun logic may lead to heavy diagnostic issues. </div><div class="gmail_extra">Meantime I don't see any cases, where required something more, than substitution.<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br><br clear="all"><div><div><div dir="ltr"><br><div>/sv</div></div></div></div>
</div></font></span></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>