Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a "contains" constraint operator #119

Closed
lauwers opened this issue Jun 21, 2022 · 4 comments
Closed

add a "contains" constraint operator #119

lauwers opened this issue Jun 21, 2022 · 4 comments

Comments

@lauwers
Copy link
Contributor

lauwers commented Jun 21, 2022

For a project I'm working on, I need additional constraint operators to create more flexible node filters. In my example, nodes have capabilities that expose a list of variables; let's call them tags. Other nodes have requirements for those tags. I need to be able to express the following: "Fulfill my requirement using the node/capability that has a specific tag in its list of exposed tags".
This functionality could be provided using a "contains" constraint operation that can apply to lists, maps, or ranges.

@tliron
Copy link
Contributor

tliron commented Jun 27, 2022

I would create separate issues here per constraint you want to add. In this case, contains, which I am also in favor. Maybe edit the title?

@lauwers lauwers changed the title add additional constraint operators add a "contains" constraint operators Jun 27, 2022
@lauwers lauwers changed the title add a "contains" constraint operators add a "contains" constraint operator Jun 27, 2022
@pmjordan
Copy link
Contributor

pmjordan commented Jul 9, 2022

If you are going to add 'contains' then it would seem logical to me to add the inverse at the same time, i.e. 'does not contain'

@tliron
Copy link
Contributor

tliron commented Jul 9, 2022

As long as we open this up, there are a whole bunch of important, trivial constraints we are missing. Even OpenStack Heat has more.

I propose turning this issue into a general list of possible constraint functions to add.

@lauwers
Copy link
Contributor Author

lauwers commented Feb 20, 2023

This function has been added and is documented in https://docs.oasis-open.org/tosca/TOSCA/v2.0/csd05/TOSCA-v2.0-csd05.html#_Toc125468947

@lauwers lauwers closed this as completed Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants