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

Qiming Teng tengqim at linux.vnet.ibm.com
Thu Mar 31 15:16:53 UTC 2016


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']}
>   }
> 
> would be
> 
> variables:
>    for_prod: {equals: [{get_param: env_type}, prod]}
> 
> 
> then you can use it in your example as:
> 
>     floating_ip:
>       type: OS::Nova::FloatingIP
>       condition: {get_variable: for_prod}
> 
> so suggestion is to make it more generic, so that it can be used for other things
> and reduce some of the verbosity in the templates.
> 
> However, I think the term 'variable' makes is sound more like a programming thing. May
> be we can use something better. However, personally I kind of like the idea.

well ... now I get a better idea about the suggestion. Actually,
'variables' is not that bad in my opinion.

Regards,
 Qiming




More information about the OpenStack-dev mailing list