diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-10-04 17:45:40 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-10-28 15:15:52 -0400 |
commit | c25d62965af9dffc655d659dfcd1f39e8d08e66c (patch) | |
tree | 7b939938c863b67fd65253f45d9d486b58b92627 /ipalib/plugins/hostgroup.py | |
parent | 47629a604d7f312ccb32e6b260782cb7c5c70954 (diff) | |
download | freeipa-c25d62965af9dffc655d659dfcd1f39e8d08e66c.tar.gz freeipa-c25d62965af9dffc655d659dfcd1f39e8d08e66c.tar.xz freeipa-c25d62965af9dffc655d659dfcd1f39e8d08e66c.zip |
Populate indirect members when showing a group object.
This is done by creating a new attribute, memberindirect, to hold this
indirect membership.
The new function get_members() can return all members or just indirect or
direct. We are only using it to retrieve indirect members currently.
This also:
* Moves all member display attributes into baseldap.py to reduce duplication
* Adds netgroup nesting
* Use a unique object name in hbacsvc and hbacsvcgroup
ticket 296
Diffstat (limited to 'ipalib/plugins/hostgroup.py')
-rw-r--r-- | ipalib/plugins/hostgroup.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index 2f9cbab2c..51d058369 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -59,11 +59,14 @@ class hostgroup(LDAPObject): object_name = 'hostgroup' object_name_plural = 'hostgroups' object_class = ['ipaobject', 'ipahostgroup'] - default_attributes = ['cn', 'description', 'member', 'memberof'] + default_attributes = ['cn', 'description', 'member', 'memberof', + 'memberindirect' + ] uuid_attribute = 'ipauniqueid' attribute_members = { 'member': ['host', 'hostgroup'], 'memberof': ['hostgroup'], + 'memberindirect': ['host', 'hostgroup'], } label = _('Host Groups') @@ -81,18 +84,6 @@ class hostgroup(LDAPObject): label=_('Description'), doc=_('A description of this host-group'), ), - Str('member_host?', - label=_('Member hosts'), - flags=['no_create', 'no_update', 'no_search'], - ), - Str('member_hostgroup?', - label=_('Member host-groups'), - flags=['no_create', 'no_update', 'no_search'], - ), - Str('memberof_hostgroup?', - label=_('Member of host-groups'), - flags=['no_create', 'no_update', 'no_search'], - ), ) api.register(hostgroup) |