[openstack-dev] [Mistral] Changing "expression" delimiters in Mistral DSL

Zane Bitter zbitter at redhat.com
Wed Feb 18 15:22:23 UTC 2015


On 16/02/15 16:06, Dmitri Zimine wrote:
> 2) Use functions, like Heat HOT or TOSCA:
>
> HOT templates and TOSCA doesn’t seem to have a concept of typed
> variables to borrow from (please correct me if I missed it). But they
> have functions: function: { function_name: {foo: [parameter1, parameter
> 2], bar:"xxx”}}. Applied to Mistral, it would look like:
>
>      publish:
>       - bool_var: { yaql: “1+1+$.my.var < 100” }
>
> Not bad, but currently rejected as it reads worse than delimiter-based
> syntax, especially in simplified one-line action invocation.

Note that you don't actually need the quotes there, so this would be 
equivalent:

     publish:
      - bool_var: {yaql: 1+1+$.my.var < 100}

FWIW I am partial to this or to Renat's p7 suggestion:

     publish:
      - bool_var: yaql{1+1+$.my.var < 100}

Both offer the flexibility to introduce new syntax in the future without 
breaking backwards compatibility.

cheers,
Zane.



More information about the OpenStack-dev mailing list