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

Default values for filter / Context expressions #126

Open
lukaszachy opened this issue Apr 7, 2021 · 2 comments
Open

Default values for filter / Context expressions #126

lukaszachy opened this issue Apr 7, 2021 · 2 comments
Labels

Comments

@lukaszachy
Copy link
Collaborator

HI,
I can imagine, also some command line option what will do some tweaking of some default values.

I can imagine, some fallback syntax, eg.
when you will have e.g. filter: X and Y or Z, I can imagine some syntax like

  • filter: X[True] and Y[False] or dist <= centos-8[False], what will use this default value if variable is not defined.
  • filter: X:=True Y:=False dist:=centos-9 X and Y or dist <= centos-8 or this will assign some default value to variables if they are not defined, and then logic formulas will be same.

What will add very powerful tooling. and will be nice

Originally posted by @jscotka in #117 (comment)

@lukaszachy
Copy link
Collaborator Author

So IIUIC we have two RFEs

  1. fmf --filter (and ideally tmt --filter)
  2. Expressions in Context (adjust: when: expression)

And idea is that if the outcome is not defined (attributes / dimension is unknown (filter,context) and/or values cannot be compared (context)) then you can specify what should be the the outcome instead of CannotDecide.

I like dist <= centos-8[False] syntax more.

@jscotka
Copy link
Collaborator

jscotka commented Apr 13, 2021

Thanks for copying this as separated issue.

Yep, would be very useful and powerful. And maybe there is also3. RFE, new cmd line option to use soem default when CannotDecide e,g, --default_logic_value=False what is able to simplify, when you just want to use one fix default value. for all expressions. Probably this one will be very easy to implement and used more ofter, that very specific defaults for each item.

But still I need this logic to have some default for each item as most powerfull solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants