[CC] Add unit tests for ServiceConfig.unprovision

  Test plans: unit tests passed

Change-Id: I5fcd193444c3ad6895e0cc08596ff88b8e7aa63e
[CC] Refactor ServiceConfig.unprovision

  This diff extracts the unprovision routine to a class method to
facilitate future (read: next diff) exception handling.

  Test plan: unit tests passed

Change-Id: Icf2d18ea156566bc20937a97bd7750edc64b3138
[cc][bulk] implement count call

Change-Id: Ief4c2fe76bd2d33219319da0f25407017af0353d
[CC] Add tests for ServiceConfig.provision

  This change adds tests for ServiceConfig.provision.

  Test plan: unit tests passed

Change-Id: Ic4ce65fa9aa4318ba742317d8a31a3b84155e542
Store service provider in ccdb

Change-Id: If5a85f68ed357bf214cd5ad57db6c913ebfcf70e
[FIX] Create directory skeleton before checking resources.

If all resources of a subdirectory in an application are cached, and that
directory isn't present in uploaded resources (as is the case with the Java
client) then AppPackage#resolve_path will fail. We now create the directory
skeleton prior to this check.

Test plan:
- Added unit tests verify expected behavior
- BVTs pass
- Manually verified using the issue no longer persists on my deployment:
-- Deployed a simple sinatra app with a 70k file named ``subdir/test'' in order
   to trigger resource matching.
-- Deleted the app.
-- Modified VMC to not create the empty ``subdir'' directory (corresponds to
   Java client behavior seen in prod.)
-- Re-pushed the app. Verified that it failed without the change applied and
   succeeded with the change applied.

Change-Id: Iea1015df3cc4762770894e07148bb34c71659596
[CC] Atomic service provisioning

  This change tries to minimize the un-atomicity in service provisioning
by:
    - Cleaning the local state (CCDB record) when validation (e.g.
      unique service alias in user scope) fails
    - Unprovisioning the service when change to the local state cannot
      persist

  Test plans:
    - Unit tests passed
    - BVTs passed
    - Provision using the same alias under two different user accounts
      and verify that it is allowed

NB. its inherent distributed nature means this operation cannot be
guaranteed to be atomic (api calls to service gateway can fail or
timeout), so eventually the service gateway still needs to be able to
garbage collect. Until then, this patch should be a good enough
stopgap.

Change-Id: Iaa884f4a8f62f416ff06fbf42e9b73db6a838d16
Merge "Store service provider in ccdb"
Merge "[FIX] Create directory skeleton before checking resources."
Merge changes Iaa884f4a,Ic4ce65fa,Icf2d18ea,I5fcd1934

* changes:
  [CC] Atomic service provisioning
  [CC] Add tests for ServiceConfig.provision
  [CC] Refactor ServiceConfig.unprovision
  [CC] Add unit tests for ServiceConfig.unprovision
mongo should describe itself as 'document' not 'key-value'

Change-Id: I0182684f2be6140825b9a84bd20bb60bfd5be5f0
[CC][bugfix] Don't create too much skeleton

  This change fixes an omission in commit 26e9db1c where we created a
directory namesake of the resource file. This extraneous directory will
cause staging of Ruby (and other lang) apps to fail.

  Test plan:
  - Unit tests passed
  - BVTs passed

P.S. Why am I on bug bounty today?

Change-Id: I18b7130b6138c2b9a9348a91d55a0ccab7173769
Merge "[CC][bugfix] Don't create too much skeleton"
Bump vcap-staging to 9f255243: Add environment PATH to gem compilation

Change-Id: I2f2fae633dab0a3c2a71f6a035fa054e67199b61
Introducing prod flag (formerly "tiers")

- add prod column to db
- add prod flag to data structures representing droplets
- adjust dea logic for old and new initial placement
- make hm (legacy) to enforce that prod flag is set for applications
  in DEAs with prod flag set.

Change-Id: Ie4131727d2b91483f92411fcd871525ab7d152ec
Add node08 runtime with Node.js 0.8.2

Change-Id: Ie445530b4ef760013be30cdc0bf638816d1e6810
Merge "Introducing prod flag (formerly "tiers")"
[CC] Add service provider support

- CC should dispatch provision request based on provider;
- Support gateway/cc tokens for "same label, different provider"
scenario.

Test plans:

- Unit tests passed;
- BVTs passed;
- Support multi-gateways with different providers;
- Support new VMC client info/provision/unprovision/bind/unbind.

Change-Id: I5140df56839c2805ecd7e69b7f02b3052e3dafb8
update broker api version

- version from poc to v1.
- cloud controller route update.

Change-Id: Id3074c990187acf4ab12d4646d29a2250e76fa1b
Support fiber-based connection pool in rails

This monkey patch makes connection pool available to fibers in active
record 3.0. Most fun part of this patch is done by Pieter.

Test Plan:

- parallel yeti passed
- check rss during heavy load to make sure memory/connection is not
  leaking

Change-Id: I7afdb81c6642aa382bb9ea1d1f0f40d3dd395b7f