Switch to using get_host_ip

This commit is contained in:
James Page 2015-09-21 08:53:09 +01:00
parent 7b6cc320fb
commit 64c1a42c18

View File

@ -439,7 +439,7 @@ def shared_db_changed(relation_id=None, unit=None):
database = settings['database']
username = settings['username']
normalized_address = db_helper.normalize_address(hostname)
normalized_address = get_host_ip(hostname)
if access_network and not is_address_in_network(access_network,
normalized_address):
# NOTE: for configurations using access-network, only setup database
@ -496,7 +496,7 @@ def shared_db_changed(relation_id=None, unit=None):
hostname = databases[db]['hostname']
username = databases[db]['username']
normalized_address = db_helper.normalize_address(hostname)
normalized_address = get_host_ip(hostname)
if (access_network and
not is_address_in_network(access_network,
normalized_address)):