diff options
author | Martin Basti <mbasti@redhat.com> | 2014-06-13 10:15:23 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-06-27 14:54:35 +0200 |
commit | c1f3fd6831c47a2672f37e12db149be1b1122d75 (patch) | |
tree | 98e92dcfae590e6c608fb2691a4505f79841560e /ipaserver/install/ldapupdate.py | |
parent | 5568e357d103bafaf9e2f7f1ba1fd507c89e0538 (diff) | |
download | freeipa-c1f3fd6831c47a2672f37e12db149be1b1122d75.tar.gz freeipa-c1f3fd6831c47a2672f37e12db149be1b1122d75.tar.xz freeipa-c1f3fd6831c47a2672f37e12db149be1b1122d75.zip |
Added upgrade step executed before schmema is upgraded
Class PreSchemaUpdate is executed before ldap schema update
This is required by ticket: https://fedorahosted.org/freeipa/ticket/3210
Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipaserver/install/ldapupdate.py')
-rw-r--r-- | ipaserver/install/ldapupdate.py | 15 |
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. |