summaryrefslogtreecommitdiffstats
path: root/ipalib/__init__.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-11-23 16:52:40 -0500
committerSimo Sorce <ssorce@redhat.com>2012-01-11 12:04:18 -0500
commit84b2fbe7baeec683b4a523b1f1dad1dff3f07939 (patch)
treec55a1ae7b2f858fcb0e9c30fef5db417bdf87e3e /ipalib/__init__.py
parent6b6283fb00dab28a5456a7d73f98332da9d986ed (diff)
downloadfreeipa.git-84b2fbe7baeec683b4a523b1f1dad1dff3f07939.tar.gz
freeipa.git-84b2fbe7baeec683b4a523b1f1dad1dff3f07939.tar.xz
freeipa.git-84b2fbe7baeec683b4a523b1f1dad1dff3f07939.zip
Add plugin framework to LDAP updates.
There are two reasons for the plugin framework: 1. To provide a way of doing manual/complex LDAP changes without having to keep extending ldapupdate.py (like we did with managed entries). 2. Allows for better control of restarts. There are two types of plugins, preop and postop. A preop plugin runs before any file-based updates are loaded. A postop plugin runs after all file-based updates are applied. A preop plugin may update LDAP directly or craft update entries to be applied with the file-based updates. Either a preop or postop plugin may attempt to restart the dirsrv instance. The instance is only restartable if ipa-ldap-updater is being executed as root. A warning is printed if a restart is requested for a non-root user. Plugins are not executed by default. This is so we can use ldapupdate to apply simple updates in commands like ipa-nis-manage. https://fedorahosted.org/freeipa/ticket/1789 https://fedorahosted.org/freeipa/ticket/1790 https://fedorahosted.org/freeipa/ticket/2032
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r--ipalib/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index 04896465..c54717bf 100644
--- a/ipalib/__init__.py
+++ b/ipalib/__init__.py
@@ -875,7 +875,7 @@ freeIPA.org:
import os
import plugable
from backend import Backend
-from frontend import Command, LocalOrRemote
+from frontend import Command, LocalOrRemote, Updater
from frontend import Object, Method, Property
from crud import Create, Retrieve, Update, Delete, Search
from parameters import DefaultFrom, Bool, Flag, Int, Float, Bytes, Str, IA5Str, Password,List
@@ -907,7 +907,7 @@ def create_api(mode='dummy'):
- `backend.Backend`
"""
- api = plugable.API(Command, Object, Method, Property, Backend)
+ api = plugable.API(Command, Object, Method, Property, Backend, Updater)
if mode is not None:
api.env.mode = mode
assert mode != 'production'