summaryrefslogtreecommitdiffstats
path: root/ipalib/backend.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-02-16 13:11:38 +0000
committerTomas Babej <tbabej@redhat.com>2015-03-05 11:01:36 +0100
commit2db741e847c60d712dbc8ee1cd65a978a78eb312 (patch)
tree12d5c372ef63cc2044c5436b4d657f4044de8fb0 /ipalib/backend.py
parentaa745b31d3762121bb0df1432cb2a48d1d15fd2a (diff)
downloadfreeipa-2db741e847c60d712dbc8ee1cd65a978a78eb312.tar.gz
freeipa-2db741e847c60d712dbc8ee1cd65a978a78eb312.tar.xz
freeipa-2db741e847c60d712dbc8ee1cd65a978a78eb312.zip
ipalib: Allow multiple API instances
Merged the Registrar class into the Registry class. Plugins are now registered globally instead of in ipalib.api and are instantiated per-API instance. Different set of plugin base classes can be used in each API instance. https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/backend.py')
-rw-r--r--ipalib/backend.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/backend.py b/ipalib/backend.py
index 210058981..4c1001d4d 100644
--- a/ipalib/backend.py
+++ b/ipalib/backend.py
@@ -27,7 +27,10 @@ import os
from errors import PublicError, InternalError, CommandError
from request import context, Connection, destroy_context
+register = plugable.Registry()
+
+@register.base()
class Backend(plugable.Plugin):
"""
Base class for all backend plugins.