It is not possible to refer to multiple models with the same name from the CLI

Bug #1597720 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Andrew Wilkins

Bug Description

A user can have access to multiple models with the same name, but having different owners. e.g. I can create model "foo", and jill creates and shares with me a model "foo". There is no syntax to refer to the different models.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

The current syntax for referring to models is:

    juju switch [controller:]model

We should change this to:

    juju switch [controller:][owner/]model

e.g. juju switch jill/foo

Changed in juju-core:
importance: Critical → High
milestone: 2.0-rc1 → 2.0-beta12
tags: added: 2.0 models usability
Changed in juju-core:
milestone: 2.0-beta12 → 2.0-beta13
Revision history for this message
Tim Penhey (thumper) wrote :

Don't you have to 'use' the model first before switching?

The 'use' command would suggest 'jill-foo' for the name.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

> Don't you have to 'use' the model first before switching?

"use" was dropped a while back. Model commands can now refer to models without them having been used on the client before. We check the local cache (models.yaml), and refresh it with an API call if the model isn't found there.

(As an aside: Rog suggested that we might want to drop the cache altogether, to avoid stale information. We would need to update the API server to support referring to models by name as well as by UUID to do that.)

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta13 → 2.0-beta14
Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta14 → 2.0-beta15
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta15 → none
milestone: none → 2.0-beta15
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.