<div dir="ltr"><div>Hi, currently it's not possible to handle cases like this. The expression parser by default expects every key in the expression to exist, otherwise it throws an error. But it also supports non-strict mode, in which non-existent keys are treated as null value. We can add support for enabling this mode in 7.0, so it will look like this:<br><br><div><div><span style="font-family:monospace,monospace"> restrictions:</span></div><div><span style="font-family:monospace,monospace"> - condition: "</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">settings:fuel-plugin-node-js == null or </span>settings:fuel-plugin-node-js.</span><span style="font-family:monospace,monospace">metadata.enabled == false"<br></span></div><div><span style="font-family:monospace,monospace"> strict: false<br></span></div><div><span style="font-family:monospace,monospace"> action: "disable"</span></div><div><span style="font-family:monospace,monospace"> message: "Node JS must be present and enabled"</span></div></div><br></div>Will this work for you?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-21 11:30 GMT+03:00 Daniel Depaoli <span dir="ltr"><<a href="mailto:daniel.depaoli@create-net.org" target="_blank">daniel.depaoli@create-net.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all! I'm writing a fuel plugin that depends on another plugin, in particular one plugin install node-js and the other plugin install a software that uses nodejs.<div>What i did is to add a condition in environment_config.yaml:</div><div>```</div><div><div><i> restrictions:</i></div><div><i> - condition: "settings:fuel-plugin-node-js.metadata.enabled == false"</i></div><div><i> action: "disable"</i></div><div><i> message: "Node JS must be present and enabled"</i></div></div><div><i>```</i></div><div>This work if fuel-plugin-node-js is present, but doesn't work otherwise.</div><div>So I tried with:</div><div>```</div><div><i>- condition: "settings:fuel-plugin-node-js and settings:fuel-plugin-node-js.metadata.enabled == false"</i></div><div><i>```</i></div><div>but with the same result: it works only if the first plugin is present.</div><div><br></div><div>Can you help me?<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr">========================================================
<br>Daniel Depaoli <br><div>CREATE-NET Research Center
<br>Smart Infrastructures Area
<br>Junior Research Engineer
<br>======================================================== <br></div></div></div>
</font></span></div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Vitaly Kramskikh,<br>Fuel UI Tech Lead,<br>Mirantis, Inc.</div></div></div></div>
</div>