summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaserver/install/ldapupdate.py4
-rw-r--r--ipaserver/ipaldap.py47
2 files changed, 2 insertions, 49 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py
index a35df371..f7f6c059 100644
--- a/ipaserver/install/ldapupdate.py
+++ b/ipaserver/install/ldapupdate.py
@@ -481,7 +481,7 @@ class LDAPUpdate:
def _create_default_entry(self, dn, default):
"""Create the default entry from the values provided.
- The return type is ipaldap.Entry
+ The return type is ipaldap.LDAPEntry
"""
assert isinstance(dn, DN)
entry = self.conn.make_entry(dn)
@@ -507,7 +507,7 @@ class LDAPUpdate:
def _get_entry(self, dn):
"""Retrieve an object from LDAP.
- The return type is ipaldap.Entry
+ The return type is ipaldap.LDAPEntry
"""
assert isinstance(dn, DN)
searchfilter="objectclass=*"
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py
index 9f7a0e9d..0724e224 100644
--- a/ipaserver/ipaldap.py
+++ b/ipaserver/ipaldap.py
@@ -769,49 +769,6 @@ class LDAPEntry(dict):
return result
-class Entry(LDAPEntry):
- """For compatibility with old code only
-
- This class represents an LDAP Entry object. An LDAP entry consists of
- a DN and a list of attributes. Each attribute consists of a name and
- a list of values. In python-ldap, entries are returned as a list of
- 2-tuples. Instance variables:
-
- * dn - DN object - the DN of the entry
- * data - CIDict - case insensitive dict of the attributes and values
- """
- def __init__(self, entrydata):
- """data is the raw data returned from the python-ldap result method, which is
- a search result entry or a reference or None.
- If creating a new empty entry, data is the string DN."""
- if entrydata:
- if isinstance(entrydata, tuple):
- dn = entrydata[0]
- data = ipautil.CIDict(entrydata[1])
- elif isinstance(entrydata, DN):
- dn = entrydata
- data = ipautil.CIDict()
- elif isinstance(entrydata, basestring):
- dn = DN(entrydata)
- data = ipautil.CIDict()
- elif isinstance(entrydata, LDAPEntry):
- dn = entrydata.dn
- data = entrydata
- elif isinstance(entrydata, dict):
- dn = entrydata['dn']
- del entrydata['dn']
- data = ipautil.CIDict(entrydata)
- else:
- raise TypeError(
- "entrydata must be 2-tuple, DN, or basestring, got %s" %
- type(entrydata))
- else:
- dn = DN()
- data = ipautil.CIDict()
-
- super(Entry, self).__init__(dn, data)
-
-
class LDAPConnection(object):
"""LDAP backend class
@@ -1690,10 +1647,6 @@ class IPAdmin(LDAPConnection):
self.__bind_with_wait(self.sasl_interactive_bind_s, timeout, None, auth_tokens)
self.__lateinit()
- def make_entry(self, _dn=None, _obj=None, **kwargs):
- entry = super(IPAdmin, self).make_entry(_dn, _obj, **kwargs)
- return Entry((entry.dn, entry))
-
def getEntry(self, base, scope, filterstr='(objectClass=*)',
attrlist=None):
# FIXME: for backwards compatibility only