diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-02-12 16:34:21 -0500 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2010-02-15 13:10:11 -0700 |
commit | 58746226d4b36bc40de91d4d1dd283e9faaff639 (patch) | |
tree | 11c4cd42b0285ff366c68274495cd1e9ee7fa7da /ipalib/plugins/netgroup.py | |
parent | 99dcf9d4f97ac8bff112d6ccc36bb5b894fa5bcd (diff) | |
download | freeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.tar.gz freeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.tar.xz freeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.zip |
Use the Output tuple to determine the order of output
The attributes displayed is now dependant upon their definition in
a Param. This enhances that, giving some level of control over how
the result is displayed to the user.
This also fixes displaying group membership, including failures of
adding/removing entries.
All tests pass now though there is still one problem. We need to
return the dn as well. Once that is fixed we just need to comment
out all the dn entries in the tests and they should once again
pass.
Diffstat (limited to 'ipalib/plugins/netgroup.py')
-rw-r--r-- | ipalib/plugins/netgroup.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py index 094a6d870..767bc1b35 100644 --- a/ipalib/plugins/netgroup.py +++ b/ipalib/plugins/netgroup.py @@ -34,22 +34,21 @@ class netgroup(LDAPObject): object_name = 'netgroup' object_name_plural = 'netgroups' object_class = ['ipaobject', 'ipaassociation', 'ipanisnetgroup'] - default_attributes = ['cn', 'description', 'member', 'memberof'] + default_attributes = ['cn', 'description', 'member', 'memberof', 'externalhost'] uuid_attribute = 'ipauniqueid' attribute_names = { 'cn': 'name', - 'member user': 'member users', - 'member group': 'member groups', - 'member host': 'member hosts', - 'member hostgroup': 'member hostgroups', - 'member netgroup': 'member netgroups', - 'memberof netgroup': 'member of netgroups', - 'externalhost': 'external hosts', + 'member_user': 'member users', + 'member_group': 'member groups', + 'member_host': 'member hosts', + 'member_hostgroup': 'member hostgroups', + 'member_netgroup': 'member netgroups', + 'memberof_netgroup': 'member of netgroups', + 'externalhost': 'externalhost', } attribute_members = { 'member': ['user', 'group', 'host', 'hostgroup', 'netgroup'], 'memberof': ['netgroup'], - 'externalhost': [], } label = _('Net Groups') @@ -72,6 +71,14 @@ class netgroup(LDAPObject): label='NIS domain name', doc='NIS domain name', ), + Str('member_host?', + label='Member Host', + flags=['no_create', 'no_update', 'no_search'], + ), + Str('externalhost?', + label='External Host', + flags=['no_create', 'no_update', 'no_search'], + ), ) def get_dn(self, *keys, **kwargs): |