-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/29/2010 08:45 PM, Rob Crittenden wrote:
> Jakub Hrozek wrote:
> https://fedorahosted.org/freeipa/ticket/244
> 
> If I understand the code correctly, --all is not really a parameter that
> affects only output, it also causes all attributes to be retrieved from
> the server, so I have adjusted the description just a little.
> 
> --raw now mentions it only affects output.
> 
>> nack, --all only affects output as well.
> 

When I said that it doesn't only affect output, I was referring to this
part of baseldap.py:

if options.get('all', False):
   attrs_list = ['*']
else:
   attrs_list = list(self.obj.default_attributes)

I don't have strong feeling about this, but what I wanted to make clear
in the help message was that it /can/ have performance impact as the
ldap query is different. We can for instance have an object in LDAP that
has attribute containing user avatar binary blob or something like
that..in which case, --all would fetch it from the server, right?

But I agree that for user, this is 'behind the scenes', so I'm not
opposed to changing the string..new patch attached..

        Jakub
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkzQLiIACgkQHsardTLnvCVdUwCgmpvYvvqs3D6/+vpo/PIhjK1Y
jisAniMyZdwrqWRblqdfTfgEaYdvIpw0
=zREK
-----END PGP SIGNATURE-----
From 0dbcdf0bfdc73c09cf45a2e7de0960973397452c Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Wed, 27 Oct 2010 09:11:30 -0400
Subject: [PATCH] Clarify the description of --raw and -all

https://fedorahosted.org/freeipa/ticket/244
---
 doc/examples/examples.py |    2 +-
 ipalib/frontend.py       |    8 ++++----
 ipalib/plugins/misc.py   |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/examples/examples.py b/doc/examples/examples.py
index d40ad8e..9bef1a0 100644
--- a/doc/examples/examples.py
+++ b/doc/examples/examples.py
@@ -139,7 +139,7 @@ class exshowuser(Command):
         Flag('all',
             # the doc keyword argument is what you see when you go
             # `ipa COMMAND --help` or `ipa help COMMAND`
-            doc='retrieve all attributes',
+            doc='retrieve and print all attributes from the server. Affects 
command output.',
             flags=['no_output'],
         ),
     )
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 73680ef..f1b758d 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -796,8 +796,8 @@ class Command(HasParam):
 
         This method gets called by `HasParam._create_param_namespace()`.
 
-        For commnds that return entries two special options are generated:
-        --all   makes the command retrieve/dispaly all attribute
+        For commands that return entries two special options are generated:
+        --all   makes the command retrieve/display all attributes
         --raw   makes the command display attributes as they are stored
 
         Subclasses can override this to customize how the arguments are
@@ -810,13 +810,13 @@ class Command(HasParam):
             if isinstance(o, (Entry, ListOfEntries)):
                 yield Flag('all',
                     cli_name='all',
-                    doc=_('retrieve all attributes'),
+                    doc=_('retrieve and print all attributes from the server. 
Affects command output.'),
                     exclude='webui',
                     flags=['no_output'],
                 )
                 yield Flag('raw',
                     cli_name='raw',
-                    doc=_('print entries as stored on the server'),
+                    doc=_('print entries as stored on the server. Only affects 
output format.'),
                     exclude='webui',
                     flags=['no_output'],
                 )
diff --git a/ipalib/plugins/misc.py b/ipalib/plugins/misc.py
index 70ee61b..d66e696 100644
--- a/ipalib/plugins/misc.py
+++ b/ipalib/plugins/misc.py
@@ -44,7 +44,7 @@ class env(LocalOrRemote):
     takes_options = LocalOrRemote.takes_options + (
         Flag('all',
             cli_name='all',
-            doc=_('retrieve all attributes'),
+            doc=_('retrieve and print all attributes from the server. Affects 
command output.'),
             exclude='webui',
             flags=['no_output'],
             default=True,
-- 
1.7.2.3

Attachment: jhrozek-freeipa-0001-02-Clarify-the-description-of-raw-and-all.patc.sig
Description: PGP signature

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to