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/plugins | |
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/plugins')
-rw-r--r-- | ipaserver/install/plugins/__init__.py | 1 | ||||
-rw-r--r-- | ipaserver/install/plugins/baseupdate.py | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/ipaserver/install/plugins/__init__.py b/ipaserver/install/plugins/__init__.py index 49bef4df8..210c56ef7 100644 --- a/ipaserver/install/plugins/__init__.py +++ b/ipaserver/install/plugins/__init__.py @@ -20,6 +20,7 @@ """ Provide a separate api for updates. """ +PRE_SCHEMA_UPDATE = 0 PRE_UPDATE = 1 POST_UPDATE = 2 diff --git a/ipaserver/install/plugins/baseupdate.py b/ipaserver/install/plugins/baseupdate.py index a480a8ee2..dc6672ac5 100644 --- a/ipaserver/install/plugins/baseupdate.py +++ b/ipaserver/install/plugins/baseupdate.py @@ -20,7 +20,8 @@ from ipalib import api from ipalib import Updater, Object from ipaserver.install import service -from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE, MIDDLE +from ipaserver.install.plugins import (PRE_UPDATE, POST_UPDATE, + PRE_SCHEMA_UPDATE, MIDDLE) class DSRestart(service.Service): """ @@ -55,6 +56,18 @@ class update(Object): api.register(update) + +class PreSchemaUpdate(Updater): + """ + Base class for updates that run after file processing. + """ + updatetype = PRE_SCHEMA_UPDATE + order = MIDDLE + + def __init__(self): + super(PreSchemaUpdate, self).__init__() + + class PreUpdate(Updater): """ Base class for updates that run prior to file processing. |