Merge lp:~pjdc/charm-helpers/nrpe-get-nagios-host-context into lp:charm-helpers

Proposed by Paul Collins
Status: Merged
Merged at revision: 499
Proposed branch: lp:~pjdc/charm-helpers/nrpe-get-nagios-host-context
Merge into: lp:charm-helpers
Diff against target: 10 lines (+1/-1)
1 file modified
charmhelpers/contrib/charmsupport/nrpe.py (+1/-1)
To merge this branch: bzr merge lp:~pjdc/charm-helpers/nrpe-get-nagios-host-context
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+274097@code.launchpad.net

Description of the change

I noticed while inspecting the result of a charm-helpers-sync run that the nrpe module's get_nagios_hostcontext doesn't correctly check the relation before a fetch.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Nice catch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/charmsupport/nrpe.py'
2--- charmhelpers/contrib/charmsupport/nrpe.py 2015-03-16 17:54:34 +0000
3+++ charmhelpers/contrib/charmsupport/nrpe.py 2015-10-12 02:09:08 +0000
4@@ -260,7 +260,7 @@
5 :param str relation_name: Name of relation nrpe sub joined to
6 """
7 for rel in relations_of_type(relation_name):
8- if 'nagios_hostname' in rel:
9+ if 'nagios_host_context' in rel:
10 return rel['nagios_host_context']
11
12

Subscribers

People subscribed via source and target branches