diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2009-12-18 04:41:30 -0700 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-12-18 10:56:16 -0500 |
commit | e83c54587f07e53bfc92bd03ce54933d844f2d30 (patch) | |
tree | f559137c1f661a70169a5d19efb8a1fe6a164b4b /ipalib | |
parent | ab1aba5a9a97524645fa6a232fb1df397cb0355a (diff) | |
download | freeipa-e83c54587f07e53bfc92bd03ce54933d844f2d30.tar.gz freeipa-e83c54587f07e53bfc92bd03ce54933d844f2d30.tar.xz freeipa-e83c54587f07e53bfc92bd03ce54933d844f2d30.zip |
Add messages, declarative tests for rolegroup, taskgroup plugins
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/rolegroup.py | 20 | ||||
-rw-r--r-- | ipalib/plugins/taskgroup.py | 16 |
2 files changed, 29 insertions, 7 deletions
diff --git a/ipalib/plugins/rolegroup.py b/ipalib/plugins/rolegroup.py index 0d25516fc..d0ed0f0a8 100644 --- a/ipalib/plugins/rolegroup.py +++ b/ipalib/plugins/rolegroup.py @@ -21,9 +21,8 @@ Rolegroups """ -from ipalib import api -from ipalib import Str from ipalib.plugins.baseldap import * +from ipalib import api, Str, _, ngettext class rolegroup(LDAPObject): @@ -51,13 +50,15 @@ class rolegroup(LDAPObject): takes_params = ( Str('cn', cli_name='name', - doc='group name', + label='Name', + doc='rolegroup name', primary_key=True, normalizer=lambda value: value.lower(), ), Str('description', cli_name='desc', - doc='A description of this group', + label='Description', + doc='A description of this rolegroup', ), ) @@ -69,6 +70,8 @@ class rolegroup_add(LDAPCreate): Create new rolegroup. """ + msg_summary = _('Added rolegroup "%(value)s"') + api.register(rolegroup_add) @@ -77,6 +80,8 @@ class rolegroup_del(LDAPDelete): Delete rolegroup. """ + msg_summary = _('Deleted rolegroup "%(value)s"') + api.register(rolegroup_del) @@ -85,6 +90,8 @@ class rolegroup_mod(LDAPUpdate): Edit rolegroup. """ + msg_summary = _('Modified rolegroup "%(value)s"') + api.register(rolegroup_mod) @@ -93,6 +100,10 @@ class rolegroup_find(LDAPSearch): Search for rolegroups. """ + msg_summary = ngettext( + '%(count)d rolegroup matched', '%(count)d rolegroups matched' + ) + api.register(rolegroup_find) @@ -118,4 +129,3 @@ class rolegroup_remove_member(LDAPRemoveMember): """ api.register(rolegroup_remove_member) - diff --git a/ipalib/plugins/taskgroup.py b/ipalib/plugins/taskgroup.py index 56d2238ed..575db488e 100644 --- a/ipalib/plugins/taskgroup.py +++ b/ipalib/plugins/taskgroup.py @@ -21,8 +21,9 @@ Taskgroups """ -from ipalib import api from ipalib.plugins.baseldap import * +from ipalib import api, _, ngettext + class taskgroup(LDAPObject): @@ -49,12 +50,14 @@ class taskgroup(LDAPObject): takes_params = ( Str('cn', cli_name='name', + label='Taskgroup name', doc='taskgroup name', primary_key=True, normalizer=lambda value: value.lower(), ), Str('description', cli_name='desc', + label='Description', doc='taskgroup description', ), ) @@ -67,6 +70,8 @@ class taskgroup_add(LDAPCreate): Create new taskgroup. """ + msg_summary = _('Added taskgroup "%(value)s"') + api.register(taskgroup_add) @@ -75,6 +80,8 @@ class taskgroup_del(LDAPDelete): Delete taskgroup. """ + msg_summary = _('Deleted taskgroup "%(value)s"') + api.register(taskgroup_del) @@ -83,6 +90,8 @@ class taskgroup_mod(LDAPUpdate): Modify taskgroup. """ + msg_summary = _('Modified taskgroup "%(value)s"') + api.register(taskgroup_mod) @@ -91,6 +100,10 @@ class taskgroup_find(LDAPSearch): Search for taskgroups. """ + msg_summary = ngettext( + '%(count)d taskgroup matched', '%(count)d taskgroups matched' + ) + api.register(taskgroup_find) @@ -116,4 +129,3 @@ class taskgroup_remove_member(LDAPRemoveMember): """ api.register(taskgroup_remove_member) - |