summaryrefslogtreecommitdiffstats
path: root/ipa-admintools/ipa-listdelegation
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-11-09 13:58:36 -0500
committerRob Crittenden <rcritten@redhat.com>2007-11-09 13:58:36 -0500
commit705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53 (patch)
treee7e51d7aee761902fbd022709c18a6b733f17876 /ipa-admintools/ipa-listdelegation
parent6f03dde1ab92f391f413f8cb0beded72a279d230 (diff)
downloadfreeipa-705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53.tar.gz
freeipa-705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53.tar.xz
freeipa-705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53.zip
Require uniqueness in the name/comment field of delegations
Fix error reporting in the UI to include the detailed message Sort delegations by name when displaying them Update the name field from "Name" to "Delegation Name"
Diffstat (limited to 'ipa-admintools/ipa-listdelegation')
-rw-r--r--ipa-admintools/ipa-listdelegation4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipa-admintools/ipa-listdelegation b/ipa-admintools/ipa-listdelegation
index 54ab346b..4c059c4a 100644
--- a/ipa-admintools/ipa-listdelegation
+++ b/ipa-admintools/ipa-listdelegation
@@ -23,6 +23,7 @@ from optparse import OptionParser
import ipa.ipaclient as ipaclient
import ipa.config
+import operator
import xmlrpclib
import kerberos
@@ -75,7 +76,8 @@ def main():
group_dn_to_cn = ipa.aci.extract_group_cns(aci_list, client)
- for a in aci_list:
+ # the operator.itemgetter(0) lets us sort by the name field
+ for a in sorted(aci_list, key=operator.itemgetter(0)):
labels = client.attrs_to_labels(a.attrs)
print "Delegation Name: " + a.name
print "Group " + group_dn_to_cn[a.source_group]