Add messages, declarative tests for rolegroup, taskgroup plugins

This commit is contained in:
Jason Gerard DeRose
2009-12-18 04:41:30 -07:00
committed by Rob Crittenden
parent ab1aba5a9a
commit e83c54587f
5 changed files with 822 additions and 239 deletions

View File

@@ -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)