~dave-cheney/juju-core/102-cmd-init-context

Viewing all changes in revision 499.

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-09-13 08:29:29 UTC
  • mfrom: (460.9.13 juju-core)
  • Revision ID: fwereade@gmail.com-20120913082929-w3a1ola82e3tl3kv
combine charm and hook states as uniter state

charm.Manager and hook.StateFile have together been replaced by charm.Deployer
and uniter.StateFile.

The bits of charm.Manager that were not already subsumed by charm.Deployer
moved into uniter.StateFile, as did everything in hook.StateFile; the
overriding benefit of doing this is that it allows us to switch atomically
from a deploying state into a queued-hook state at the end of Uniter.deploy.

The addition of StateFile is technically independent, but I feel it's useful
to see the change as a *move* of the local-state-saving code; apart from those
additions/deletions, the primary feature is a rewritten Uniter.deploy; the
state-reading changes in modes.go are largely mechanical, apart from the move
of a chunk of ModeInit into ModeContinue (because we can now determine
everything about what mode we should be in purely from the state file, there
is no longer any reason to split it across two modes; and ModeInit can keep
doing things that really are about initialization).

In short: don't fear the diff :).

R=niemeyer
CC=
https://codereview.appspot.com/6489083

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: