summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/hbacrule.py7
-rw-r--r--ipalib/plugins/rpcclient.py13
2 files changed, 10 insertions, 10 deletions
diff --git a/ipalib/plugins/hbacrule.py b/ipalib/plugins/hbacrule.py
index 54487eded..54c661133 100644
--- a/ipalib/plugins/hbacrule.py
+++ b/ipalib/plugins/hbacrule.py
@@ -410,7 +410,7 @@ class hbacrule_disable(LDAPQuery):
)
-
+# @register()
class hbacrule_add_accesstime(LDAPQuery):
"""
Add an access time to an HBAC rule.
@@ -449,9 +449,8 @@ class hbacrule_add_accesstime(LDAPQuery):
)
)
-#api.register(hbacrule_add_accesstime)
-
+# @register()
class hbacrule_remove_accesstime(LDAPQuery):
"""
Remove access time to HBAC rule.
@@ -489,8 +488,6 @@ class hbacrule_remove_accesstime(LDAPQuery):
)
)
-#api.register(hbacrule_remove_accesstime)
-
@register()
class hbacrule_add_user(LDAPAddMember):
diff --git a/ipalib/plugins/rpcclient.py b/ipalib/plugins/rpcclient.py
index 6010b8dda..af2bc38d4 100644
--- a/ipalib/plugins/rpcclient.py
+++ b/ipalib/plugins/rpcclient.py
@@ -23,12 +23,15 @@
RPC client plugins.
"""
-from ipalib import api
+from ipalib import Registry, api
+
+register = Registry()
+
if 'in_server' in api.env and api.env.in_server is False:
from ipalib.rpc import xmlclient, jsonclient
- api.register(xmlclient)
- api.register(jsonclient)
+ register()(xmlclient)
+ register()(jsonclient)
# FIXME: api.register only looks at the class name, so we need to create
# trivial subclasses with the desired name.
@@ -37,14 +40,14 @@ if 'in_server' in api.env and api.env.in_server is False:
class rpcclient(xmlclient):
"""xmlclient renamed to 'rpcclient'"""
pass
- api.register(rpcclient)
+ register()(rpcclient)
elif api.env.rpc_protocol == 'jsonrpc':
class rpcclient(jsonclient):
"""jsonclient renamed to 'rpcclient'"""
pass
- api.register(rpcclient)
+ register()(rpcclient)
else:
raise ValueError('unknown rpc_protocol: %s' % api.env.rpc_protocol)