Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-05 Thread Zane Bitter
On 01/04/16 12:31, Steven Hardy wrote: On Fri, Apr 01, 2016 at 04:15:30PM +0200, Thomas Herve wrote: On Fri, Apr 1, 2016 at 3:21 AM, Zane Bitter wrote: On 31/03/16 18:10, Zane Bitter wrote: I'm in favour of some sort of variable-based implementation for a few reasons.

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-05 Thread Zane Bitter
On 05/04/16 06:43, Steven Hardy wrote: On Fri, Apr 01, 2016 at 04:39:02PM +, Fox, Kevin M wrote: Why is imperative programming always brought up when discussing conditionals in the templates? We are not wanting anything imperative. The heat engine still picks the final ordering

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-05 Thread Steven Hardy
On Fri, Apr 01, 2016 at 04:39:02PM +, Fox, Kevin M wrote: >Why is imperative programming always brought up when discussing >conditionals in the templates? We are not wanting anything imperative. The >heat engine still picks the final ordering of things. We just want to give >it

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-02 Thread Qiming Teng
> parameters: > env: >type: string >default: prod > > is_prod: > type: boolean > default: {equals: {get_param, env}} > > From an interface standpoint this seems much cleaner and more intuitive than > the other solutions discussed IMHO, but I suspect it's potentially harder

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-01 Thread Fox, Kevin M
) Subject: Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification On Fri, Apr 01, 2016 at 04:15:30PM +0200, Thomas Herve wrote: > On Fri, Apr 1, 2016 at 3:21 AM, Zane Bitter <zbit...@redhat.com> wrote: > > On 31/03/16 18:10, Zane Bitter wrote: > >> > >>

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-01 Thread Fox, Kevin M
: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification On Thu, Mar 31, 2016 at 2:25 PM, Huangtianhua <huangtian...@huawei.com> wrote: > The conditions function has been requested for a long time, and there have > been several previous discussions, which all ended up

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-01 Thread Steven Hardy
On Fri, Apr 01, 2016 at 04:15:30PM +0200, Thomas Herve wrote: > On Fri, Apr 1, 2016 at 3:21 AM, Zane Bitter wrote: > > On 31/03/16 18:10, Zane Bitter wrote: > >> > >> > >> I'm in favour of some sort of variable-based implementation for a few > >> reasons. One is that (5) seems

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-01 Thread Zane Bitter
On 01/04/16 10:15, Thomas Herve wrote: On Fri, Apr 1, 2016 at 3:21 AM, Zane Bitter wrote: On 31/03/16 18:10, Zane Bitter wrote: I'm in favour of some sort of variable-based implementation for a few reasons. One is that (5) seems to come up fairly regularly in a complex

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-04-01 Thread Thomas Herve
On Fri, Apr 1, 2016 at 3:21 AM, Zane Bitter wrote: > On 31/03/16 18:10, Zane Bitter wrote: >> >> >> I'm in favour of some sort of variable-based implementation for a few >> reasons. One is that (5) seems to come up fairly regularly in a complex >> deployment like TripleO.

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Zane Bitter
On 31/03/16 18:10, Zane Bitter wrote: I'm in favour of some sort of variable-based implementation for a few reasons. One is that (5) seems to come up fairly regularly in a complex deployment like TripleO. Another is that Fn::If feels awkward compared to get_variable. I actually have to revise

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Zane Bitter
On 31/03/16 10:10, Thomas Herve wrote: On Thu, Mar 31, 2016 at 2:25 PM, Huangtianhua wrote: The conditions function has been requested for a long time, and there have been several previous discussions, which all ended up in debating the implementation, and no result.

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Fox, Kevin M
+1. This sounds good. The lack of any conditionals at all has caused a lot of pain. Thanks, Kevin From: Huangtianhua Sent: Thursday, March 31, 2016 5:25:29 AM To: OpenStack Development Mailing List (not for usage questions) Subject: [openstack-dev] 答复: [Heat] Re

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Qiming Teng
On Thu, Mar 31, 2016 at 09:21:43AM -0400, Rabi Mishra wrote: > If I understand the suggestion correctly, the only relation it has with > conditions is, > conditions are nothing but variables(boolean). > > conditions: { > 'for_prod': {equals: [{get_param: env_type}, 'prod']} > } > >

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Thomas Herve
On Thu, Mar 31, 2016 at 2:25 PM, Huangtianhua wrote: > The conditions function has been requested for a long time, and there have > been several previous discussions, which all ended up in debating the > implementation, and no result. >

Re: [openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Rabi Mishra
> The conditions function has been requested for a long time, and there have > been several previous discussions, which all ended up in debating the > implementation, and no result. > https://review.openstack.org/#/c/84468/3/doc/source/template_guide/hot_spec.rst >

[openstack-dev] 答复: [Heat] Re-evaluate conditions specification

2016-03-31 Thread Huangtianhua
The conditions function has been requested for a long time, and there have been several previous discussions, which all ended up in debating the implementation, and no result. https://review.openstack.org/#/c/84468/3/doc/source/template_guide/hot_spec.rst