Hi, Evgeniy A few months ago we hit similar use-case in Murano: ability to express complicated conditions & queries. We used JSON Path, but it was not enough for us.
One major thing that is required when you implementing such mechanism is restriction on Python usage - any executable code that can be executed on server is a security/stability issue. To solve this use-case without introducing ability to run any executable code we have created YAQL<https://github.com/ativelkov/yaql> . YAQL is very extensible and flexible library, that provides great conditions/query expirience out of the box. YAQL may be easily extended with own functions without adding anything in the library itself. Please, look at the YAQL and let's discuss how YAQL may help to solve your cases. On Fri, Mar 7, 2014 at 12:56 PM, Evgeniy L <[email protected]> wrote: > Hi Vitaly, > > I'm not sure that I understand you case correctly, but we can just a > render flag to enable or disable role. > > For example: > > roles_metadata: > controller: > name: "Custom Role Name" > description: "Role's description" > conflicts: > - compute > enable: > condition: > ${cluster.attributes.editable.additional_components.ceilometer.value} > description: "some error message" > > And for example we will be able to make more complicated conditions > > ${not cluster.attributes.editable.additional_components.ceilometer.value} > > ${cluster.attributes.some_cluster_attr and not > cluster.attributes.some_cluster_attr2} > > But my suggestion is not to use such ugly construction in template (it > would be better to create a helper), but it will be really useful for those > who add new roles in fuel. > > > On Thu, Mar 6, 2014 at 10:04 PM, Vitaly Kramskikh <[email protected] > > wrote: > >> Hi Evgeniy, >> >> In that particular case with Ceph role availability dependent on >> settings, where would you use the template? Generate a role list using it? >> >> >> >> 2014-03-06 19:12 GMT+04:00 Evgeniy L <[email protected]>: >> >>> Hi, >>> >>> We (python team) had a discussion about roles disabling feature [0] with >>> colleagues from UI team as result I've created a design document [1] where >>> I tried to describe problems which we have and possible solutions. >>> >>> Comments are welcome. >>> >>> [0] >>> https://docs.google.com/a/mirantis.com/document/d/1-YMcGX0JI4LwbrpsvA-ktIkxVqCI3bi7PQ6U0udW0O0/edit >>> [1] >>> https://docs.google.com/a/mirantis.com/document/d/1yBaIxUMnrFths7N1_qVkIivpR0GsYHRlGR3C8IZ9bbk/edit# >>> >>> -- >>> Mailing list: https://launchpad.net/~fuel-dev >>> Post to : [email protected] >>> Unsubscribe : https://launchpad.net/~fuel-dev >>> More help : https://help.launchpad.net/ListHelp >>> >>> >> >> >> -- >> Vitaly Kramskikh, >> Software Engineer, >> Mirantis, Inc. >> > > > -- > Mailing list: https://launchpad.net/~fuel-dev > Post to : [email protected] > Unsubscribe : https://launchpad.net/~fuel-dev > More help : https://help.launchpad.net/ListHelp > > -- Serg Melikyan, Senior Software Engineer at Mirantis, Inc. http://mirantis.com | [email protected] +7 (495) 640-4904, 0261 +7 (903) 156-0836
-- Mailing list: https://launchpad.net/~fuel-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~fuel-dev More help : https://help.launchpad.net/ListHelp

