Merge lp:~verterok/charms/trusty/tanuki-result-enum-worker/conn-check-refresh-on-config-changed into lp:~tanuki/charms/trusty/tanuki-result-enum-worker/trunk

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Celso Providelo
Approved revision: 38
Merged at revision: 38
Proposed branch: lp:~verterok/charms/trusty/tanuki-result-enum-worker/conn-check-refresh-on-config-changed
Merge into: lp:~tanuki/charms/trusty/tanuki-result-enum-worker/trunk
Diff against target: 28 lines (+7/-0)
2 files modified
hooks/actions.py (+6/-0)
hooks/services.py (+1/-0)
To merge this branch: bzr merge lp:~verterok/charms/trusty/tanuki-result-enum-worker/conn-check-refresh-on-config-changed
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+268102@code.launchpad.net

Commit message

refresh conn-check relation data on config-changed (or any other hook)

Description of the change

refresh conn-check relation data on config-changed (or any other hook)

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Thanks Guillermo.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2015-08-13 05:37:48 +0000
3+++ hooks/actions.py 2015-08-14 15:37:24 +0000
4@@ -133,6 +133,12 @@
5 nrpe_compat.write()
6
7
8+def publish_conn_check_relation_data(service_name):
9+ cr = ConnCheckRelation()
10+ for rel in hookenv.relations_of_type('conn-check'):
11+ hookenv.relation_set(rel['__relid__'], **cr.provide_data())
12+
13+
14 class ConnCheckRelation(helpers.RelationContext):
15
16 name = 'conn-check'
17
18=== modified file 'hooks/services.py'
19--- hooks/services.py 2015-08-13 03:42:02 +0000
20+++ hooks/services.py 2015-08-14 15:37:24 +0000
21@@ -31,6 +31,7 @@
22 helpers.render_template(
23 source='upstart.conf',
24 target='/etc/init/result-enum-worker.conf'),
25+ actions.publish_conn_check_relation_data,
26 actions.log_start,
27 actions.nrpe_external_master_relation,
28 ],

Subscribers

People subscribed via source and target branches