Review: Approve Yeah, this is much cleaner to read. Thanks Andrea
Diff comments: > diff --git a/hooks/common.py b/hooks/common.py > index d569e33..a0b61e7 100644 > --- a/hooks/common.py > +++ b/hooks/common.py > @@ -42,11 +42,6 @@ def check_ip(n): > except socket.error: > return False > > -def ingress_address(relation_data): using the one from charmhelpers means we don't need this > - if 'ingress-address' in relation_data: > - return relation_data['ingress-address'] > - return relation_data['private-address'] > - > > def get_local_ingress_address(binding='website'): > # using network-get to retrieve the address details if available. > @@ -347,21 +342,6 @@ def apply_host_policy(target_id, owner_unit, > owner_relation): > ssh_service.save() > > > -def get_valid_relations(): we're using relation_ids() from charmhelpers > - for x in subprocess.Popen(['relation-ids', 'monitors'], > - stdout=subprocess.PIPE).stdout: > - yield x.strip() > - for x in subprocess.Popen(['relation-ids', 'nagios'], > - stdout=subprocess.PIPE).stdout: > - yield x.strip() > - > - > -def get_valid_units(relation_id): we're using related_units() from charmhelpers > - for x in subprocess.Popen(['relation-list', '-r', relation_id], > - stdout=subprocess.PIPE).stdout: > - yield x.strip() > - > - > def _replace_in_config(find_me, replacement): > with open(INPROGRESS_CFG) as cf: > with tempfile.NamedTemporaryFile(dir=INPROGRESS_DIR, delete=False) > as new_cf: -- https://code.launchpad.net/~aieri/charm-nagios/+git/nagios-charm/+merge/387312 Your team Nagios Charm developers is subscribed to branch charm-nagios:master. -- Mailing list: https://launchpad.net/~nagios-charmers Post to : [email protected] Unsubscribe : https://launchpad.net/~nagios-charmers More help : https://help.launchpad.net/ListHelp

