)]}'
{"barbican/api/controllers/secretmeta.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"390e6b55ffc8e3f5387dc9dac3db92420dfb5426","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\"Handles creation/update of secret metadata.\"\"\""},{"line_number":73,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.metadata_validator)"},{"line_number":74,"context_line":"        project \u003d res.get_or_create_project(external_project_id)"},{"line_number":75,"context_line":"        self.quota_enforcer.enforce(project, secret\u003dself.secret)"},{"line_number":76,"context_line":"        LOG.debug(\u0027Start secret metadata on_put...%s\u0027, data)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.user_meta_repo.create_replace_user_metadata(self.secret.id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_d5a0ca92","line":75,"updated":"2016-05-05 04:40:17.000000000","message":"Can remove project from here.","commit_id":"52bde6840ca211659da71a39b73522ff8f83a8c6"}],"barbican/common/config.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"6c764262fcd0ab5b171ffc61a223bd10fb0dfe7b","unresolved":false,"context_lines":[{"line_number":153,"context_line":"               help\u003d\u0027Number of CAs allowed per project\u0027),"},{"line_number":154,"context_line":"    cfg.IntOpt(\u0027quota_secret_meta\u0027,"},{"line_number":155,"context_line":"               default\u003d-1,"},{"line_number":156,"context_line":"               help\u003d\u0027Number of secret metadatum allowed per project\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_2a109258","line":156,"range":{"start_line":156,"start_character":48,"end_line":156,"end_character":67},"updated":"2016-03-23 23:44:47.000000000","message":"Why per project as opposed to per secret? That\u0027s what I would have thought.","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"348cbac10f4702bda5dc938f10180fa1eb633605","unresolved":false,"context_lines":[{"line_number":153,"context_line":"               help\u003d\u0027Number of CAs allowed per project\u0027),"},{"line_number":154,"context_line":"    cfg.IntOpt(\u0027quota_secret_meta\u0027,"},{"line_number":155,"context_line":"               default\u003d-1,"},{"line_number":156,"context_line":"               help\u003d\u0027Number of secret metadatum allowed per project\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_75026a0b","line":156,"range":{"start_line":156,"start_character":48,"end_line":156,"end_character":67},"in_reply_to":"fa0719c6_2a109258","updated":"2016-03-24 01:51:51.000000000","message":"Makes sense for me to do it for Secrets. I was just on the idea quotas were always only to be project-based. If no one is opposed I will rewrite it for secrets.","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"}],"barbican/common/quota.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"d8b2fa4a4f9140885884910cb7b2ad27f292fe70","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        elif self.quota_driver.is_disabled_value(quota):"},{"line_number":198,"context_line":"            reached \u003d True"},{"line_number":199,"context_line":"        else:"},{"line_number":200,"context_line":"            count \u003d self.resource_repo.get_count(project.id)"},{"line_number":201,"context_line":"            if count \u003e\u003d quota:"},{"line_number":202,"context_line":"                reached \u003d True"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_65975b48","line":200,"range":{"start_line":200,"start_character":12,"end_line":200,"end_character":60},"updated":"2016-03-23 23:58:11.000000000","message":"If you did allow the metadata to be per secret then you could put that logic here.","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"348cbac10f4702bda5dc938f10180fa1eb633605","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        elif self.quota_driver.is_disabled_value(quota):"},{"line_number":198,"context_line":"            reached \u003d True"},{"line_number":199,"context_line":"        else:"},{"line_number":200,"context_line":"            count \u003d self.resource_repo.get_count(project.id)"},{"line_number":201,"context_line":"            if count \u003e\u003d quota:"},{"line_number":202,"context_line":"                reached \u003d True"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_72ca801c","line":200,"range":{"start_line":200,"start_character":12,"end_line":200,"end_character":60},"in_reply_to":"fa0719c6_65975b48","updated":"2016-03-24 01:51:51.000000000","message":"I\u0027m thinking something like...\n\nif self.resource_type is secret_meta:\n    self.resource_repo.get_count(secret.id)\n\nor something like that. I\u0027ll look more into it.\nI also have to write the get_count method shouldn\u0027t be too bad","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"390e6b55ffc8e3f5387dc9dac3db92420dfb5426","unresolved":false,"context_lines":[{"line_number":30,"context_line":"CONF \u003d config.CONF"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class QuotaDriver(object):"},{"line_number":34,"context_line":"    \"\"\"Driver to enforce quotas and obtain quota information.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_9105c711","line":33,"updated":"2016-05-05 04:40:17.000000000","message":"Everything that is project specific will become entity instead to standardize the naming. That will include changing naming in https://github.com/openstack/barbican/blob/8af2789c4e545873cfdaaa1cef1abaac8633dbdd/barbican/api/controllers/quotas.py.\n\nAll that will be done in a different commit.","commit_id":"52bde6840ca211659da71a39b73522ff8f83a8c6"}],"barbican/model/models.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"6c764262fcd0ab5b171ffc61a223bd10fb0dfe7b","unresolved":false,"context_lines":[{"line_number":401,"context_line":"    value \u003d sa.Column(sa.String(255), nullable\u003dFalse)"},{"line_number":402,"context_line":"    secret_id \u003d sa.Column("},{"line_number":403,"context_line":"        sa.String(36), sa.ForeignKey(\u0027secrets.id\u0027), index\u003dTrue, nullable\u003dFalse)"},{"line_number":404,"context_line":"    project_id \u003d sa.Column("},{"line_number":405,"context_line":"        sa.String(36),"},{"line_number":406,"context_line":"        sa.ForeignKey(\u0027projects.id\u0027, name\u003d\u0027secret_user_metadata_project_fk\u0027),"},{"line_number":407,"context_line":"        index\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_05713fa8","line":404,"updated":"2016-03-23 23:44:47.000000000","message":"I don\u0027t like the idea of adding a new column for project ID. The reason is that the project ID can be derived by retrieving the secret and getting the project ID from that. Having this column can lead to inconsistencies in the database.","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"348cbac10f4702bda5dc938f10180fa1eb633605","unresolved":false,"context_lines":[{"line_number":401,"context_line":"    value \u003d sa.Column(sa.String(255), nullable\u003dFalse)"},{"line_number":402,"context_line":"    secret_id \u003d sa.Column("},{"line_number":403,"context_line":"        sa.String(36), sa.ForeignKey(\u0027secrets.id\u0027), index\u003dTrue, nullable\u003dFalse)"},{"line_number":404,"context_line":"    project_id \u003d sa.Column("},{"line_number":405,"context_line":"        sa.String(36),"},{"line_number":406,"context_line":"        sa.ForeignKey(\u0027projects.id\u0027, name\u003d\u0027secret_user_metadata_project_fk\u0027),"},{"line_number":407,"context_line":"        index\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_351d9266","line":404,"in_reply_to":"fa0719c6_05713fa8","updated":"2016-03-24 01:51:51.000000000","message":"No worries. I plan on changing this to per Secret","commit_id":"deffc446a353b014672699d55f0f34a9288a1f9c"}],"barbican/tests/common/test_quota.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"5c8263468cb03de478f9123a4ca84b1f160ed2cf","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self.assertIn(\u0027secrets\u0027, exception.message)"},{"line_number":245,"context_line":"        self.assertIn(str(0), exception.message)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def test_should_pass_below_limit(self):"},{"line_number":248,"context_line":"        test_repo \u003d DummyRepoForTestingQuotaEnforcement(4)"},{"line_number":249,"context_line":"        quota_enforcer \u003d quota.QuotaEnforcer(\u0027secrets\u0027, test_repo)"},{"line_number":250,"context_line":"        five_project_quotas \u003d {\u0027consumers\u0027: 5, \u0027containers\u0027: 5,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_ed95ad88","line":247,"updated":"2016-04-08 18:15:03.000000000","message":"All these test may need to be altered. They work because all the value are set the same, but they are not tested correctly because the quota_enforcer is always set to secrets. This is a problem because the quota is derived from the resource_type. \n\nSee:\nhttps://github.com/openstack/barbican/blob/master/barbican/common/quota.py#L189\n\nand \n\nhttps://github.com/openstack/barbican/blob/master/barbican/common/quota.py#L198-L200","commit_id":"371a136f38a87240fb2d89755868f73b4e832cde"}]}
