summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-04-27 14:42:31 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-05-05 11:56:49 +0200
commit522cbb23f129033f836e40282ca41e76d315cbe3 (patch)
tree5990a234426982bb6602b469768dc28332bfc260 /install
parent978298882b06dcf8a86a8d6ec60d7f1266aac697 (diff)
downloadfreeipa-522cbb23f129033f836e40282ca41e76d315cbe3.tar.gz
freeipa-522cbb23f129033f836e40282ca41e76d315cbe3.tar.xz
freeipa-522cbb23f129033f836e40282ca41e76d315cbe3.zip
move realm_to_serverid to installutils module
To avoid cyclic imports realm_to_serverid function had to be moved to installutils from dsinstance. Required for: https://fedorahosted.org/freeipa/ticket/4925 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-ca-install2
-rwxr-xr-xinstall/tools/ipa-replica-install3
-rwxr-xr-xinstall/tools/ipa-server-install8
-rwxr-xr-xinstall/tools/ipa-upgradeconfig6
-rwxr-xr-xinstall/tools/ipactl4
5 files changed, 13 insertions, 10 deletions
diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
index 6f8ff880b..f087d2d6a 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -284,7 +284,7 @@ def install_master(safe_options, options):
check_ca()
dirname = dsinstance.config_dirname(
- dsinstance.realm_to_serverid(realm_name))
+ installutils.realm_to_serverid(realm_name))
cadb = certs.CertDB(realm_name, subject_base=subject_base)
dsdb = certs.CertDB(realm_name, nssdir=dirname, subject_base=subject_base)
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 86931293f..b09a5f16e 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -544,7 +544,8 @@ def main():
fd.write("realm=%s\n" % config.realm_name)
fd.write("domain=%s\n" % config.domain_name)
fd.write("xmlrpc_uri=https://%s/ipa/xml\n" % ipautil.format_netloc(config.host_name))
- fd.write("ldap_uri=ldapi://%%2fvar%%2frun%%2fslapd-%s.socket\n" % dsinstance.realm_to_serverid(config.realm_name))
+ fd.write("ldap_uri=ldapi://%%2fvar%%2frun%%2fslapd-%s.socket\n" %
+ installutils.realm_to_serverid(config.realm_name))
if ipautil.file_exists(config.dir + "/cacert.p12"):
fd.write("enable_ra=True\n")
fd.write("ra_plugin=dogtag\n")
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 56a43770d..1fe5bd9ea 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -655,7 +655,8 @@ def uninstall():
'mean your system hasn\'t be restored to its pre-installation state.' % SYSRESTORE_DIR_PATH)
# Note that this name will be wrong after the first uninstall.
- dirname = dsinstance.config_dirname(dsinstance.realm_to_serverid(api.env.realm))
+ dirname = dsinstance.config_dirname(
+ installutils.realm_to_serverid(api.env.realm))
dirs = [dirname, dogtag_constants.ALIAS_DIR, certs.NSS_DIR]
ids = certmonger.check_state(dirs)
if ids:
@@ -666,7 +667,7 @@ def uninstall():
def set_subject_in_config(realm_name, dm_password, suffix, subject_base):
ldapuri = 'ldapi://%%2fvar%%2frun%%2fslapd-%s.socket' % (
- dsinstance.realm_to_serverid(realm_name)
+ installutils.realm_to_serverid(realm_name)
)
try:
conn = ldap2(shared_instance=False, ldap_uri=ldapuri, base_dn=suffix)
@@ -1134,7 +1135,8 @@ def main():
fd.write("realm=%s\n" % realm_name)
fd.write("domain=%s\n" % domain_name)
fd.write("xmlrpc_uri=https://%s/ipa/xml\n" % format_netloc(host_name))
- fd.write("ldap_uri=ldapi://%%2fvar%%2frun%%2fslapd-%s.socket\n" % dsinstance.realm_to_serverid(realm_name))
+ fd.write("ldap_uri=ldapi://%%2fvar%%2frun%%2fslapd-%s.socket\n" %
+ installutils.realm_to_serverid(realm_name))
if setup_ca:
fd.write("enable_ra=True\n")
fd.write("ra_plugin=dogtag\n")
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig
index 8159ce244..dfef1e0aa 100755
--- a/install/tools/ipa-upgradeconfig
+++ b/install/tools/ipa-upgradeconfig
@@ -1132,7 +1132,7 @@ def fix_schema_file_syntax():
root_logger.info('Syntax already fixed')
return
- serverid = dsinstance.realm_to_serverid(api.env.realm)
+ serverid = installutils.realm_to_serverid(api.env.realm)
ds_dir = dsinstance.config_dirname(serverid)
# 1. 60ipadns.ldif: Add parenthesis to idnsRecord
@@ -1191,7 +1191,7 @@ def remove_ds_ra_cert(subject_base):
return
dbdir = dsinstance.config_dirname(
- dsinstance.realm_to_serverid(api.env.realm))
+ installutils.realm_to_serverid(api.env.realm))
dsdb = certs.CertDB(api.env.realm, nssdir=dbdir, subject_base=subject_base)
nickname = 'CN=IPA RA,%s' % subject_base
@@ -1309,7 +1309,7 @@ def main():
'ca.crl.MasterCRL.enableCRLUpdates', '=')
sub_dict['CLONE']='#' if crl.lower() == 'true' else ''
- ds_serverid = dsinstance.realm_to_serverid(api.env.realm)
+ ds_serverid = installutils.realm_to_serverid(api.env.realm)
ds_dirname = dsinstance.config_dirname(ds_serverid)
upgrade(sub_dict, paths.HTTPD_IPA_CONF, ipautil.SHARE_DIR + "ipa.conf")
diff --git a/install/tools/ipactl b/install/tools/ipactl
index b37f55575..52dfe67dd 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -25,7 +25,7 @@ import json
import ldapurl
from ipaserver.install import service, installutils
-from ipaserver.install.dsinstance import config_dirname, realm_to_serverid
+from ipaserver.install.dsinstance import config_dirname
from ipaserver.install.installutils import is_ipa_configured, ScriptError
from ipalib import api, errors
from ipapython.ipaldap import IPAdmin
@@ -53,7 +53,7 @@ def is_dirsrv_debugging_enabled():
returns True or False
"""
debugging = False
- serverid = realm_to_serverid(api.env.realm)
+ serverid = installutils.realm_to_serverid(api.env.realm)
dselist = [config_dirname(serverid)]
for dse in dselist:
try: