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

Allow to override certain parameters with restricted DSL #2709

Open
Thomas-Gelf opened this issue Feb 15, 2023 · 0 comments
Open

Allow to override certain parameters with restricted DSL #2709

Thomas-Gelf opened this issue Feb 15, 2023 · 0 comments

Comments

@Thomas-Gelf
Copy link
Contributor

Expected Behavior

There are other feature-requests similar to #462. However, this would lead to additional DB columns and conditional rendering logic for more and more properties. To address this, we could implement a generic solution addressing them at once.

This should allow an Admin user to:

  • override a specific property
  • pick a pre-defined DSL snippet
  • optionally choose one or more DataField(s) as parameters for that snippet

In it's initial version, this should be limited to a strict small set of DSL logic. Reason: we want to remain in control of the logic in those fields. What those DSL snippets produce, must be predictable.

Those DSL snippets could

  • return a specific custom variable, like setting times.begin to host.vars.notification_delay.
  • if not found: there might be options like "set null" or "keep untouched" (there might be an inherited value)
  • a coalesce-like logic would be helpful, to pick the first non-null variable (service.vars.one_delay, 'host.vars.another_one`)

Also, we'll limit this to a small subset of properties. times.begin for Notifications is a good candidate, it has no side-effects in the Director. Host address (or even worse: imports) will not be allowed, as this has direct impact on generated Apply Rules. We cannot offer this features for properties we're required to "understand" when resolving Apply Rules in the Director.

  • Data Type restrictions should apply, so if you pick a DSL snippet for an integer property (like times.begin) as an Input, it should only accept Number-based DataFields.
@Thomas-Gelf Thomas-Gelf self-assigned this Feb 15, 2023
@Thomas-Gelf Thomas-Gelf removed their assignment Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant