[openstack-dev] [fuel][plugin] Plugin depends on another plugin
vkramskikh at mirantis.com
Tue Jul 21 10:02:27 UTC 2015
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:
- condition: "settings:fuel-plugin-node-js == null or
settings:fuel-plugin-node-js.metadata.enabled == false"
message: "Node JS must be present and enabled"
Will this work for you?
2015-07-21 11:30 GMT+03:00 Daniel Depaoli <daniel.depaoli at create-net.org>:
> 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.
> What i did is to add a condition in environment_config.yaml:
> * restrictions:*
> * - condition: "settings:fuel-plugin-node-js.metadata.enabled ==
> * action: "disable"*
> * message: "Node JS must be present and enabled"*
> This work if fuel-plugin-node-js is present, but doesn't work otherwise.
> So I tried with:
> *- condition: "settings:fuel-plugin-node-js
> and settings:fuel-plugin-node-js.metadata.enabled == false"*
> but with the same result: it works only if the first plugin is present.
> Can you help me?
> Daniel Depaoli
> CREATE-NET Research Center
> Smart Infrastructures Area
> Junior Research Engineer
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
Fuel UI Tech Lead,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev