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

2015-07-28 Thread Evgeniy L
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

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

2015-07-28 Thread Sergey Vasilenko
On Mon, Jul 27, 2015 at 1:10 PM, Evgeniy L e...@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

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

2015-07-28 Thread Sergey Vasilenko
On Tue, Jul 28, 2015 at 11:52 AM, Evgeniy L e...@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

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

2015-07-28 Thread Evgeniy L
Hi Sergey, 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 as I know there is no way in Jinja to disable all of the functionality except just substitution. If we need only substitution, probably

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

2015-07-28 Thread Aleksey Kasatkin
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

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

2015-07-28 Thread Alexander Kostrikov
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

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

2015-07-28 Thread Sergey Vasilenko
If we need only substitution, probably it's better to use standard templating in python [1], there is a way to redefine tokens, so you will be able to use % % syntax if you want to. [1] https://docs.python.org/2.6/library/string.html#template-strings

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

2015-07-28 Thread Aleksey Kasatkin
AFAIU, string.Template doesn't help. This seems to be helpful: import re def interp(string, params): for item in re.findall(r'#\{([^}]*)\}', string): string = string.replace('#{%s}' % item, str(eval(item, {}, params))) return string Evgeniy, do you know some better options for this?

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

2015-07-28 Thread Aleksey Kasatkin
Evgeniy, do we need to remove jinja before July 30th ? Aleksey Kasatkin On Tue, Jul 28, 2015 at 6:40 PM, Aleksey Kasatkin akasat...@mirantis.com wrote: AFAIU, string.Template doesn't help. This seems to be helpful: import re def interp(string, params): for item in

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

2015-07-28 Thread Evgeniy L
Aleksey, here is working version [1]. Evgeniy, do we need to remove jinja before July 30th ? With this issue feature can leave, and it won't have huge user impact. At the same time by design we didn't want to have anything except substitution, hence it's probably as Sergey mentioned is a bug.

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

2015-07-28 Thread Aleksey Kasatkin
Okey, will do fix for validation first. Aleksey Kasatkin On Tue, Jul 28, 2015 at 7:30 PM, Evgeniy L e...@mirantis.com wrote: Aleksey, here is working version [1]. Evgeniy, do we need to remove jinja before July 30th ? With this issue feature can leave, and it won't have huge user

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

2015-07-28 Thread Aleksey Kasatkin
Evgeniy, thank you for solution proposal. Aleksey Kasatkin On Tue, Jul 28, 2015 at 7:39 PM, Aleksey Kasatkin akasat...@mirantis.com wrote: Okey, will do fix for validation first. Aleksey Kasatkin On Tue, Jul 28, 2015 at 7:30 PM, Evgeniy L e...@mirantis.com wrote: Aleksey, here is

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

2015-07-28 Thread Sergey Vasilenko
On Tue, Jul 28, 2015 at 7:13 PM, Aleksey Kasatkin akasat...@mirantis.com wrote: Evgeniy, do we need to remove jinja before July 30th ? I think -- not. It just a bug, not a key-point of feature. /sv __ OpenStack

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

2015-07-27 Thread Aleksey Kasatkin
It's not clear though. The date for landing of all the patches was set 28th (tomorrow) but it took into account only patch to CLI actually as other 2 from the initial letter were merged on 23th. These two more things (validation + tokens) could barely be completed tomorrow. AFAIC, at least

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

2015-07-27 Thread Evgeniy L
Aleksey, could you please propose another date which also includes validation? On Mon, Jul 27, 2015 at 1:02 PM, Aleksey Kasatkin akasat...@mirantis.com wrote: It's not clear though. The date for landing of all the patches was set 28th (tomorrow) but it took into account only patch to CLI

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

2015-07-27 Thread Evgeniy L
Igor, 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. [1]

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

2015-07-27 Thread Aleksey Kasatkin
Evgeniy, I need some response in https://bugs.launchpad.net/fuel/+bug/1476779 AFAIC, it can be 30th (Thursday) for basic validation of template itself (regardless of present nodes and their node roles) but including known node roles/network roles for particular environment. Aleksey Kasatkin On

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

2015-07-27 Thread Evgeniy L
So, to summarise, +1 from me, we accept the changes which are required for the feature as feature freeze exceptions: 1. Fuel client changes [1] 2. Validation [2] 3. Change tokens in template language Sebastian, Igor, correct? [1] https://review.openstack.org/#/c/204321/ [2]

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

2015-07-27 Thread Sebastian Kalinowski
Yes, exactly like that. +1 2015-07-27 10:53 GMT+02:00 Evgeniy L e...@mirantis.com: So, to summarise, +1 from me, we accept the changes which are required for the feature as feature freeze exceptions: 1. Fuel client changes [1] 2. Validation [2] 3. Change tokens in template language

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

2015-07-27 Thread Igor Kalnitsky
Evgeniy, 3. Change tokens in template language I'm not sure what do you mean here. Could you please clarify? Perhaps I missed something. Thanks, Igor On Mon, Jul 27, 2015 at 11:53 AM, Evgeniy L e...@mirantis.com wrote: So, to summarise, +1 from me, we accept the changes which are required

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

2015-07-24 Thread Aleksey Kasatkin
Yes, it is the only CR left (https://review.openstack.org/#/c/204321/). It is tested manually, is on review and should be merged today or the next workday. Aleksey Kasatkin On Thu, Jul 23, 2015 at 9:18 PM, Mike Scherbakov mscherba...@mirantis.com wrote: Looks like the only CLI part left:

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

2015-07-24 Thread Evgeniy L
Hi, Since the feature is essential, and changes are small, we can accept it as a, feature freeze exceptions. But as far as I know there is a very important ticket [1] which was created in order to get patches merged faster, also I still have concerns regarding to ERB style template % if3 % which

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

2015-07-24 Thread Igor Kalnitsky
Greetings, The issue [1] looks like a feature to me. I'd move it to next release. Let's focus on what's important right now - stability. Thanks, Igor [1]: https://bugs.launchpad.net/fuel/+bug/1476779 On Fri, Jul 24, 2015 at 11:53 AM, Evgeniy L e...@mirantis.com wrote: Hi, Since the feature

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

2015-07-24 Thread Evgeniy L
Hi Igor, I don't agree with you, some basic validation is essential part of any handler and our API, currently it's easy to get meaningless 500 error (which is unhandled exception) from the backend or get the error that there is something wrong with the template only after you press deploy

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

2015-07-24 Thread Sebastian Kalinowski
I agree here with Evgeniy. Even if it's not a trivial change, we cannot leave a new API in such shape. 2015-07-24 11:41 GMT+02:00 Evgeniy L e...@mirantis.com: Hi Igor, I don't agree with you, some basic validation is essential part of any handler and our API, currently it's easy to get

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

2015-07-24 Thread Evgeniy L
Aleksey, Yes, my point is those parts should be also included in the scope of FFE. Regarding to template format, it's easy to fix and after release you will not be able to change it, or you can change it, but you will have to support both format, not to brake backward compatibility. So I would

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

2015-07-24 Thread Andrew Woodward
Igor, https://bugs.launchpad.net/fuel/+bug/1476779 must be included in the FFE if you think it's a feature. Networking is the most complicated and frustrating thing the user can work with. If we cant provide usable feedback from bad data in the template then the feature is useless. I could argue

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

2015-07-24 Thread Aleksey Kasatkin
I agree, guys, we need at least some basic validation for template when it is being loaded. Ivan Kliuk started to work on this task. And we agreed to test other types of delimiters (it is regarding ERB style template) but we have some more important issues. Evgeniy, is your meaning to include

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

2015-07-23 Thread Mike Scherbakov
Looks like the only CLI part left: https://review.openstack.org/#/c/204321/, and you guys did a great job finishing the other two. Looks like we'd need to give FF exception, as this is essential feature. It's glad that we merged all other thousands lines of code. This is the most complex feature,

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

2015-07-22 Thread Aleksey Kasatkin
Team, I would like to request an exception from the Feature Freeze for Templates for Networking feature [1]. Exception is required for two CRs to python-fuelclient: [2],[3] and one CR to fuel-web (Nailgun): [4]. These CRs are for adding ability to create/remove networks via API [4] and for