find-endpoints should be list-offers
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".
Changed in juju: | |
status: | Fix Committed → Fix Released |
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 r.mysql db mysql provider
Application Charm Connected Store URL Endpoint Interface Role
mysql mysql 0 ian admin/controlle
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 r.mysql admin mysql:db
URL Access Interfaces
admin/controlle
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.