Do we need charm "snippets"?

Marco Ceppi marco.ceppi at
Wed Nov 23 17:52:16 UTC 2011

I created a few functions that I use in charms I've made/are working on and pushed them up to I couldn't think of a better place to put them repo wise and I figured might as well start a small collection while the medium is decided.

Feedback or suggestions are welcome.

Marco Ceppi

>---- Original Message ----
>From: James Westby <james.westby at>
>To: "Clint Byrum" <clint at>, "juju" <juju at>
>Sent: Tue, Nov 22, 2011, 23:00 PM
>Subject: Re: Do we need charm "snippets"?
>On Tue, 22 Nov 2011 13:49:41 -0800, Clint Byrum <clint at> wrote:
>> I think the best way to get this done is to add a bit of "Should" policy
>> that states that code should not be copied from one charm to another,
>> but instead should be added to charm-helper and removed from both charms.
>I see this as somewhat similar to maintainer scripts in packaging
>(e.g.,) which has shown that
>  nothing < documentation of patterns < copied snippets < shared helper
>    library < built in
>It's pretty easy to start moving up this chain and getting some
>benefit. In fact it's the path that patterns/snippets take if they
>remain useful and get adopted.
>So +1 on doing something here, and +1 for doing it incrementally as
>Clint suggests.
>Also, keep an eye out for where something should move up a level, as
>if the mass at one leve grows too large there will start to be problems
>(e.g. having too many copied snippets can lead to it being hard to
>change something in core juju as it would break too many charms.)
>Juju mailing list
>Juju at
>Modify settings or unsubscribe at:

More information about the Juju mailing list