summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/sudocmd.py
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2014-06-10 11:27:51 -0400
committerMartin Kosek <mkosek@redhat.com>2014-06-11 09:24:22 +0200
commit255cbb49763ff579feed935a5a725fc2b272749c (patch)
tree81acc8ce7bb59536498f993ff6c67a105fb49e7b /ipalib/plugins/sudocmd.py
parent47d8fec92f65833e157adb0ea136e14e1fa4cde3 (diff)
downloadfreeipa-255cbb49763ff579feed935a5a725fc2b272749c.tar.gz
freeipa-255cbb49763ff579feed935a5a725fc2b272749c.tar.xz
freeipa-255cbb49763ff579feed935a5a725fc2b272749c.zip
Update all remaining plugins to the new Registry API
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'ipalib/plugins/sudocmd.py')
-rw-r--r--ipalib/plugins/sudocmd.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py
index 4c7ea7f88..4a81f06af 100644
--- a/ipalib/plugins/sudocmd.py
+++ b/ipalib/plugins/sudocmd.py
@@ -23,6 +23,7 @@ import sys
from ipalib import api, errors, util
from ipalib import Str
+from ipalib.plugable import Registry
from ipalib.plugins.baseldap import *
from ipalib import _, ngettext
@@ -41,8 +42,11 @@ EXAMPLES:
""")
+register = Registry()
+
topic = ('sudo', _('commands for controlling sudo configuration'))
+@register()
class sudocmd(LDAPObject):
"""
Sudo Command object.
@@ -108,15 +112,15 @@ class sudocmd(LDAPObject):
pass
return dn
-api.register(sudocmd)
+@register()
class sudocmd_add(LDAPCreate):
__doc__ = _('Create new Sudo Command.')
msg_summary = _('Added Sudo Command "%(value)s"')
-api.register(sudocmd_add)
+@register()
class sudocmd_del(LDAPDelete):
__doc__ = _('Delete Sudo Command.')
@@ -148,15 +152,15 @@ class sudocmd_del(LDAPDelete):
dependent=', '.join(dependent_sudorules))
return dn
-api.register(sudocmd_del)
+@register()
class sudocmd_mod(LDAPUpdate):
__doc__ = _('Modify Sudo Command.')
msg_summary = _('Modified Sudo Command "%(value)s"')
-api.register(sudocmd_mod)
+@register()
class sudocmd_find(LDAPSearch):
__doc__ = _('Search for Sudo Commands.')
@@ -164,9 +168,8 @@ class sudocmd_find(LDAPSearch):
'%(count)d Sudo Command matched', '%(count)d Sudo Commands matched', 0
)
-api.register(sudocmd_find)
+@register()
class sudocmd_show(LDAPRetrieve):
__doc__ = _('Display Sudo Command.')
-api.register(sudocmd_show)