summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-21 06:05:07 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:44 +0100
commit334ba2e79f64786fd3918a32bcbe68e4bf1182b0 (patch)
tree3518e146e89bbee73814c6b43a683ddce0b0d715
parentabb22806a77eac671a50c37af39be35ca42d3af5 (diff)
downloadfreeipa-334ba2e79f64786fd3918a32bcbe68e4bf1182b0.tar.gz
freeipa-334ba2e79f64786fd3918a32bcbe68e4bf1182b0.tar.xz
freeipa-334ba2e79f64786fd3918a32bcbe68e4bf1182b0.zip
Remove unused imports from ipaserver/install
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
-rw-r--r--ipaserver/install/adtrustinstance.py9
-rw-r--r--ipaserver/install/bindinstance.py15
-rw-r--r--ipaserver/install/cainstance.py8
-rw-r--r--ipaserver/install/certs.py13
-rw-r--r--ipaserver/install/httpinstance.py5
-rw-r--r--ipaserver/install/installutils.py5
-rw-r--r--ipaserver/install/ntpinstance.py1
-rw-r--r--ipaserver/install/plugins/baseupdate.py1
-rw-r--r--ipaserver/install/plugins/dns.py1
-rw-r--r--ipaserver/install/plugins/fix_replica_agreements.py2
-rw-r--r--ipaserver/install/plugins/rename_managed.py5
-rw-r--r--ipaserver/install/service.py14
12 files changed, 24 insertions, 55 deletions
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index 9775a4e83..9cc533b96 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -22,7 +22,10 @@ import errno
import ldap
import tempfile
import uuid
-from ipaserver.install import installutils
+import string
+import struct
+import re
+
from ipaserver.install import service
from ipaserver.install.dsinstance import realm_to_serverid
from ipaserver.install.bindinstance import get_rr, add_rr, del_rr, \
@@ -33,13 +36,9 @@ from ipapython import sysrestore
from ipapython import ipautil
from ipapython.ipa_log_manager import *
from ipapython import services as ipaservices
-from ipapython.dn import DN
import ipaclient.ipachangeconf
-import string
-import struct
-import re
ALLOWED_NETBIOS_CHARS = string.ascii_uppercase + string.digits
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index a528320c8..123f559aa 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -23,25 +23,22 @@ import pwd
import netaddr
import re
-import installutils
import ldap
+
+import installutils
import service
from ipaserver import ipaldap
from ipaserver.install.dsinstance import realm_to_serverid
from ipaserver.install.cainstance import IPA_CA_CNAME
-from ipaserver.install.installutils import resolve_host
from ipapython import sysrestore
from ipapython import ipautil
-from ipalib.parameters import IA5Str
+from ipapython.ipa_log_manager import *
+from ipapython.dn import DN
+import ipalib
+from ipalib import api, errors
from ipalib.util import (validate_zonemgr, normalize_zonemgr,
get_dns_forward_zone_update_policy, get_dns_reverse_zone_update_policy,
normalize_zone, get_reverse_zone_default, zone_is_reverse)
-from ipapython.ipa_log_manager import *
-from ipalib.text import _
-
-import ipalib
-from ipalib import api, util, errors
-from ipapython.dn import DN
NAMED_CONF = '/etc/named.conf'
RESOLV_CONF = '/etc/resolv.conf'
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index e26dbaa6c..1c97041a5 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -34,9 +34,9 @@ import httplib
import urllib
import xml.dom.minidom
import stat
-import socket
import syslog
import ConfigParser
+
from ipapython import dogtag
from ipapython.certdb import get_ca_nickname
from ipapython import certmonger
@@ -46,11 +46,7 @@ from ipapython.dn import DN
import subprocess
import traceback
-from nss.error import NSPRError
-import nss.nss as nss
-
from ipapython import ipautil
-from ipapython import nsslib
from ipapython import services as ipaservices
from ipaserver import ipaldap
@@ -58,9 +54,7 @@ from ipaserver.install import service
from ipaserver.install import installutils
from ipaserver.install import dsinstance
from ipaserver.install import certs
-from ipaserver.install.installutils import ReplicaConfig
from ipaserver.plugins import ldap2
-from ipalib import util
from ipapython.ipa_log_manager import *
HTTPD_CONFD = "/etc/httpd/conf.d/"
diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py
index 360639ddc..2e78e03e2 100644
--- a/ipaserver/install/certs.py
+++ b/ipaserver/install/certs.py
@@ -19,36 +19,27 @@
import os, stat, subprocess, re
import sys
-import errno
import tempfile
import shutil
from ipapython.ipa_log_manager import *
-import urllib
import xml.dom.minidom
import pwd
import fcntl
import base64
from hashlib import sha1
+from ConfigParser import RawConfigParser, MissingSectionHeaderError
-from ipapython import nsslib
from ipapython import dogtag
from ipapython import sysrestore
from ipapython import ipautil
from ipapython import certmonger
from ipapython.certdb import get_ca_nickname
-from ipalib import pkcs10
-from ConfigParser import RawConfigParser, MissingSectionHeaderError
from ipapython import services as ipaservices
-from ipalib import x509
from ipapython.dn import DN
+from ipalib import pkcs10, x509, api
from ipalib.errors import CertificateOperationError
from ipalib.text import _
-from nss.error import NSPRError
-import nss.nss as nss
-
-from ipalib import api
-
# Apache needs access to this database so we need to create it
# where apache can reach
NSS_DIR = "/etc/httpd/alias"
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 5c35b5cd2..62ef41e7a 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -20,19 +20,18 @@
import os
import os.path
import tempfile
-from ipapython.ipa_log_manager import *
import pwd
import shutil
import service
import certs
-import dsinstance
import installutils
from ipapython import sysrestore
from ipapython import ipautil
from ipapython import services as ipaservices
from ipapython import dogtag
-from ipalib import util, api
+from ipapython.ipa_log_manager import *
+from ipalib import api
HTTPD_DIR = "/etc/httpd"
SSL_CONF = HTTPD_DIR + "/conf.d/ssl.conf"
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 3368533d1..a9728582c 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -18,16 +18,11 @@
#
import socket
-import errno
import getpass
import os
import re
import fileinput
import sys
-import struct
-import fcntl
-import netaddr
-import time
import tempfile
import shutil
from ConfigParser import SafeConfigParser, NoOptionError
diff --git a/ipaserver/install/ntpinstance.py b/ipaserver/install/ntpinstance.py
index 5fbe21df4..f2e8ffe36 100644
--- a/ipaserver/install/ntpinstance.py
+++ b/ipaserver/install/ntpinstance.py
@@ -21,7 +21,6 @@
import service
from ipapython import sysrestore
from ipapython import ipautil
-from ipapython import services as ipaservices
from ipapython.ipa_log_manager import *
class NTPInstance(service.Service):
diff --git a/ipaserver/install/plugins/baseupdate.py b/ipaserver/install/plugins/baseupdate.py
index a0e088478..a480a8ee2 100644
--- a/ipaserver/install/plugins/baseupdate.py
+++ b/ipaserver/install/plugins/baseupdate.py
@@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ipalib import api
-from ipalib import errors
from ipalib import Updater, Object
from ipaserver.install import service
from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE, MIDDLE
diff --git a/ipaserver/install/plugins/dns.py b/ipaserver/install/plugins/dns.py
index d55596704..b875ff019 100644
--- a/ipaserver/install/plugins/dns.py
+++ b/ipaserver/install/plugins/dns.py
@@ -19,7 +19,6 @@
from ipaserver.install.plugins import MIDDLE
from ipaserver.install.plugins.baseupdate import PostUpdate
-from ipaserver.install.plugins import baseupdate
from ipalib import api, errors, util
from ipapython.dn import DN
from ipalib.plugins.dns import dns_container_exists
diff --git a/ipaserver/install/plugins/fix_replica_agreements.py b/ipaserver/install/plugins/fix_replica_agreements.py
index 54cbdd4d7..82098dd5a 100644
--- a/ipaserver/install/plugins/fix_replica_agreements.py
+++ b/ipaserver/install/plugins/fix_replica_agreements.py
@@ -19,7 +19,7 @@
import os
import pwd
-from ipaserver.install.plugins import PRE_UPDATE, MIDDLE
+from ipaserver.install.plugins import MIDDLE
from ipaserver.install.plugins.baseupdate import PreUpdate
from ipaserver import ipaldap
from ipaserver.install import replication
diff --git a/ipaserver/install/plugins/rename_managed.py b/ipaserver/install/plugins/rename_managed.py
index 99dac8148..c83e8a8a2 100644
--- a/ipaserver/install/plugins/rename_managed.py
+++ b/ipaserver/install/plugins/rename_managed.py
@@ -17,11 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE, FIRST, LAST
-from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE, FIRST, LAST
+from ipaserver.install.plugins import FIRST, LAST
from ipaserver.install.plugins.baseupdate import PreUpdate, PostUpdate
-from ipalib.frontend import Updater
-from ipaserver.install.plugins import baseupdate
from ipalib import api, errors
from ipapython import ipautil
from ipapython.dn import DN, EditableDN
diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py
index c0406d0ef..dde36a829 100644
--- a/ipaserver/install/service.py
+++ b/ipaserver/install/service.py
@@ -21,19 +21,19 @@ import sys
import os, socket
import tempfile
import pwd
+import time
+import datetime
+
+import ldap
+
from ipapython import sysrestore
from ipapython import ipautil
from ipapython import dogtag
from ipapython import services as ipaservices
-from ipalib import errors
from ipapython.dn import DN
-import ldap
-from ipaserver import ipaldap
-import base64
-import time
-import datetime
-from ipaserver.install import installutils
from ipapython.ipa_log_manager import *
+from ipalib import errors
+from ipaserver import ipaldap
CACERT = "/etc/ipa/ca.crt"