jkoelker / quark

This is my fork, Quark is now at https://github.com/rackerlabs/quark
Apache License 2.0
0 stars 2 forks source link

Quotas API and driver limits implemented #123

Closed kilogram closed 11 years ago

kilogram commented 11 years ago

Combination of #120 and #122.

Quotas API: Sits atop quantum.quota.QuotaEngine and quantum.extensions.quotasv2. Extends and replaces quantum.db.quota_db.DbQuotaDriver with QuarkQuotaDriver. For hierarchal quota checks (ie, rules per group) the plugin must call the QuotaEngine independently of quantum. Implemented in config file in QUOTAS group as quota_X_per_Y.

Requires the config flag: [QUOTAS] quota_driver = quark.quota_driver.QuarkQuotaDriver

Driver limits: Separates the business logic of quotas from the limits in the specific driver implementation. Also allows the plugin to check limits in the case that it is more efficient than doing it in the driver.

kilogram commented 11 years ago

We should discuss the use of the driver limits checks. I implemented it thinking it would be useful, but... since the optimized driver has all of the information that quark itself does, it may be useless.