Code review comment for lp:~johnsca/charms/trusty/cf-go-router/port-conflicts

Revision history for this message
Benjamin Saller (bcsaller) wrote :

Thanks, LGTM with changes

At min we should use the config['port'] the action for the rest might be
a card unless you disagree with the approach.

https://codereview.appspot.com/103270043/diff/20001/hooks/config.py
File hooks/config.py (right):

https://codereview.appspot.com/103270043/diff/20001/hooks/config.py#newcode39
hooks/config.py:39: 'ports': [80],
if this is a config option (and it can be because we expose this one)
then this can't be hard-coded here.

config['port']

The harder issue is that we then need to track the previous value if we
are to close the old port.

We (and it doesn't have to be now) could use a config context that
called callbacks here as callback(new_value, old_value=None) so we have
a chance to do something with the old saved context. seem reasonable?

https://codereview.appspot.com/103270043/

« Back to merge proposal