Implement `get_config`
This is got a large MR for implementing the get_config
command. As it turned out, there was some refactoring for existing classes needed.
TODO:
-
Add exceptions for unused keys -
Define behavior for unused keys -
Add getUsedKeys()
and return that forget_config
-
Add unit tests
@simonspa @hanno.perrey an open question is how we handle unused keys in the configuration. The problem is that at that point, the user initialization function (or reconfigure function) already passed successfully. I see three options:
- Simply log a warning
- pro: simple typo can be fixed quickly
- con: can be easily missed/ignored
- Go to ERROR state
- pro: it is obvious that there is a problem
- con: ERROR state is undefined and requires manual intervention
- Go to SAFE state
- pro: in a defined state, requires new configuration to exit it
- con: requires a new transition from
initializing
andreconfiguring
toSAFE
I'm leaning towards option 3: it is hard to miss/ignore and at the same easy to recover from
Edited by Stephan Lachnit