hookenv.unit_get should offer facility to detect changed values
Bug #1444062 reported by
Chris Glass
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Unassigned |
Bug Description
In a similar way that the Config object allows to check for changes in values by serializing them first, the unit_get() function should ideally provide such facility as well.
The case for this is changing public IP addresses, as described in https:/
If the public IP address changes, the config-changed hook will be fired, but re-setting the IP address if it hasn't changed can have unwanted side-effects, and in order to avoid them, it would be nice to be able to have code like:
if unit_get(
do_something() # Forwarding the public IP to a client relation would be an obvious example.
To post a comment you must log in.