juju/juju — pull request #317 by jameinel (2014-07-16 07:04:43+00:00)
Title: Remove apiconn (bug #1326802)

This addresses bug #1326802 by getting rid of the juju.APIConn structure.

There were still several places that already had an Environ object and just wanted to connect to it, so I provided NewAPIState to connect and return an api.State object (so we could share the environAPIInfo function, etc.)

Also, lots of places in the test suite were using JujuConnSuite.APIConn that didn't actually need it, so I cleaned those up. (Many just used it for the .APIConn.Environ but we already have just .Environ for that, and other places just used it to get the api.Info but we also already provided .APIInfo() which also handles error checking, etc.)