api: provide a way to map a model name to a model UUID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Currently in the Juju client API, in the absence of current cached models info, there appears to be no way to connect to a model with a given name other than by using a ListModels call to list all models, then doing a search for the model name in that to find its UUID.
It would feel more natural (and it would be more efficent) to be able to ask a controller for the UUID for a given model name, and/or to be able to make an API connection using a model name instead of a UUID.
For example, we could connect using /modelname/
it would want to be a controller level facade, and thus ultimately implemented by JEM for JAAS.
As such the response probably also needs to include information about ultimately what controller the model is running.