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-replica-manage | |
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-replica-manage')
-rwxr-xr-x | install/tools/ipa-replica-manage | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index f1f5425ca..e23781738 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -126,13 +126,13 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose): else: conn.do_sasl_gssapi_bind() - dn = 'cn=masters,cn=ipa,cn=etc,%s' % util.realm_to_suffix(realm) + dn = 'cn=masters,cn=ipa,cn=etc,%s' % ipautil.realm_to_suffix(realm) entries = conn.search_s(dn, ldap.SCOPE_ONELEVEL) for ent in entries: peers[ent.cn] = ['master', ''] - dn = 'cn=replicas,cn=ipa,cn=etc,%s' % util.realm_to_suffix(realm) + dn = 'cn=replicas,cn=ipa,cn=etc,%s' % ipautil.realm_to_suffix(realm) entries = conn.search_s(dn, ldap.SCOPE_ONELEVEL) for ent in entries: @@ -255,7 +255,7 @@ def del_link(realm, replica1, replica2, dirman_passwd, force=False): if type1 == replication.WINSYNC: try: dn = 'cn=%s,cn=replicas,cn=ipa,cn=etc,%s' % (replica2, - util.realm_to_suffix(realm)) + ipautil.realm_to_suffix(realm)) entries = repl1.conn.search_s(dn, ldap.SCOPE_SUBTREE) if len(entries) != 0: dnset = repl1.conn.get_dns_sorted_by_length(entries, |