[openstack-dev] [fuel][plugin] Plugin depends on another plugin
daniel.depaoli at create-net.org
Tue Jul 21 11:13:26 UTC 2015
On Tue, Jul 21, 2015 at 12:02 PM, Vitaly Kramskikh <vkramskikh at mirantis.com>
> 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"
> strict: false
> action: "disable"
> message: "Node JS must be present and enabled"
> Will this work for you?
No this solution unfortunately doesn't work if the nodejs plugin is not
present. But thanks anyway!
> 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)
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> Vitaly Kramskikh,
> Fuel UI Tech Lead,
> Mirantis, Inc.
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
CREATE-NET Research Center
Smart Infrastructures Area
Junior Research Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev