Re: [openstack-dev] [fuel][plugin] Plugin depends on another plugin
Yes, it should resolve my case and in general any case of dependency of something that is not installed. On Tue, Jul 21, 2015 at 1:23 PM, Vitaly Kramskikh wrote: > Daniel, > > Yes, it doesn't work in 6.1 release. My question is: are you OK if we > support your case in 7.0 using the approach I described? > > 2015-07-21 14:13 GMT+03:00 Daniel Depaoli : > >> >> >> On Tue, Jul 21, 2015 at 12:02 PM, Vitaly Kramskikh < >> vkramsk...@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 >> >: >>> 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-requ...@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-requ...@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 >> >> >> __ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: >> openstack-dev-requ...@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-requ...@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 __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [fuel][plugin] Plugin depends on another plugin
Daniel, Yes, it doesn't work in 6.1 release. My question is: are you OK if we support your case in 7.0 using the approach I described? 2015-07-21 14:13 GMT+03:00 Daniel Depaoli : > > > On Tue, Jul 21, 2015 at 12:02 PM, Vitaly Kramskikh < > vkramsk...@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 >> : >> >>> 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-requ...@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-requ...@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 > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@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-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [fuel][plugin] Plugin depends on another plugin
On Tue, Jul 21, 2015 at 12:02 PM, Vitaly Kramskikh 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 : > >> 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-requ...@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-requ...@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 __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [fuel][plugin] Plugin depends on another plugin
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? 2015-07-21 11:30 GMT+03:00 Daniel Depaoli : > 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-requ...@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-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [fuel][plugin] Plugin depends on another plugin
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-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev