Remove the println
Merge pull request #641 from howbazaar/fix-agent-test-output

Remove the println

Trivial fix to remove extra test output.
state/apiserver: move api/params to apiserver/params

This PR moves api/params to apiserver/params. The justification is the params package defines the form of the api messages that the server will accept, not the form that the client will provide.

This move makes it clear that the parameters belong to the apiserver, not a Go implementation of the api client.
Merge branch 'master' of https://github.com/juju/juju into 190-move-state-api-params-to-state-apiserver-params
Update State.AddUser to validate username

Use names.IsValidUserName to validate the user and creator string
passed in to State.AddUser.
gofmt
Merge pull request #653 from davecheney/190-move-state-api-params-to-state-apiserver-params

state/apiserver: move api/params to apiserver/params

This PR moves `api/params` to `apiserver/params`. The justification is the `params` package defines the form of the api messages that the server will accept, not the form that the client will provide.

This move makes it clear that the parameters belong to the `apiserver`, not a Go implementation of the api client.
Move state/api and state/apiserver to top level

This is a follow up to #653 that finishes the general code migration.
gofmt
Merge pull request #655 from davecheney/191-move-state-api-apiserver-to-top-level

Move state/api and state/apiserver to top level

This is a follow up to #653 that finishes the general code migration.
Merge pull request #650 from wallyworld/machine-doc-insert-order

Ensure machine doc is inserted last after any related docs

Maybe fixes: https://bugs.launchpad.net/juju-core/+bug/1354027

With debug turned on, it could be seen that the provisioner task was being notified of containers added to a host, which the provisioner then started to process. However, at this time, the machine records were not necessarily all written to the database yet. It turned out that for one container, its status document was not yet written, so the provisioner saw an error and ignored the container forever. A couple of seconds after this happened, the status record was written.

The txn ops to add a machine and its associated docs are re-ordered such that the main machine doc is created last.
Merge pull request #654 from waigani/AddUser-IsValidUserName

Update State.AddUser to validate username

Use names.IsValidUserName to validate the user string
passed in to State.AddUser.
Remove environs/tools.FindInstanceTools
Merge pull request #656 from wallyworld/machine-doc-insert-order-trunk

Merge pull request #650 from wallyworld/machine-doc-insert-order

Ensure machine doc is inserted last after any related docs

Maybe fixes: https://bugs.launchpad.net/juju-core/+bug/1354027

With debug turned on, it could be seen that the provisioner task was being notified of containers added to a host, which the provisioner then started to process. However, at this time, the machine records were not necessarily all written to the database yet. It turned out that for one container, its status document was not yet written, so the provisioner saw an error and ignored the container forever. A couple of seconds after this happened, the status record was written.

The txn ops to add a machine and its associated docs are re-ordered such that the main machine doc is created last.
Merge pull request #649 from axw/remove-environs-tools-findinstancetools

Remove environs/tools.FindInstanceTools

Reduce surface area of environs/tools as we reduce reliance on it. Eventually the simplestreams parts should be relocated and become client-side, import-only. Several users do not need to be using FindInstanceTools (use FindExactTools or just FindTools instead).
Fixed logging prefixes after moving state/api -> api/ and state/apiserver -> apiserver/
Merge pull request #659 from dimitern/fix-logging-after-api-move

Fixed logging prefixes after moving state/api -> api/ and state/apiserver -> apiserver/

After https://github.com/juju/juju/pull/655 got merged, I noticed some loggers are still using "state.api.*" and "state.apiserver.*", so this fixes these to drop the "state." prefix.

Also, added more logging to juju/testing/conn.go and state.Close() hoping to provide more context for fixing CI bugs like http://pad.lv/1348477.
ActionComplete / ActionFailed called after Action completion

The worker now calls ActionComplete or ActionFailed on state, depending
on the success state of the Action and any errors.

The hook is set to an error state if the Action hook is missing, or if
other errors take place during hook execution.  If the Action hook sets
a fail state, the Hook will not error, rather the Action will fail.
ActionComplete / ActionFailed called after Action completion

ActionTags are now properly initialized on worker uniter.HookContext at the
time it is created.
ActionComplete / ActionFailed called after Action completion

Final bits and pieces to complete PR 617 put in place; tests fleshed out
and passing.