Hi Folks,

Just merged a new charm helper that I wanted to highlight. I've seen quite
a few charms tracking state in various ways, from ad hoc files per setting
to the config settings helper, which leads to some charms having a
half-dozen state tracking files.  Ideally charms can be written such that
they just consider current state and write out and effect. However its
quite natural for some charms to have the need for local state as they need
to consider the application of deltas from multiple sources to the state
they've already achieved on a unit.

The charmhelper unitdata.py provides a versioned, transactional, kv store
for a unit backed by a single sqlite file. It provides methods for
returning deltas against previously known values to simplify delta
calculation and application by charm. Docs embedded in implementation link
below, feedback welcome.

http://goo.gl/B0AdTR

cheers,

Kapil
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to