Date 1 - 3 of 3
Ordering lists of objects in the CF CLI
The CLI team has recently been chewing on ordering sets of objects like
orgs and apps. We've gotten a couple PRs  recently related to this.
I've been asking internally around CF teams about the value here with mixed
results and would like to hear some input from the OSS community.
Currently, lists are returned in ccdb insert order which basically means
oldest (first inserted) to newest (most recently inserted). The CC API has
an order-direction parameter which enables you to reverse that order and
see objects newest to oldest.
If we wanted to enable the ordering of a return set, there are a couple
1. Keep the default order as it currently is natively sent by the CC API.
Add two flags to any 'list' command for desc & asc:
`cf orgs --asc` --> sorts in (A-Z, 1-9) order
`cf orgs --desc` --> sorts in (Z-A, 9-1) order
2. Change the default order to descending in the CF CLI and add a single
flag to reverse order (see --asc in option 1 above). This would mean that
the object list is always returned to the CLI user in descending order.
But is there any value here? How often would you use the '--asc' flag? In
this scenario, would you then want the CLI to include a flag to return
object lists in the order that is native to the CC API?
Then there is always the option to do nothing. If there is not as much
perceived value here in the OSS community, then not changing anything is
always an option.
Here is the set of all CF CLI commands that return lists of objects. If we
opt for 1 or 2 above, we would apply that option to this entire set (which
is ironically not in any sort order).
Also - I know that the desc & asc sort order is more complex than my
example above (a-z, 0-9) due to upper/lower case, non-alphanumeric, etc.
We will follow standard linux sort order convention.
Last thing - Conversations so far have not even taken CF CLI
internationalization into account. This may turn out to be waaaaaay harder
than it seemed. That's why I'm trying to gauge perceived value. Will this
change make your life easier and make you a more effective user of the CF
Cloud Foundry Product Manager
Mike Youngstrom <youngm@...>
I like option #2 but I wouldn't even worry about adding a --asc or nativetoggle quoted message Show quoted text
order flag until someone requests it.
My biggest issue with it not being ordered is it makes it harder to find an
item in a list once it become 20-30 items big. So, I vote for a single
consistent easy to follow list order which I believe alphabetical
descending would provide.
Also, don't forget about ordering the lists of orgs and spaces presented to
the user during login.
On Tue, Jun 16, 2015 at 12:42 PM, Greg Oehmen <goehmen(a)pivotal.io> wrote:
I agree with Mike.toggle quoted message Show quoted text
Director of Product, Pivotal CF, London
http://pivotal.io | http://tammersaleh.com | +44 7463 939332
On Tue, Jun 16, 2015 at 9:00 PM, Mike Youngstrom <youngm(a)gmail.com> wrote:
I like option #2 but I wouldn't even worry about adding a --asc or native
|1 - 3 of 3|