← Back to team overview

nagios-charmers team mailing list archive

Re: [Merge] ~aieri/charm-nagios:bug/1864192 into charm-nagios:master

 

Review: Approve

Great.  No issues

Diff comments:

> diff --git a/hooks/common.py b/hooks/common.py
> index 66d41ec..c2280a3 100644
> --- a/hooks/common.py
> +++ b/hooks/common.py
> @@ -43,6 +43,12 @@ def check_ip(n):
>              return False
>  
>  
> +def ingress_address(relation_data):
> +    if 'ingress-address' in relation_data:
> +        return relation_data['ingress-address']
> +    return relation_data['private-address']

Agree with the code golf, but the style above is far more clear about what's doing done.

> +
> +
>  def get_local_ingress_address(binding='website'):
>      # using network-get to retrieve the address details if available.
>      log('Getting hostname for binding %s' % binding)


-- 
https://code.launchpad.net/~aieri/charm-nagios/+git/nagios-charm/+merge/386533
Your team Nagios Charm developers is subscribed to branch charm-nagios:master.


References