Runner now uses an interface, not a *HookContext; Flush is ~properly tested locally; Run* is ~properly tested by using the Context interface
consolidated yuckiness in HookContext.ActionData method
state: fixes LP #1391046

The godoc for state.mergeIds states they come from a map, and are then passed through a set, so there is no guarentee of ordering. Adjust the test to match reality.
Merge pull request #1092 from davecheney/209-fix-lp-1391046

state: fixes LP #1391046

The godoc for state.mergeIds states they come from a map, and are then passed through a set, so there is no guarentee of ordering. Adjust the test to match reality.
merge parent; address review; add SetProcess testing for runner
better var/field names
Fixed lp:1359714: JUJU_MACHINE_ID added to hook context
Merge pull request #1093 from dimitern/lp-1359714-juju-machine-id-for-charms

Fixed lp:1359714: JUJU_MACHINE_ID added to hook context

JUJU_MACHINE_ID is now available to charm hooks. It contains
the unit's assigned machine ID.
Fixed lp:1382709: openstack provider now returns SHUTOFF and SUSPENDED instances as well
Meter status support in metrics collector wire format.
Ignore conflict error when releasing maas nodes
Merge pull request #1094 from dimitern/lp-1382709-openstack-instance-shutoff-not-respected

Fixed lp:1382709: openstack provider now returns SHUTOFF and SUSPENDED instances as well

This fixes http://pad.lv/1382709. When an OpenStack instance
managed by Juju is manually stopped or suspended, its state
changes to SHUTOFF or SUSPENDED, respectively. Because the
openstack provider does not return details for instances
with states other than ACTIVE, BUILD, or BUILD(spawning),
the instance updater worker will fail to retrieve the status
of a manually stopped or suspended instance (there is a warning
in the log instead, which is misleading, as it says "unknown
instance id").

With this patch, instance updater will properly refresh the status
of such instances, after the LongPoll interval (15m) since the last
check has passed. Environ.Instances() for openstack will return
also instances with SHUTOFF or SUSPENDED state.

A quick drive-by fix was done for an annoying log spam at DEBUG
level about floating IP assigned to an instance.
Remove obsolete comment
merge parent
Merge pull request #1084 from fwereade/uniter-context-export-flush

Uniter context: export FlushContext

Most of the tests for finalizeContext, which is *complex* (not to mention complicated...) were invoking it by side-effect. So, it was really not well tested at all; to rectify this:

* context.Runner now uses a context.Context interface, not an explicit *HookContext
  * the finalizeContext method became FlushContext
  * the hookVars func became a HookVars method
  * the context ActionData method replaces an ad-hoc combination of similarly horrible access methods
* the various flush tests that depended on running a fake hook are now calling FlushContext directly; and slightly more than before, although (tbh) not *enough* by a long shot
* context.Runner.Run* methods are now tested using a mock context.Context, so we now have *actual tests* that the contexts get flushed
  * makeCharm/hookSpec now creates scripts in arbitrary dirs, so we can actually *test running an action* /grrmbl
Move types out to a third part to break the dependency cycle
state: more type shuffling
Tweaked upgrade target selection

upgrades.PerformUpgrade() now takes all the upgrade targets for the
machine being upgraded instead of being called once per upgrade
target. This removes the possibility of upgrade steps being run twice,
simplifies the upgrade-steps worker and also ensures upgrade steps are
run in a more readily understood order.
Remove special casing for the databaseMaster upgrade target

Nows that upgrades.PerformUpgrade() is called once with all targets
for the machine being upgraded there is no need to treat
databaseMaster as a special case. The master state server now gets
two upgrade targets: stateServer and databaseMaster. This simplifies
the code and tests.
state: move moving things around