It is hard to open juju API if you're not implementing a ModelCommand
Bug #1566271 reported by
Roger Peppe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Much of the logic for finding out the current model and controller
lives in ModelCommandBas
methods.
When implementing a command that is not a ModelCommand
(for whatever reason - perhaps it's a regular Go command that
isn't using the juju/cmd package), connecting to the API
of the current model involves a lot of copy and paste
of the code in ModelCommandBase and friends.
There should be a high level package API that makes
it trivial to connect to the Juju network API.
description: | updated |
description: | updated |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Medium |
affects: | juju-core → juju |
To post a comment you must log in.
Since this bug was filed, there was a new command base introduced - juju/cmd/ modelcmd. ControllerComma nd.
I believe this base allows to achieve what you described, so I believe this is fixed.
Let me know if you think otherwise.