diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-04-18 11:22:35 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-09 11:54:20 +0200 |
commit | f19218f7d87f5847d51f79b5d2850f90b0ae8407 (patch) | |
tree | 500d3101dc1375d3eb75ffb927040c2593216aa9 /install/tools/ipa-server-install | |
parent | c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e (diff) | |
download | freeipa-f19218f7d87f5847d51f79b5d2850f90b0ae8407.tar.gz freeipa-f19218f7d87f5847d51f79b5d2850f90b0ae8407.tar.xz freeipa-f19218f7d87f5847d51f79b5d2850f90b0ae8407.zip |
Remove duplicate and unused utility code
IPA has some unused code from abandoned features (Radius, ipa 1.x user
input, commant-line tab completion), as well as some duplicate utilities.
This patch cleans up the utility modules.
Duplicate code consolidated into ipapython.ipautil:
{ipalib.util,ipaserver.ipautil,ipapython.ipautil}.realm_to_suffix
{ipaserver,ipapython}.ipautil.CIDict
(with style improvements from the ipaserver version)
{ipapython.entity,ipaserver.ipautil}.utf8_encode_value
{ipapython.entity,ipaserver.ipautil}.utf8_encode_values
ipalib.util.get_fqdn was removed in favor of the same function in
ipaserver.install.installutils
Removed unused code:
ipalib.util:
load_plugins_in_dir
import_plugins_subpackage
make_repr (was imported but unused; also removed from tests)
ipapython.ipautil:
format_list
parse_key_value_pairs
read_pairs_file
read_items_file
user_input_plain
AttributeValueCompleter
ItemCompleter
ipaserver.ipautil:
get_gsserror (a different version exists in ipapython.ipautil)
ipaserver.ipautil ended up empty and is removed entirely.
https://fedorahosted.org/freeipa/ticket/2650
Diffstat (limited to 'install/tools/ipa-server-install')
-rwxr-xr-x | install/tools/ipa-server-install | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 1dd02ba87..f3377df6d 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -57,6 +57,7 @@ from ipaserver.plugins.ldap2 import ldap2 from ipapython import sysrestore from ipapython.ipautil import * +from ipapython import ipautil from ipalib import api, errors, util from ipapython.config import IPAOptionParser from ipalib.dn import DN @@ -812,7 +813,7 @@ def main(): fd = open(target_fname, "w") fd.write("[global]\n") fd.write("host=" + host_name + "\n") - fd.write("basedn=" + util.realm_to_suffix(realm_name) + "\n") + fd.write("basedn=" + ipautil.realm_to_suffix(realm_name) + "\n") fd.write("realm=" + realm_name + "\n") fd.write("domain=" + domain_name + "\n") fd.write("xmlrpc_uri=https://%s/ipa/xml\n" % format_netloc(host_name)) @@ -938,7 +939,7 @@ def main(): # We need to ldap_enable the CA now that DS is up and running if not options.selfsign: ca.ldap_enable('CA', host_name, dm_password, - util.realm_to_suffix(realm_name)) + ipautil.realm_to_suffix(realm_name)) # Turn on SSL in the dogtag LDAP instance. This will get restarted # later, we don't need SSL now. @@ -984,7 +985,7 @@ def main(): os.close(pw_fd) memcache = memcacheinstance.MemcacheInstance() - memcache.create_instance('MEMCACHE', host_name, dm_password, util.realm_to_suffix(realm_name)) + memcache.create_instance('MEMCACHE', host_name, dm_password, ipautil.realm_to_suffix(realm_name)) http = httpinstance.HTTPInstance(fstore) if options.http_pkcs12: @@ -995,7 +996,7 @@ def main(): http.create_instance(realm_name, host_name, domain_name, dm_password, autoconfig=True, self_signed_ca=options.selfsign, subject_base=options.subject, auto_redirect=options.ui_redirect) ipaservices.restore_context("/var/cache/ipa/sessions") - set_subject_in_config(realm_name, dm_password, util.realm_to_suffix(realm_name), options.subject) + set_subject_in_config(realm_name, dm_password, ipautil.realm_to_suffix(realm_name), options.subject) # Apply any LDAP updates. Needs to be done after the configuration file # is created |