[openstack-dev] [Heat] HOT software configuration refined after design summit discussions

Zane Bitter zbitter at redhat.com
Tue Nov 12 17:06:14 UTC 2013


On 12/11/13 14:59, Alex Heneveld wrote:
> One minor suggestion is to consider using a special character (eg $)
> rather than reserved keywords.  As I understand it the keywords are only
> interpreted when they exactly match the value of a key in a map, so it
> is already unlikely to be problematic.  However I think it would be more
> familiar and clear if we instead used the rule that any item (key or
> value) which _starts_ with a $ is interpreted specially.  What those
> rules are is TBD but you could for instance write functions -- as either
> `$get_param('xxx')` or `$get_param: xxx` -- as well as allow accessing a
> parameter directly `$xxx `.

This sounds like a nice idea on the surface. AWS accomplished the same 
thing by namespacing functions with the Fn:: prefix (except for 'Ref', 
bizarrely), and it works fine because the chances are if you randomly 
(maybe in a Metadata section) have a dict key that happens to start with 
"Fn::" then you can probably just choose a different name. However, if 
for any reason you have a dict key starting with "$" and we interpret 
that specially, then you are basically hosed since you almost certainly 
_needed_ it to actually start with "$" for a reason. So -1.

cheers,
Zane.



More information about the OpenStack-dev mailing list