ipautil: remove get_domain_name()

get_domain_name() and related code depends on ipaplatform.

Replace all uses of get_domain_name() with api.env.domain and remove
get_domain_name() and all of the related code.

https://fedorahosted.org/freeipa/ticket/6474

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Jan Cholasta
2016-11-29 14:50:51 +01:00
committed by Martin Basti
parent d6b755e3fc
commit 7b966e8577
7 changed files with 2 additions and 170 deletions
-11
View File
@@ -50,7 +50,6 @@ from six.moves import input
from six.moves import urllib
from ipapython.ipa_log_manager import root_logger
from ipapython import config
from ipaplatform.paths import paths
from ipapython.dn import DN
@@ -63,16 +62,6 @@ KRB5KDC_ERR_SVC_UNAVAILABLE = 2529638941 # A service is not available that is
# required to process the request
def get_domain_name():
try:
config.init_config()
domain_name = config.config.get_domain()
except Exception:
return None
return domain_name
class UnsafeIPAddress(netaddr.IPAddress):
"""Any valid IP address with or without netmask."""