summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/ldapupdate.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipaserver/install/ldapupdate.py')
-rw-r--r--ipaserver/install/ldapupdate.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py
index ecdf8e6e1..b6c6d2b90 100644
--- a/ipaserver/install/ldapupdate.py
+++ b/ipaserver/install/ldapupdate.py
@@ -42,7 +42,8 @@ from ipalib import api
from ipaplatform.paths import paths
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 (PRE_UPDATE, POST_UPDATE,
+ PRE_SCHEMA_UPDATE)
from ipaserver.plugins import ldap2
UPDATES_DIR=paths.UPDATES_DIR
@@ -794,6 +795,18 @@ class LDAPUpdate:
for dn, update in sorted_updates:
self._delete_record(update)
+ def pre_schema_update(self, ordered=False):
+ """Execute the update before the LDPA schema is updated.
+ """
+ if self.plugins:
+ self.info('PRE_SCHEMA_UPDATE')
+ all_updates = {}
+ updates = api.Backend.updateclient.update(PRE_SCHEMA_UPDATE, self.dm_password, self.ldapi, self.live_run)
+ self.merge_updates(all_updates, updates)
+ self._run_updates(all_updates)
+
+ return self.modified
+
def update(self, files, ordered=False):
"""Execute the update. files is a list of the update files to use.