diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-01-10 06:14:15 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-01 16:59:42 +0100 |
commit | c0a89efd6852bfd07dec4c8b1e74f0e927e7fdd8 (patch) | |
tree | d5aba820545bebcacae11a33fc4233eef25972bd /ipaserver | |
parent | ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d (diff) | |
download | freeipa-c0a89efd6852bfd07dec4c8b1e74f0e927e7fdd8.tar.gz freeipa-c0a89efd6852bfd07dec4c8b1e74f0e927e7fdd8.tar.xz freeipa-c0a89efd6852bfd07dec4c8b1e74f0e927e7fdd8.zip |
Remove some unused imports
Remove all unused LDAP-related imports, plus some other ones.
This should make it easier to quickly check what uses which LDAP wrapper
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/dsinstance.py | 5 | ||||
-rw-r--r-- | ipaserver/install/krbinstance.py | 4 | ||||
-rw-r--r-- | ipaserver/install/ldapupdate.py | 26 | ||||
-rw-r--r-- | ipaserver/install/plugins/updateclient.py | 4 | ||||
-rw-r--r-- | ipaserver/install/replication.py | 9 | ||||
-rw-r--r-- | ipaserver/ipaldap.py | 1 | ||||
-rw-r--r-- | ipaserver/plugins/dogtag.py | 4 | ||||
-rw-r--r-- | ipaserver/plugins/ldap2.py | 3 |
8 files changed, 19 insertions, 37 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py index 367496f18..4689fd2bf 100644 --- a/ipaserver/install/dsinstance.py +++ b/ipaserver/install/dsinstance.py @@ -21,7 +21,6 @@ import shutil from ipapython.ipa_log_manager import * import pwd -import glob import sys import os import re @@ -39,11 +38,9 @@ import certs import ldap from ipaserver import ipaldap from ipaserver.install import ldapupdate -from ipaserver.install import httpinstance from ipaserver.install import replication -from ipalib import util, errors +from ipalib import errors from ipapython.dn import DN -from ipaserver.plugins.ldap2 import ldap2 import base64 SERVER_ROOT_64 = "/usr/lib64/dirsrv" diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py index daacab5d7..d783da0ab 100644 --- a/ipaserver/install/krbinstance.py +++ b/ipaserver/install/krbinstance.py @@ -30,7 +30,6 @@ import installutils from ipapython import sysrestore from ipapython import ipautil from ipapython import services as ipaservices -from ipalib import util from ipalib import errors from ipapython.ipa_log_manager import * from ipapython.dn import DN @@ -41,10 +40,7 @@ from ipaserver.install import dsinstance import ldap from ldap import LDAPError -from ldap import ldapobject -from pyasn1.type import univ, namedtype -import pyasn1.codec.ber.encoder import pyasn1.codec.ber.decoder import struct diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 485441089..f08ee8b9e 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -25,29 +25,27 @@ UPDATES_DIR="/usr/share/ipa/updates/" import sys -from ipaserver.install import installutils -from ipaserver.install import service -from ipaserver import ipaldap -from ipapython import entity, ipautil import uuid -from ipalib import util -from ipalib import errors -from ipalib import api -from ipapython.dn import DN -import ldap -from ldap.schema.models import ObjectClass, AttributeType -from ipapython.ipa_log_manager import * -import krbV import platform import time -import random import os import pwd import fnmatch import csv import inspect + +import krbV +import ldap +from ldap.schema.models import ObjectClass, AttributeType + +from ipaserver.install import installutils +from ipaserver import ipaldap +from ipapython import entity, ipautil +from ipalib import errors +from ipalib import api +from ipapython.dn import DN +from ipapython.ipa_log_manager import * from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE -from ipaserver.install.plugins import FIRST, MIDDLE, LAST class BadSyntax(installutils.ScriptError): def __init__(self, value): diff --git a/ipaserver/install/plugins/updateclient.py b/ipaserver/install/plugins/updateclient.py index 7da583fd8..a4bc79238 100644 --- a/ipaserver/install/plugins/updateclient.py +++ b/ipaserver/install/plugins/updateclient.py @@ -17,16 +17,12 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import os -from ipaserver.install.plugins import FIRST, MIDDLE, LAST -from ipaserver.install.plugins import POST_UPDATE from ipaserver.install.plugins.baseupdate import DSRestart from ipaserver.install.ldapupdate import LDAPUpdate from ipapython.ipautil import wait_for_open_socket from ipalib import api from ipalib import backend from ipapython.dn import DN -import ldap as _ldap class updateclient(backend.Executioner): """ diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 1c90173d2..fdd5c0b4d 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -18,15 +18,14 @@ # import time -from ipapython.ipa_log_manager import * - -import os import sys + import ldap + from ipaserver import ipaldap +from ipalib import api, errors from ipapython import services as ipaservices -from ldap import modlist -from ipalib import api, util, errors +from ipapython.ipa_log_manager import * from ipapython import ipautil, dogtag from ipapython.dn import DN diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py index c7e1552e6..b7b8bc183 100644 --- a/ipaserver/ipaldap.py +++ b/ipaserver/ipaldap.py @@ -33,7 +33,6 @@ import struct import ldap.sasl import ldapurl from ldap.controls import LDAPControl -from ldap.ldapobject import SimpleLDAPObject from ipapython.ipa_log_manager import * from ipapython import ipautil from ipalib import errors diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py index 28bf754cb..343368c99 100644 --- a/ipaserver/plugins/dogtag.py +++ b/ipaserver/plugins/dogtag.py @@ -1207,9 +1207,9 @@ from ipalib import api, SkipPluginModule if api.env.ra_plugin != 'dogtag': # In this case, abort loading this plugin module... raise SkipPluginModule(reason='dogtag not selected as RA plugin') -import os, random, ldap +import os, random from ipaserver.plugins import rabase -from ipalib.errors import NetworkError, CertificateOperationError +from ipalib.errors import CertificateOperationError from ipalib.constants import TYPE_ERROR from ipalib.util import cachedproperty from ipapython import dogtag diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index 86ea5d479..fa2935177 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -29,14 +29,11 @@ Backend plugin for LDAP. import copy import os -import socket -import string import shutil import tempfile import time import re import pwd -import sys from decimal import Decimal import krbV |