mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Improve IP address handling in IPA option parser
Implements a way to pass match_local and parse_netmask parameters to IP option checker. Now, there is just one common option type "ip" with new optional attributes "ip_local" and "ip_netmask" which can be used to pass IP address validation parameters. https://fedorahosted.org/freeipa/ticket/1333
This commit is contained in:
committed by
Rob Crittenden
parent
79ce958a3c
commit
d9808498a8
@@ -38,9 +38,9 @@ def parse_options():
|
||||
parser.add_option("-d", "--debug", dest="debug", action="store_true",
|
||||
default=False, help="print debugging information")
|
||||
parser.add_option("--ip-address", dest="ip_address",
|
||||
type="ipnet", help="Master Server IP Address")
|
||||
type="ip", ip_netmask=True, ip_local=True, help="Master Server IP Address")
|
||||
parser.add_option("--forwarder", dest="forwarders", action="append",
|
||||
type="ipaddr", help="Add a DNS forwarder")
|
||||
type="ip", help="Add a DNS forwarder")
|
||||
parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
|
||||
default=False, help="Do not add any DNS forwarders, use root servers instead")
|
||||
parser.add_option("--no-reverse", dest="no_reverse",
|
||||
|
||||
Reference in New Issue
Block a user