Added versions to Agent API.
Added forgotten params.
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Minor fixes after first review.
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
fixed an error formatting bug
Redesign including different testing approach (better separation).
apiserver: allow an extra API method during upgrades

Client.EnvironmentGet is required to support "juju ssh". SSH should be
available during upgrades but this method was not in the list of
upgradingRoot's allowed API methods.

This revision fixes the issue (tested manually). A CI test change will
be made next ensure that SSH continues to work during upgrades.

Fixes LP#1367009.
Merge pull request #795 from mjs/ssh-fails-during-upgrade

apiserver: allow an extra API method during upgrades

Client.EnvironmentGet is required to support "juju ssh". SSH should be available during upgrades but this method was not in the list of upgradingRoot's allowed API methods.

This revision fixes the issue (tested manually). A CI test change will be made next ensure that SSH continues to work during upgrades.

Fixes LP#1367009.

http://reviews.vapour.ws/r/61/diff/
Merge pull request #789 from mattyw/go-vet-fix

fixed an error formatting bug
FirewallerAPIV1 implemented; tests improved
Merge pull request #770 from dimitern/api-firewaller-watch-machine-ports

FirewallerAPIV1 implemented; tests improved

This is part 2/4 in the port ranges support work: changes
to the firewaller API to enabled watching opened ports on
machines and not units.

Changes in FirewallerAPI V1:
 - Added WatchOpenedPorts(environTag) method. Environment tag
   is currently ignored internally, but required for future
   compatibility.
 - Added GetMachinePorts() and apifirewaller.Machine.OpenedPorts().
   It returns all opened ports for a given machine on a given
   network (currently, until multiple networks are supported,
   the default public network is hard-coded in a few places).
 - Added GetMachineActiveNetworks() and apifirewaller.Machine.
   ActiveNetworks(). It returns a list of networks the machine
   has opened ports on.
 - Watch() method no longer allows unit tags, as the firewaller
   won't need to watch units anymore.
 - OpenedPorts() and apifirewaller.Unit.OpenedPorts() removed.

Refactored both the apiserver/firewaller and api/firewaller to
test API versions as needed, and minimized duplicated code/tests.

Also, during testing I found out the openedPortsWatcher does
not behave as expected and was fixed.

Right now, the firewaller worker still uses FirewallerAPIV0, and
it will be changed to use the new version in the next follow-up.

Later, there will be a few more steps to complete the port
ranges support: firewaller worker to use the new API, an
upgrade step to migrate unit ports to machine ports, cleaning
up all legacy support code and other improvements, making
"open-port" and "close-port" hook tools accept port ranges,
and finally adding a new "opened-ports" hook tool to list
ports.
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker. Changes after review.
Forgot to change agent version in api package.
Merge pull request #746 from TheMue/agent-api-new-version-for-networker

New Agent API version for Networker

This PR is the first one in a row of changes for the storage of information about the mode of the Networker (safe or non-safe) during provisioning time as machine job. Later this information will be used by the agent to decide, how the networker has to be started.

It doesn't add a new API method nor changes an existing one. Only the number of possible job values changes. But still, to demonstrate a discussion result regarding the versioning of an API and how to test it. Major idea is to not have one test suite but *smaller ones per method to test* and *compatible version* and to *inject the versions* into it. So once a new method is added or a method changes (e.g. different arguments or return values) a new version of the suite can be implemented and the tests be added only for the new version. 

Adding and injecting is then done by calling `gc.Suite()` multiple times for the individual suites together with a constructor for the creation of the APIs. Inside the tests the constructor is called and the result casted to the lowest compatible version. So while here all APIs have V0 (because V1 is compatible) a new suite for a V2 with a new method may cast it to an according V2 instance.

I hope the descriptions helps to understand the intention, it currently is documented with a more visual example.

http://reviews.vapour.ws/r/43/