cloudfoundry / cli

The official command line client for Cloud Foundry
https://docs.cloudfoundry.org/cf-cli
Apache License 2.0
1.75k stars 929 forks source link

Feature request: allow the org admin to list all routes in the org #265

Closed haojun closed 9 years ago

haojun commented 10 years ago

Currently, cf routes only lists routes in the current space, it's not convenient for the org admin to manage the routes, e.g:

  1. to find how many orphaned routes exists in the org and which ones can be released
  2. to find if a route is mapped to an app of another space, so if a new app wants to use an existing route, the admin can decide weather to map the route to the new app

I think the feature is usable, and if it is accepted, i will make some PRs to handle this.

Thanks Haojun

cf-gitbot commented 10 years ago

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/78977518.

goehmen commented 10 years ago

Haojun:

I can see your point. Yes, this would be a usable feature.

Greg

On Tue, Sep 16, 2014 at 7:31 PM, cf-gitbot notifications@github.com wrote:

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/78977518.

— Reply to this email directly or view it on GitHub https://github.com/cloudfoundry/cli/issues/265#issuecomment-55841427.

goehmen commented 10 years ago

Actually @haojun - The story already exists in the CLI backlog: https://www.pivotaltracker.com/story/show/70300846

We've had feedback from multiple users that get stuck trying to reuse a route in a new space, but it's already in use in another space. It's difficult to find which space the route exists in.
The output of 'cf routes' can be very long because it spans all orgs the user is in and it's unlcear what the order of the output is.
It would be useful to limit the output of 'cf routes' to the currently targeted org. It would also be useful to logically group the output by space and application. This would allow the user to take action on the information.

If you want to create a PR that satisfies that description, that would be great. Otherwise, the CLI team will get to it in coming weeks.

haojun commented 10 years ago

@goehmen , I'd be glad to take over it, but i will be on vacation so i can only start the work after 2~3 weeks.

If the schedule is ok (not too late), sure, i can do that

goehmen commented 10 years ago

@haojun The CLI team discussed this story yesterday. It looks like we need some work done by the runtime team before this work can be done (need to request support in API form runtime for ability to query on org & space_guid). Given that dependency, we'll definitely have to wait & it probably makes better sense for the CLI team to just handle this work. Sorry if that disappoints.

haojun commented 10 years ago

@goehmen You can reuse the list spaces API to get spaces in the org and query for each space. I have tested the idea yesterday and that worked fine to me :)

goehmen commented 10 years ago

OK. I'll go ahead and close this issue then. Please reopen if you find the need.

goehmen commented 9 years ago

OK. I'll go ahead and close this issue then. Please reopen if you find the need.

dieucao commented 9 years ago

@haojun cf-release v198 now supports filtering /v2/routes by organization_guid