From 255cbb49763ff579feed935a5a725fc2b272749c Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Tue, 10 Jun 2014 11:27:51 -0400 Subject: Update all remaining plugins to the new Registry API Reviewed-By: Petr Vobornik --- ipalib/plugins/hbactest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/hbactest.py') 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) -- cgit