Add instance_memory_limit to quota definitions

- Will not allow an app to have memory greater than this limit.

[#74629052]
Validate that quota definition memory limit is >= zero.

[#75533696]
Symbolize keys to avoid duplicate fields

- Resolves issue reported by @dengwa in https://github.com/cloudfoundry/cloud_controller_ng/pull/274

[#75469572]
Add space quota definition

* add model, controller, migration, and tests

[#74628064]

Signed-off-by: Dave Liebreich <dliebreich@pivotallabs.com>
Add instance_memory_limit to quota_definition api, model, controller

* overlooked in previous commit

[#74629052]

Signed-off-by: Dave Liebreich <dliebreich@pivotallabs.com>
Fix race condition for creating new users

[#75570496]

Signed-off-by: Joseph Palermo <jpalermo@pivotallabs.com>
Ability to assign a space quota to a space

[#74628172]
Revert "Create buildpack db entries only if the blobs are available."

This reverts commit 807fec73bc49d2cb51fb53a68067ceaf5f0a9fba.
Switch cloud controller to use hm9000 bulk api

[#75349378]

Signed-off-by: Julian Friedman <julz.friedman@uk.ibm.com>
Split Instance Memory validation in to its own policy

 - Also fix up broken expect_validator test which was returning false positives

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Validate space memory quotas

 - Made MaxMemoryPolicy work for both spaces and orgs
 - Added remaining_memory function for spaces
 - Made remaining_memory private for both orgs and spaces in favour of using has_remaining_memory instead; avoids space.remaining_memory having to return a sentinel value when the space has no space_quota

[#74628352]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
Add space quota memory limit exceeded validation to apps

[#74628352]

Signed-off-by: Joseph Palermo <jpalermo@pivotallabs.com>
New validation for space instance memory limit exceeded

[#74628352]

Signed-off-by: Joseph Palermo <jpalermo@pivotallabs.com>
Add missing export/import attributes for space quota instance memory limit

[#74628352]

Signed-off-by: Joseph Palermo <jpalermo@pivotallabs.com>
Add validations for space quota service related fields

[#74628352]

Signed-off-by: Joseph Palermo <jpalermo@pivotallabs.com>
Handle duplicate id during user creation

[#75570496]
Validate total routes against org and space quota

[#74628352]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Make the request bodies look pretty

[#75744058]

Signed-off-by: Zach Robinson <zrobinson@pivotallabs.com>
Eager load apps' current droplets in bulk apps controller

Signed-off-by: Simon Leung <leungs@us.ibm.com>
Eager load all app associations in bulk apps controller

Signed-off-by: Simon Leung <leungs@us.ibm.com>