<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Zane, Angus, thanks for your input!</div><div><br></div>This functional based syntax is consisted for dev use. The trouble is it ITSELF needs to be delimited. Without pissing off the users :) Consider two key usage: input parameters and shorthand syntax for action input. That’s why we are looking for two-char symmetric (opening + closing) delimiters. <div><div><br></div><div>task_with_full_syntax_input:</div><div> action: std.ssh</div><div> input: </div><div> cmd = awk '{ print "<% $.my_var %>" }' /etc/passwd</div><div><br></div><div>task_with_shorthand_action_input:</div><div><div> action: std.ssh cmd="awk '{ print \”<% $.my_var %>\" }' /etc/passwd”</div><div><br></div><div>using function-like we still will have to do </div><div> action: std.ssh cmd=“awk '{ print \”<% yaql {$.my_var} %>\" }' /etc/passwd”</div><div>that only adds confusion IMO. </div><div><br></div></div><div>The full set of usages for YAQL in DSL is here: <a href="https://etherpad.openstack.org/p/mistral-YAQL-delimiters">https://etherpad.openstack.org/p/mistral-YAQL-delimiters</a></div><div><br></div><div>DZ. </div><div><br></div><div><div>On Feb 18, 2015, at 7:22 AM, Zane Bitter <<a href="mailto:zbitter@redhat.com">zbitter@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 16/02/15 16:06, Dmitri Zimine wrote:<br><blockquote type="cite">2) Use functions, like Heat HOT or TOSCA:<br><br>HOT templates and TOSCA doesn’t seem to have a concept of typed<br>variables to borrow from (please correct me if I missed it). But they<br>have functions: function: { function_name: {foo: [parameter1, parameter<br>2], bar:"xxx”}}. Applied to Mistral, it would look like:<br><br> publish:<br> - bool_var: { yaql: “1+1+$.my.var < 100” }<br><br>Not bad, but currently rejected as it reads worse than delimiter-based<br>syntax, especially in simplified one-line action invocation.<br></blockquote><br>Note that you don't actually need the quotes there, so this would be equivalent:<br><br> publish:<br> - bool_var: {yaql: 1+1+$.my.var < 100}<br><br>FWIW I am partial to this or to Renat's p7 suggestion:<br><br> publish:<br> - bool_var: yaql{1+1+$.my.var < 100}<br><br>Both offer the flexibility to introduce new syntax in the future without breaking backwards compatibility.<br><br>cheers,<br>Zane.<br><br>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></blockquote></div><br></div></body></html>