)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"9f24f58d6700438583fafdaae74bf7147aa3e8ed","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add Quota Enforcement API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds the quota enforcement API.  When emplemented, enforce()"},{"line_number":10,"context_line":"will return without exception if a new resource can be created without"},{"line_number":11,"context_line":"exceeding a quota limit.  enforce() will raise an exception if the"},{"line_number":12,"context_line":"creation needs to be blocked due to the effective quota.  A detailed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_cf5593c6","line":9,"updated":"2015-08-25 08:53:46.000000000","message":"s/emplemented/implemented/","commit_id":"c0b72c080d7e72f496c04db51f7b45f60adc5f4b"}],"barbican/api/controllers/consumers.py":[{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"6a7659a5a909af71bd74e2b16bca5b51c2214122","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        except exception.NotFound:"},{"line_number":142,"context_line":"            controllers.containers.container_not_found()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self.quota_enforcer.enforce(external_project_id, project.id)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        new_consumer \u003d models.ContainerConsumerMetadatum(self.container_id,"},{"line_number":147,"context_line":"                                                         data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_59652643","line":144,"updated":"2015-08-17 21:44:01.000000000","message":"So this limits the number of \"registered consumers\" User A can have for User B\u0027s containers? So if that limit is (for example) \"10\", then User A could register as a consumer for 10 of User B\u0027s containers, 10 of User C\u0027s containers, etc?\n\nI think that seems fine, though how does changing this quota work exactly? I know for our use-case, we will have at least one situation where User A might need to be registered for 1000 containers from User B, so is it possible to change the quota for a single tenant, or would that require the quota to be raised across the board?","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"ac2107fced2df147bad788533e5e6f0ffd5d4bcc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        except exception.NotFound:"},{"line_number":142,"context_line":"            controllers.containers.container_not_found()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self.quota_enforcer.enforce(external_project_id, project.id)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        new_consumer \u003d models.ContainerConsumerMetadatum(self.container_id,"},{"line_number":147,"context_line":"                                                         data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_538f3723","line":144,"in_reply_to":"fa1b9901_59652643","updated":"2015-08-18 04:13:32.000000000","message":"Quotas can be set individually for each tenant/project.  There is an API for that.  It is the project of creator of the consumer record that is \"charged\" against the quota for each record created.","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"}],"barbican/common/quota.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"26700dd93d86c4dd0cf5b313d31278c62513442a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def __init__(self, resource_type):"},{"line_number":77,"context_line":"        self.resource_type \u003d resource_type"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def enforce(self, external_project_id, internal_project_id):"},{"line_number":80,"context_line":"        \"\"\"This is a dummy implementation for developing the API\"\"\""},{"line_number":81,"context_line":"        # TODO(dave) implement"},{"line_number":82,"context_line":"        if internal_project_id is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_142ef742","line":79,"updated":"2015-08-20 14:42:34.000000000","message":"Why do you need both ids? Why take in the project class?","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"b6809739d55d7217a313f72f1657582c2e18af8d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def __init__(self, resource_type):"},{"line_number":77,"context_line":"        self.resource_type \u003d resource_type"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def enforce(self, external_project_id, internal_project_id):"},{"line_number":80,"context_line":"        \"\"\"This is a dummy implementation for developing the API\"\"\""},{"line_number":81,"context_line":"        # TODO(dave) implement"},{"line_number":82,"context_line":"        if internal_project_id is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a3849d0a","line":79,"in_reply_to":"fa1b9901_142ef742","updated":"2015-08-20 20:17:26.000000000","message":"I need both IDs: one for the log message and one for the database key.  But, yea, taking in the class is better.\nDone.","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dcb2e16c6d235614287d9f83314856c4ffb53707","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def enforce(self, external_project_id, internal_project_id):"},{"line_number":80,"context_line":"        \"\"\"This is a dummy implementation for developing the API\"\"\""},{"line_number":81,"context_line":"        # TODO(dave) implement"},{"line_number":82,"context_line":"        if internal_project_id is None:"},{"line_number":83,"context_line":"            raise exception.QuotaReached(project_id\u003dexternal_project_id,"},{"line_number":84,"context_line":"                                         resource_type\u003dself.resource_type,"},{"line_number":85,"context_line":"                                         count\u003d0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_887e15ad","line":82,"updated":"2015-08-17 15:58:17.000000000","message":"Not sure what was the decision around enabling/disabling quota feature. May be use that flag to disable enforcement logic if that kind of flag exists.","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"cb7b9a75d0ab260ac567ec60a6bafb63fa0fd47c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def enforce(self, external_project_id, internal_project_id):"},{"line_number":80,"context_line":"        \"\"\"This is a dummy implementation for developing the API\"\"\""},{"line_number":81,"context_line":"        # TODO(dave) implement"},{"line_number":82,"context_line":"        if internal_project_id is None:"},{"line_number":83,"context_line":"            raise exception.QuotaReached(project_id\u003dexternal_project_id,"},{"line_number":84,"context_line":"                                         resource_type\u003dself.resource_type,"},{"line_number":85,"context_line":"                                         count\u003d0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_e5eec4eb","line":82,"in_reply_to":"fa1b9901_6e6ce99c","updated":"2015-08-18 00:43:01.000000000","message":"Okay, I see in etherpad -1 value is used as mechanism to disable. Makes sense.\n\nTo me, checking for internal_project_id value (which would not be None anyway) to enable enforcement is confusing. As you mentioned, its placeholder logic so its fine.","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"1a78cd62df151eddee4d12c6360faa8a8a07a749","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def enforce(self, external_project_id, internal_project_id):"},{"line_number":80,"context_line":"        \"\"\"This is a dummy implementation for developing the API\"\"\""},{"line_number":81,"context_line":"        # TODO(dave) implement"},{"line_number":82,"context_line":"        if internal_project_id is None:"},{"line_number":83,"context_line":"            raise exception.QuotaReached(project_id\u003dexternal_project_id,"},{"line_number":84,"context_line":"                                         resource_type\u003dself.resource_type,"},{"line_number":85,"context_line":"                                         count\u003d0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_6e6ce99c","line":82,"in_reply_to":"fa1b9901_887e15ad","updated":"2015-08-17 16:24:45.000000000","message":"Disablement will be done on a per-resource basis.  If the configured quota for a resource is -1, then the quota for that resource is disabled.  The function here as implemented is a \"dummy\"; none of this code will remain when the API is implemented.","commit_id":"09a17a1e94c210e6206bc243921ae3f6d4cc927d"}]}
