Support controller: instead of -c controller for commands
Bug #1600523 reported by
Mark Shuttleworth
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned |
Bug Description
When we are referring to a controller we can use a name: construct (i.e. the controller name followed immediately by a colon). For example.
$ juju models ms-gcp-eu:
...
Currently we seem to look for "-c controller" which feels fine but pedantic. The general structure for a command which can take a controller and/or model should be that controller: or controller:model or controller:
I think this should apply to (at least):
status
models
users
...
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: 2.0 usability |
Changed in juju-core: | |
milestone: | none → 2.0.0 |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0.0 → none |
milestone: | none → 2.0.0 |
Changed in juju: | |
milestone: | 2.0.0 → 2.0.1 |
Changed in juju: | |
milestone: | 2.0.1 → none |
To post a comment you must log in.
The issue here is that some commands take arguments afterwards which could be confusing and lead to some inconsistency. status takes an optional argument for the application/unit. juju resources requires the application name, and so the -m is used there to allow a user to say juju resources -m controller:model percona-cluster.
The -c or -m lets us make any command accept that argument regardless of how it works.
It does suck that some commands take the -c because they're controller specific (models, users) but others take the -m because they're intended to be model specific (status, machines, etc) yet take the controller as well. In a way you really just want to be able to --target controller, model, controller:model on any command.
What are your thoughts on keeping the flag so that we can keep things out of trouble with the specifics of the command run, but trying to change up the flag used to be consistent across all commands?