mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
CheckedIPAddress: remove match_local param
This parameter is unused in code. We are no longer testing if IP address matches an interface in constructor. https://pagure.io/freeipa/issue/4317 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
committed by
David Kupka
parent
0b69e44f16
commit
6024165101
@@ -590,7 +590,7 @@ def get_server_ip_address(host_name, unattended, setup_dns, ip_addresses):
|
||||
if len(hostaddr):
|
||||
for ha in hostaddr:
|
||||
try:
|
||||
ips.append(ipautil.CheckedIPAddress(ha, match_local=False))
|
||||
ips.append(ipautil.CheckedIPAddress(ha))
|
||||
except ValueError as e:
|
||||
root_logger.warning("Invalid IP address %s for %s: %s", ha, host_name, unicode(e))
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ def add_records_for_host_validation(option_name, host, domain, ip_addresses, che
|
||||
for ip_address in ip_addresses:
|
||||
try:
|
||||
ip = CheckedIPAddress(
|
||||
ip_address, match_local=False, allow_multicast=True)
|
||||
ip_address, allow_multicast=True)
|
||||
except Exception as e:
|
||||
raise errors.ValidationError(name=option_name, error=unicode(e))
|
||||
|
||||
@@ -599,7 +599,7 @@ def add_records_for_host(host, domain, ip_addresses, add_forward=True, add_rever
|
||||
|
||||
for ip_address in ip_addresses:
|
||||
ip = CheckedIPAddress(
|
||||
ip_address, match_local=False, allow_multicast=True)
|
||||
ip_address, allow_multicast=True)
|
||||
|
||||
if add_forward:
|
||||
add_forward_record(domain, host, unicode(ip))
|
||||
|
||||
@@ -245,7 +245,7 @@ def validate_ipaddr(ugettext, ipaddr):
|
||||
Verify that we have either an IPv4 or IPv6 address.
|
||||
"""
|
||||
try:
|
||||
CheckedIPAddress(ipaddr, match_local=False)
|
||||
CheckedIPAddress(ipaddr)
|
||||
except Exception as e:
|
||||
return unicode(e)
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user