From 58746226d4b36bc40de91d4d1dd283e9faaff639 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 12 Feb 2010 16:34:21 -0500 Subject: 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. --- ipalib/plugins/host.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'ipalib/plugins/host.py') diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 7e9dd90b..c459cfe0 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -54,8 +54,8 @@ class host(LDAPObject): object_class = ['ipaobject', 'nshost', 'ipahost', 'pkiuser', 'ipaservice'] # object_class_config = 'ipahostobjectclasses' default_attributes = [ - 'fqdn', 'description', 'l', 'nshostlocation', - 'nshardwareplatform', 'nsosversion', 'usercertificate', + 'fqdn', 'description', 'l', 'nshostlocation', 'krbprincipalname', + 'nshardwareplatform', 'nsosversion', 'usercertificate', 'memberof', ] uuid_attribute = 'ipauniqueid' attribute_names = { @@ -70,9 +70,9 @@ class host(LDAPObject): 'enrolledby user': 'enrolled by', 'krbprincipalname': 'kerberos principal', 'ipauniqueid': 'unique identifier', - 'memberof hostgroup': 'member of hostgroups', - 'memberof netgroup': 'member of netgroups', - 'memberof rolegroup': 'member of rolegroups', + 'memberof_hostgroup': 'member of hostgroups', + 'memberof_netgroup': 'member of netgroups', + 'memberof_rolegroup': 'member of rolegroups', } attribute_members = { 'enrolledby': ['user'], @@ -93,7 +93,7 @@ class host(LDAPObject): label='Description', doc='Description of the host', ), - Str('locality?', + Str('l?', cli_name='locality', label='Locality', doc='Locality of the host (Baltimore, MD)', @@ -122,6 +122,22 @@ class host(LDAPObject): cli_name='certificate', doc='base-64 encoded server certificate', ), + Str('krbprincipalname?', + label='Principal Name', + flags=['no_create', 'no_update', 'no_search'], + ), + Str('memberof_hostgroup?', + label='Member of Host Groups', + flags=['no_create', 'no_update', 'no_search'], + ), + Str('memberof_netgroup?', + label='Member Net Groups', + flags=['no_create', 'no_update', 'no_search'], + ), + Str('memberof_rolegroup?', + label='Member of Role Groups', + flags=['no_create', 'no_update', 'no_search'], + ), ) def get_dn(self, *keys, **options): -- cgit