Move wire format to separate package.
provider/ec2: try next AZ on InsufficientInstanceCapacity

InsufficientInstanceCapacity may be returned by RunInstances
if the AZ cannot allocate instances of the specified instance
type. We will now handle this the same as constrained zones,
by retrying the request with the next least-populated zone.

Fixes https://bugs.launchpad.net/juju-core/+bug/1389037
provider/ec2: type switch in isZoneConstrainedError
Merge pull request #1055 from axw/lp1389037-ec2-az-InsufficientInstanceCapacity

provider/ec2: try next AZ on InsufficientInstanceCapacity

InsufficientInstanceCapacity may be returned by RunInstances
if the AZ cannot allocate instances of the specified instance
type. We will now handle this the same as constrained zones,
by retrying the request with the next least-populated zone.

Fixes https://bugs.launchpad.net/juju-core/+bug/1389037
provider/ec2: try next AZ on "no default subnet" error

If the account/region has a default VPC, but one of the
AZs lacks a default subnet, then Juju may get into a
situation where it cannot provision any instances
successfully. We handle the "no default subnet" error
just as we do constrained zones, by trying the next one.

Fixes https://bugs.launchpad.net/juju-core/+bug/1388860
Merge pull request #1056 from axw/lp1388860-ec2-nodefaultsubnet

provider/ec2: try next AZ on "no default subnet" error

If the account/region has a default VPC, but one of the
AZs lacks a default subnet, then Juju may get into a
situation where it cannot provision any instances
successfully. We handle the "no default subnet" error
just as we do constrained zones, by trying the next one.

Fixes https://bugs.launchpad.net/juju-core/+bug/1388860
Wireformat for sending metrics to the collector service.
Merge pull request #1050 from tasdomas/metrics-wire-format

Metrics wire format

Metrics wire format defines the format that will be used to send metrics to and receive responses from a metrics collector service.
Add support for using index2.json for tools
A few formatting tweaks
Merge pull request #1060 from wallyworld/simplestreams-index2

Add support for using index2.json for tools

Fixes: https://bugs.launchpad.net/juju-core/+bug/1389807

With this change, when loading tools metadata, firstly we look for an index2.json file.
If that's not there, we look for index.json

This allows extra metadata to be added for use by 1.21 and later versions of Juju, and 1.20 and ealrier will not be affected.

The metadata generation plugins have been changed to generate index2.json

As a drive by, some old code, no user used since provider storage was dropped, was deleted.