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

Better/more unified precedence for options that can be defined global, per model, group or per node #3105

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

EinGlasVollKakao
Copy link

Pre-Request Checklist

  • Passes rubocop code analysis (try rubocop --auto-correct)
  • Tests added or adapted (try rake test)
  • Changes are reflected in the documentation
  • User-visible changes appended to CHANGELOG.md

Description

Hey,

with this PR options that are resolved when creating the node (like credentials, etc.) behave the same way as variables (lib/oxidized/config/vars), which means that group options are now preferred over model options and there's now also the possibility to define these options model specific in a group, which is already possible with variables.

This would help with my scenario in which nearly all devices with the same model have identical credentials, but a small group of those have different ones. First I thought that this would be possible with groups, but in the current state I didn't find a way to achieve this.

This PR also adds a section in the documentation in which I try to explain this hierarchy for options, which should make this behavior easier to understand.

also fixes #3058

@EinGlasVollKakao EinGlasVollKakao deleted the better-variable-hierarchy branch March 12, 2024 12:32
@EinGlasVollKakao EinGlasVollKakao restored the better-variable-hierarchy branch March 12, 2024 12:32
@ytti
Copy link
Owner

ytti commented May 2, 2024

This looks good and useful to me. But I didn't test or try it.

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

Successfully merging this pull request may close these issues.

Model settings preferred over group settings
2 participants