relation-get output is problematic
William Reade
william.reade at canonical.com
Thu May 10 19:30:30 UTC 2012
On Wed, 2012-05-09 at 13:09 -0700, Gustavo Niemeyer wrote:
> We have an important bug to fix in relation-get and a few other
> commands.
Just to be explicit here, the various hooks tools fall into the
following categories:
No output:
- juju-log
- open-port
- close-port
- relation-set
So, none of these accept --format, --output, or --test.
Normal output:
- config-get
- relation-get
- relation-ids
- relation-list
Each of these accepts all the above flags.
Subtly different:
- unit-get
...which is different only in that --test is basically meaningless:
unit-get is only ever run in the context of an actual running unit,
which is therefore guaranteed to have truthy values for private-address
and public-address. To expose --test on unit-get would imply that this
is not the case; and on principle I'm a little bit uncomfortable about
doing this.
It *would* be architecturally convenient to collect all these flags
together, but I would only want to do so if we had general agreement
that exposing a meaningless --test flag in this case was a reasonable
thing to do (either because we may one day extend unit-get to expose
potentially falsey values, or just in service of UI consistency).
Opinions?
Cheers
William
More information about the Juju
mailing list