summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-11-10 14:55:45 -0500
committerMartin Kosek <mkosek@redhat.com>2011-11-11 08:40:02 +0100
commit97660ac4d5d55fcd0ee40dc5ed863a1e1265492b (patch)
tree807c729d86f251ad41baeecb60cc29f852c12ad4 /ipaserver
parent8089f2859c94223da3d33421c20e1d6ae21d9abf (diff)
downloadfreeipa-97660ac4d5d55fcd0ee40dc5ed863a1e1265492b.tar.gz
freeipa-97660ac4d5d55fcd0ee40dc5ed863a1e1265492b.tar.xz
freeipa-97660ac4d5d55fcd0ee40dc5ed863a1e1265492b.zip
Remove calls to has_managed_entries()
At one point in time we couldn't depend on the 389-ds having the managed entries plugin so this code was added to support both versions. It is no longer needed. https://fedorahosted.org/freeipa/ticket/1242
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/dsinstance.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 995877c11..15de54e9a 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -110,26 +110,6 @@ def check_ports():
def is_ds_running(server_id=''):
return ipaservices.knownservices.dirsrv.is_running(instance_name=server_id)
-def has_managed_entries(host_name, dm_password):
- """Check to see if the Managed Entries plugin is available"""
- ldapuri = 'ldap://%s' % ipautil.format_netloc(host_name)
- conn = None
- try:
- conn = ldap2(shared_instance=False, ldap_uri=ldapuri, base_dn='cn=config')
- conn.connect(bind_dn='cn=Directory Manager', bind_pw=dm_password)
- (dn, attrs) = conn.get_entry('cn=Managed Entries,cn=plugins',
- ['*'], time_limit=2, size_limit=3000)
- return True
- except errors.NotFound:
- return False
- except errors.ExecutionError, e:
- logging.critical("Could not connect to the Directory Server on %s" % host_name)
- raise e
- finally:
- if conn.isconnected():
- conn.disconnect()
-
-
INF_TEMPLATE = """
[General]
FullMachineName= $FQHN
@@ -457,8 +437,6 @@ class DsInstance(service.Service):
self._ldap_mod("unique-attributes.ldif", self.sub_dict)
def __config_uidgid_gen(self):
- if not has_managed_entries(self.fqdn, self.dm_password):
- raise errors.NotFound(reason='Missing Managed Entries Plugin')
self._ldap_mod("dna.ldif", self.sub_dict)
def __add_master_entry(self):
@@ -488,23 +466,15 @@ class DsInstance(service.Service):
self._ldap_mod("lockout-conf.ldif")
def __repoint_managed_entries(self):
- if not has_managed_entries(self.fqdn, self.dm_password):
- raise errors.NotFound(reason='Missing Managed Entries Plugin')
self._ldap_mod("repoint-managed-entries.ldif", self.sub_dict)
def __managed_entries(self):
- if not has_managed_entries(self.fqdn, self.dm_password):
- raise errors.NotFound(reason='Missing Managed Entries Plugin')
self._ldap_mod("managed-entries.ldif", self.sub_dict)
def __user_private_groups(self):
- if not has_managed_entries(self.fqdn, self.dm_password):
- raise errors.NotFound(reason='Missing Managed Entries Plugin')
self._ldap_mod("user_private_groups.ldif", self.sub_dict)
def __host_nis_groups(self):
- if not has_managed_entries(self.fqdn, self.dm_password):
- raise errors.NotFound(reason='Missing Managed Entries Plugin')
self._ldap_mod("host_nis_groups.ldif", self.sub_dict)
def __add_enrollment_module(self):