[openstack-dev] [fuel][plugin] Plugin depends on another plugin

Daniel Depaoli 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>
wrote:

> 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:
>
>     restrictions:
>         - 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 ==
>> false"*
>> *    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
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> 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
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
========================================================
Daniel Depaoli
CREATE-NET Research Center
Smart Infrastructures Area
Junior Research Engineer
========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150721/55b15f1b/attachment.html>


More information about the OpenStack-dev mailing list