find-endpoints should be list-offers

Bug #1702899 reported by Richard Harding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

In testing the CMR feature flag feature the find-endpoints CLI command stands out as not fitting in.

In the language of our current CLI we use "list-*" for listing out things available such as models, controllers, etc. Since we're using "juju offer" to submit an endpoint and we don't use the endpoint noun in other places of the CMR story I think that it should be a listing of "offers".

There is some strangeness in that offer is a verb (kind of like deploy) and then we use it as a noun to list the offers available.

There's something to be said for juju offer-endpoint and then juju list-endpoints such that endpoints is the noun at play, but then offer is longer and I'm not convinced it's any better.

Finally, the actual status output shows SaaS. Maybe that's the actual noun at play here.

juju offer
juju list-saas

If we go the saas route I believe that list-saas output should be updated to have the SaaS name as the first column much like the status output.

I also think that the heading in juju status should be "SaaS" vs "SaaS name" as nothing else calls out "this is a name".

Revision history for this message
Ian Booth (wallyworld) wrote :

We offer an application and then the list-offers command is used by the model admin to see what offers are in play, how many connections there are etc.

$ juju offer mysql:db
Application "mysql" endpoints [db] available at "admin/controller."

$ juju offers
Application Charm Connected Store URL Endpoint Interface Role
mysql mysql 0 ian admin/controller.mysql db mysql provider

Both of the above commands are model commands - they operate on a specific model, showing offers pertaining to that model.

On the other hand, as a consumer, I want to search for what endpoints are available to me to relate to, across multiple models. That's where the "find" command comes in.

$ juju find-endpoints --interface mysql
URL Access Interfaces
admin/controller.mysql admin mysql:db

The above shows "mysql" endpoints that I have consume access to in any model in the current controller. It really is a find rather than a list.

In terms of the find-endpoints output, it's the URL the consumer needs to know, not the name, hence that is what is listed. But there is an argument to make that more similar to what is shown in status, so I think you are right that could be improved.

With the "SaaS" vs "SaaS name", I think there may be a point there (I can go either way). I can try just "SaaS" and see what people think.

Changed in juju:
milestone: none → 2.3-alpha1
assignee: nobody → Ian Booth (wallyworld)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

This PR tweaks the find/show and status output
https://github.com/juju/juju/pull/7610

Revision history for this message
Ian Booth (wallyworld) wrote :

Output of status, find/show endpoints improved.
Further discussion needed on naming CLI.

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.