summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-06-16 10:47:11 +0200
committerRob Crittenden <rcritten@redhat.com>2011-06-19 20:06:21 -0400
commitd9808498a82fa8662e5bc1bc1fca4d175fe9447c (patch)
treeaf0a953504c741482ea7901985bb87c65dc0023b /install/tools
parent79ce958a3c9e182a4b4ee0850d7315fdd51982d7 (diff)
downloadfreeipa-d9808498a82fa8662e5bc1bc1fca4d175fe9447c.tar.gz
freeipa-d9808498a82fa8662e5bc1bc1fca4d175fe9447c.tar.xz
freeipa-d9808498a82fa8662e5bc1bc1fca4d175fe9447c.zip
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
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipa-dns-install4
-rwxr-xr-xinstall/tools/ipa-replica-install2
-rwxr-xr-xinstall/tools/ipa-replica-prepare3
-rwxr-xr-xinstall/tools/ipa-server-install5
4 files changed, 8 insertions, 6 deletions
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index 39998ac47..b5295b5c7 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -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",
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index f91ac51a6..c39d992de 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -64,7 +64,7 @@ def parse_options():
parser.add_option("--setup-dns", dest="setup_dns", action="store_true",
default=False, help="configure bind with our zone")
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", action="store_true",
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index 8117bfcdd..97dd96a19 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -54,7 +54,8 @@ def parse_options():
parser.add_option("-p", "--password", dest="password",
help="Directory Manager (existing master) password")
parser.add_option("--ip-address", dest="ip_address",
- type="ipnet", help="Add A and PTR records of the future replica")
+ type="ip", ip_netmask=True,
+ help="Add A and PTR records of the future replica")
parser.add_option("--ca", dest="ca_file", default="/root/cacert.p12",
help="Location of CA PKCS#12 file, default /root/cacert.p12")
parser.add_option("--no-pkinit", dest="setup_pkinit", action="store_false",
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 8fb13a3a7..886d391a2 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -100,11 +100,12 @@ def parse_options():
help="File containing PKCS#10 of the external CA chain")
parser.add_option("--hostname", dest="host_name", help="fully qualified name of server")
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("--setup-dns", dest="setup_dns", action="store_true",
default=False, help="configure bind with our zone")
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", action="store_true",