summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/host.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-02-12 16:34:21 -0500
committerJason Gerard DeRose <jderose@redhat.com>2010-02-15 13:10:11 -0700
commit58746226d4b36bc40de91d4d1dd283e9faaff639 (patch)
tree11c4cd42b0285ff366c68274495cd1e9ee7fa7da /ipalib/plugins/host.py
parent99dcf9d4f97ac8bff112d6ccc36bb5b894fa5bcd (diff)
downloadfreeipa-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/host.py')
-rw-r--r--ipalib/plugins/host.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 7e9dd90ba..c459cfe09 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):