ac7d03
From dd004f9393f0543c556d417d27b9f652b6fe4c99 Mon Sep 17 00:00:00 2001
ac7d03
From: Martin Basti <mbasti@redhat.com>
ac7d03
Date: Wed, 14 Jun 2017 15:02:21 +0200
ac7d03
Subject: [PATCH] Remove ip_netmask from option parser
ac7d03
ac7d03
ipa-dns-install uses ip_netmask=False --> parse_netmask=False, other installers uses default (parse_netmask=True).
ac7d03
Use this consistent accross all installers.
ac7d03
ac7d03
Also this option is unused (and shouldn't be used).
ac7d03
ac7d03
https://pagure.io/freeipa/issue/4317
ac7d03
ac7d03
Reviewed-By: David Kupka <dkupka@redhat.com>
ac7d03
---
ac7d03
 ipapython/config.py | 5 ++---
ac7d03
 1 file changed, 2 insertions(+), 3 deletions(-)
ac7d03
ac7d03
diff --git a/ipapython/config.py b/ipapython/config.py
ac7d03
index 6349892fe88757629129f464401efce64e30f058..19abfc51ee354d2971be836fa6bad70eea3a6720 100644
ac7d03
--- a/ipapython/config.py
ac7d03
+++ b/ipapython/config.py
ac7d03
@@ -68,9 +68,8 @@ class IPAFormatter(IndentedHelpFormatter):
ac7d03
 def check_ip_option(option, opt, value):
ac7d03
     from ipapython.ipautil import CheckedIPAddress
ac7d03
 
ac7d03
-    ip_netmask = option.ip_netmask is True
ac7d03
     try:
ac7d03
-        return CheckedIPAddress(value, parse_netmask=ip_netmask)
ac7d03
+        return CheckedIPAddress(value)
ac7d03
     except Exception as e:
ac7d03
         raise OptionValueError("option %s: invalid IP address %s: %s" % (opt, value, e))
ac7d03
 
ac7d03
@@ -85,7 +84,7 @@ class IPAOption(Option):
ac7d03
     optparse.Option subclass with support of options labeled as
ac7d03
     security-sensitive such as passwords.
ac7d03
     """
ac7d03
-    ATTRS = Option.ATTRS + ["sensitive", "ip_netmask"]
ac7d03
+    ATTRS = Option.ATTRS + ["sensitive"]
ac7d03
     TYPES = Option.TYPES + ("ip", "dn")
ac7d03
     TYPE_CHECKER = copy(Option.TYPE_CHECKER)
ac7d03
     TYPE_CHECKER["ip"] = check_ip_option
ac7d03
-- 
ac7d03
2.9.4
ac7d03