Clarifying charm format 2

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Tue Aug 28 19:07:21 UTC 2012


On Tue, Aug 28, 2012 at 3:43 PM, Kapil Thangavelu
<kapil.thangavelu at canonical.com> wrote:
> On that note, i wanted to confirm/clarify the changes for format 2 for
> pyjuju, since it doesn't have a specification, and it needs to agree between
> the two implementations.
>
> To recap for charms with the 'format': 2 metadata marker, the hook cli api
> changes such that
>
>  - relation-get/set both return raw strings.
>  - config-get/set both type 'str' as a raw string.

Thanks for bringing this up, and +1. In addition, config-get will
serialize int, float and bool using their usual Python repr ("1",
"1.0", and "True", respectively and without the quotes). I felt quite
tempted to suggest lowercasing bools, which was the original
intention, but by now it's not relevant really. In the end, I expect
quite a lot of charms to be able to switch to format 2 without any
changes.


gustavo @ http://niemeyer.net



More information about the Juju mailing list