CinderVolumeTypeQuotas

Code
Blueprint: https://blueprints.launchpad.net/cinder/+spec/quotas-limits-by-voltype

Review (Initial): https://review.openstack.org/#/c/25059/

Issues

 * config entry for volume type list (creating resources, reserving)
 * config entry for quota defaults (generic AND volume type)
 * dynamically adding volume types

Config entry for volume type list
Quota resources are currently defined statically by quota.py, and the above patch adds more based on the quota_volume_types config option. This could be modified to create a resource for every volume type that exists.

Config entry for defaults
This could be pretty easily fixed by adding a table specifically for quota defaults. Resource name and default value is all that are really necessary. Quota.py could simply check this for the resource default instead of having the name of a config flag. We would keep the -1 as a fallback as well.

We'd also need to implement an api to CRUD these. The project (or class) quota code may or may not be helpful with that. It might end up just being copy/paste.

Dynamically adding volume types
This seems a little tricky. Maybe the quota resources shouldn't even be created at the module level. Maybe they should be created every time we issue a reserve call. At that point we could query all volume types, (or just the ones mentioned in the reserve deltas).

This requires the caller to know which resources he should be asking for. This might not be a problem if it's always volumes_, etc. The volume code could just always ask for volumes=1, volumes_ =1, etc, then those resources could be created.

We'd also have to add another simple call that would generate and return all the resources for the Quota/QuotaClass controllers.