Merge lp:~tvansteenburgh/charm-helpers/config-wrapper into lp:charm-helpers
Proposed by
Tim Van Steenburgh
Status: | Merged |
---|---|
Merged at revision: | 152 |
Proposed branch: | lp:~tvansteenburgh/charm-helpers/config-wrapper |
Merge into: | lp:charm-helpers |
Diff against target: |
241 lines (+199/-1) 2 files modified
charmhelpers/core/hookenv.py (+98/-1) tests/core/test_hookenv.py (+101/-0) |
To merge this branch: | bzr merge lp:~tvansteenburgh/charm-helpers/config-wrapper |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Ceppi | Approve | ||
Benjamin Saller (community) | Approve | ||
Review via email: mp+218497@code.launchpad.net |
Description of the change
Add Config wrapper around charm config dictionary.
Backwards-
tracks which config values have changed since the previous hook
invocation and allows the user to query for the previous value.
To post a comment you must log in.
LGTM +1 Thanks for adding this.
Some optional minors, prev_dict might be _prev_dict. It is private.
in changed
call self.previous(key) rather than directly access prev_dict
use CONFIG_FILE_NAME as the default path in __init__, but allow it to be modified, that might make some of the patching in the tests go away