relation-get output is problematic
William Reade
william.reade at canonical.com
Wed May 9 20:19:32 UTC 2012
On Wed, 2012-05-09 at 13:09 -0700, Gustavo Niemeyer wrote:
> My proposal is this:
>
> - Let's make the default output for everything structured be YAML
> (e.g. relation-get -)
> - Things like juju-log must not output *anything* (it is/was outputting {})
+1
> Then, I'd also like to take the chance to propose an extension to
> relation-get to help people that are getting out of the
>
> if [ `relation-get some-bool` = True ]; then ...; fi
>
> situation, that actually makes the charm interface depend on
> Python-specific value names, onto a much better version:
>
> if relation-get --test some-bool; then ...; fi
+1 in principle; but I'd like to be sure what counts as true or false.
Boolean false should clearly be false; values that are entirely missing
should also be false; and almost everything else should certainly be
true; but what about zero numbers and empty strings? I'm personally
comfortable with treating those as true, but there's a case to be made
either way...
Cheers
William
More information about the Juju
mailing list