added test for call dispatching
made the test more standard conform
Merge branch 'master' of https://github.com/juju/juju into fix-api-params

# By Ian Booth
# Via Ian Booth (1) and Juju bot (1)
* 'master' of https://github.com/juju/juju:
  Tweak hpcloud boilerplate to turn floating-ip and remove az from example region
Merge branch 'master' of https://github.com/juju/juju into fix-api-params
Display welcome message when starting debug-hooks sessions.
Merge branch 'master' of https://github.com/juju/juju into fix-api-params
fixed nasty race condition
Merge branch 'master' of https://github.com/juju/juju into fix-api-params
Handle constrained AZs

In EC2, an AZ may be "constrained", meaning that
you may not allocate new instances of certain
instance types to that AZ unless you already have
resources in that AZ. With this change we will
deal with this by attempting an a different AZ.

We'll now attempt all AZs until one either succeeds
or fails with an error other than one indicating
the AZ is constrained. We also now sort AZs by
population and then by name, to ensure the first
unit of each service is allocated to the same AZ
(barring pathological constrained AZ cases).

Fixes https://bugs.launchpad.net/juju-core/+bug/1330163
Close the state connection, and run the tests.
Add ResourceCatalog implementation
provider/azure: don't fail Destroy if AG/vnet can't be destroyed

When destroying an environment, it is common for the Azure API
to not release references to the vnet until a significant amount
of time after destroying all related VMs. Thus, destroy-environment
will often fail.

This PR changes the Azure provider to only warn if the vnet or
affinity group cannot be destroyed. Bootstrap is modified to use
the vnet/AG if they are preexisting. If the vnet/AG are being
destroyed while bootstrap is called, then bootstrap will either
create a reference to them thus preventing their deletion, or will
fail and the user will have to bootstrap again.

Fixes https://bugs.launchpad.net/bugs/1324910
We shouldn't attempt to UTC a zero time.
Make tests easier to follow
Add additional test
Typo fix.
Merge pull request #110 from howbazaar/fix-factory-tests

Actually run the factory tests.

Forgot to hook up the actual tests.

Running them raised a few issues, fixed here.
 * closing the state connection
 * making sure the timestamps returned from the state.User are in UTC
Merge pull request #111 from wallyworld/environ-resource-catalogs

Add ResourceCatalog implementation

A ResourceCatalog is used to manage Resource entries, which correspond to data stored in a ResourceStorage. Each time a Resource is Put(), md5 and sha256 checksums are used to see if the underlying data is already stored, and if so a new entry is not created, but a ref count is incremented instead. The opposite happens on deletion.

The ResourceCatalog is not available externally - it will be used by the upcoming ManagedStorage implementation.
Merge pull request #112 from axw/lp1324910-azure-destroy-agvnet

provider/azure: don't fail Destroy if AG/vnet can't be destroyed

When destroying an environment, it is common for the Azure API
to not release references to the vnet until a significant amount
of time after destroying all related VMs. Thus, destroy-environment
will often fail.

This PR changes the Azure provider to only warn if the vnet or
affinity group cannot be destroyed. Bootstrap is modified to use
the vnet/AG if they are preexisting. If the vnet/AG are being
destroyed while bootstrap is called, then bootstrap will either
create a reference to them thus preventing their deletion, or will
fail and the user will have to bootstrap again.

Fixes https://bugs.launchpad.net/bugs/1324910
Merge pull request #105 from axw/lp1330163-ec2-constrained-az

Handle constrained AZs

In EC2, an AZ may be "constrained", meaning that
you may not allocate new instances of certain
instance types to that AZ unless you already have
resources in that AZ. With this change we will
deal with this by attempting an a different AZ.

We'll now attempt all AZs until one either succeeds
or fails with an error other than one indicating
the AZ is constrained. We also now sort AZs by
population and then by name, to ensure the first
unit of each service is allocated to the same AZ
(barring pathological constrained AZ cases).

Fixes https://bugs.launchpad.net/juju-core/+bug/1330163