summaryrefslogtreecommitdiffstats
path: root/ipalib/__init__.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/__init__.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/__init__.py')
-rw-r--r--ipalib/__init__.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index 83956e16d..beaf0ab51 100644
--- a/ipalib/__init__.py
+++ b/ipalib/__init__.py
@@ -584,9 +584,9 @@ For example, say we setup a command like this:
...
... def execute(self, key, **options):
... items = dict(
-... fruit='apple',
-... pet='dog',
-... city='Berlin',
+... fruit=u'apple',
+... pet=u'dog',
+... city=u'Berlin',
... )
... if key in items:
... return dict(result=items[key])
@@ -627,9 +627,9 @@ through the ``ipa`` script basically will do the following:
-----------
show-items:
-----------
- city = 'Berlin'
- fruit = 'apple'
- pet = 'dog'
+ city = u'Berlin'
+ fruit = u'apple'
+ pet = u'dog'
-------
3 items
-------
@@ -641,9 +641,9 @@ Similarly, calling it with ``reverse=True`` would result in the following:
-----------
show-items:
-----------
- pet = 'dog'
- fruit = 'apple'
- city = 'Berlin'
+ pet = u'dog'
+ fruit = u'apple'
+ city = u'Berlin'
--------------------------
3 items (in reverse order)
--------------------------
@@ -652,7 +652,7 @@ Lastly, providing a ``key`` would result in the following:
>>> result = api.Command.show_items(u'city')
>>> api.Command.show_items.output_for_cli(textui, result, 'city', reverse=False)
-city = 'Berlin'
+city = u'Berlin'
See the `ipalib.cli.textui` plugin for a description of its methods.