diff options
author | Nathaniel McCallum <npmccallum@redhat.com> | 2014-06-10 11:27:51 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-06-11 09:24:22 +0200 |
commit | 255cbb49763ff579feed935a5a725fc2b272749c (patch) | |
tree | 81acc8ce7bb59536498f993ff6c67a105fb49e7b /ipalib/plugins/hbactest.py | |
parent | 47d8fec92f65833e157adb0ea136e14e1fa4cde3 (diff) | |
download | freeipa-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/hbactest.py')
-rw-r--r-- | ipalib/plugins/hbactest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/plugins/hbactest.py b/ipalib/plugins/hbactest.py index 6fbf1fbe2..068190310 100644 --- a/ipalib/plugins/hbactest.py +++ b/ipalib/plugins/hbactest.py @@ -23,6 +23,7 @@ from types import NoneType from ipalib.cli import to_cli from ipalib import _, ngettext from ipapython.dn import DN +from ipalib.plugable import Registry if api.env.in_server and api.env.context in ['lite', 'server']: try: import ipaserver.dcerpc @@ -205,6 +206,8 @@ EXAMPLES: Not matched rules: can_login """) +register = Registry() + def convert_to_ipa_rule(rule): # convert a dict with a rule to an pyhbac rule ipa_rule = pyhbac.HbacRule(rule['cn'][0]) @@ -237,6 +240,7 @@ def convert_to_ipa_rule(rule): return ipa_rule +@register() class hbactest(Command): __doc__ = _('Simulate use of Host-based access controls') @@ -510,4 +514,3 @@ class hbactest(Command): # Propagate integer value for result. It will give proper command line result for scripts return int(not output['value']) -api.register(hbactest) |