More identity checks and tests.
Updates following review.
More updates.
Once we have authenticated, we don't need a tagged authenticator any more.
Move the file to match the source.
Updates following review.
Tweaks.
juju/testing: JujuConnSuite now always ensures that APIInfo returns an api.Info struct with the UUID of the mock environment set correctly.
Found a simpler way to get the environ tag
Merge pull request #347 from howbazaar/identity-in-state

Initial identity collection in the database

Define the initial identity structure in the database, and tests.
cmd/jujud: extract the upgrade steps worker

Make the upgrade steps worker code more testable by ripping it out of
the machine agent.
cmd/jujud: rework upgrade tests

Take advantage of extracted upgrade steps worker. The upgrade tests
are now significantly simpler and faster.
Merge pull request #354 from howbazaar/apiserver-entity-not-authenticator

Once we have authenticated, we don't need a tagged authenticator any more

state.Entity is fine.
upgradeWorkerFactory refactored to upgradeWorkerContext

Somewhat cleaner.
Merge pull request #356 from davecheney/144-damn-you-jujuconnsuite-why-you-no-take-environment

juju/testing: APIInfo now returns apiInfo structs with the UUID configured.

JujuConnSuite now always ensures that APIInfo returns an api.Info struct with the UUID of the mock environment set correctly.
Merge pull request #353 from mjs/extract-upgrade-steps-worker

Extract upgrade steps worker

Make the upgrade steps worker code more testable by ripping it out of the machine agent. Take advantage of this to make the upgrade tests significantly simpler and faster.

This is all in preparation for further changes around state agent synchronisation during upgrades.
cmd/jujud: reattempt api.Open if IsCodeNotProvisioned

There is a race between the machine agent starting and
the provisioner recording its instance ID in state.
We modify the agent's logic around opening API
connections to retry for up to one minute if it receives
an error satisfying IsCodeNotProvisioned.

Fixes https://bugs.launchpad.net/juju-core/+bug/1345014
Merge pull request #357 from axw/lp1345014-jujud-wait-provisioned

cmd/jujud: reattempt api.Open if IsCodeNotProvisioned

There is a race between the machine agent starting and
the provisioner recording its instance ID in state.
We modify the agent's logic around opening API
connections to retry for up to one minute if it receives
an error satisfying IsCodeNotProvisioned.

Fixes https://bugs.launchpad.net/juju-core/+bug/1345014
Added MakeMachine mathod to factory.
Factory methods for charms and services.