)]}'
{"barbican/api/controllers/cas.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4a6d6ab4f9fd860f8681345c0349c84182c3f0da","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            self.preferred_ca_repo.delete_entity_by_id(global_preferred_ca.id)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"class CertificateAuthoritiesController(object):"},{"line_number":232,"context_line":"    \"\"\"Handles certificate authority list requests.\"\"\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def __init__(self, ca_repo\u003dNone, project_ca_repo\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_a7e40aa9","line":231,"updated":"2015-01-19 19:44:03.000000000","message":"This controller is missing the default 405 index","commit_id":"6ed54210dc4af93f8a7f43bac09cd13d0092e85f"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"a9f167043eb0f0c85f5a1907d08e0f72e59758e0","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            self.preferred_ca_repo.delete_entity_by_id(global_preferred_ca.id)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"class CertificateAuthoritiesController(object):"},{"line_number":232,"context_line":"    \"\"\"Handles certificate authority list requests.\"\"\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def __init__(self, ca_repo\u003dNone, project_ca_repo\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_d0d79a49","line":231,"in_reply_to":"3a961159_a7e40aa9","updated":"2015-01-23 22:40:22.000000000","message":"will add in next iteration.","commit_id":"6ed54210dc4af93f8a7f43bac09cd13d0092e85f"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"ce3c6c84ef68c8a1f0b43e1e1842e6ac5838b8a8","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    def on_get(self, external_project_id, **kw):"},{"line_number":291,"context_line":"        LOG.debug(\u0027Start certificate_authorities on_get\u0027)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        plugin_name \u003d kw.get(\u0027plugin_name\u0027, None)"},{"line_number":294,"context_line":"        if plugin_name is not None:"},{"line_number":295,"context_line":"            plugin_name \u003d urllib.unquote_plus(plugin_name)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_212e0b8d","line":293,"updated":"2015-02-16 20:50:23.000000000","message":".get() on a dict defaults to None already","commit_id":"42473036dcb1ed31a71c29fc075cac2a9fbc36ef"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"ce3c6c84ef68c8a1f0b43e1e1842e6ac5838b8a8","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                for s in cas"},{"line_number":318,"context_line":"            ]"},{"line_number":319,"context_line":"            cas_resp_overall \u003d hrefs.add_nav_hrefs("},{"line_number":320,"context_line":"                \u0027cas\u0027, offset, limit, total,"},{"line_number":321,"context_line":"                {\u0027cas\u0027: cas_resp}"},{"line_number":322,"context_line":"            )"},{"line_number":323,"context_line":"            cas_resp_overall.update({\u0027total\u0027: total})"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_e1c79363","line":320,"updated":"2015-02-16 20:50:23.000000000","message":"can you indent these on their own lines as well to make it a little easier to read?","commit_id":"42473036dcb1ed31a71c29fc075cac2a9fbc36ef"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"2854891a87a91be506acca10b22ae6e5afdd0f56","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_b3331112","line":1,"updated":"2015-02-17 18:19:02.000000000","message":"2015?","commit_id":"d6fa022790fa5f98b776e897b8e1677a24cb85af"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"35f9930ce888f3f1933eed18a7df747d5d699f24","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    @pecan.expose(template\u003d\u0027json\u0027)"},{"line_number":110,"context_line":"    @controllers.handle_exceptions(u._(\u0027CA projects retrieval\u0027))"},{"line_number":111,"context_line":"    @controllers.enforce_rbac(\u0027certificate_authority:get_projects\u0027)"},{"line_number":112,"context_line":"    def projects(self, external_project_id):"},{"line_number":113,"context_line":"        LOG.debug(\"\u003d\u003d Getting Projects for %s\", self.ca_id)"},{"line_number":114,"context_line":"        ca \u003d self.ca_repo.get(entity_id\u003dself.ca_id)"},{"line_number":115,"context_line":"        if not ca:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_84c24951","line":112,"updated":"2015-02-17 15:53:22.000000000","message":"Probably for this you need to check the method type like you do in the subsequent functions.","commit_id":"d6fa022790fa5f98b776e897b8e1677a24cb85af"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"69628749a1e1036a155110eb75c580b1fed0c0e6","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        if not ca:"},{"line_number":77,"context_line":"            _certificate_authority_not_found()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        pecan.override_template(\u0027json\u0027, \u0027application/json\u0027)"},{"line_number":80,"context_line":"        return ca.to_dict_fields()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @pecan.expose()"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3d716c0c","line":79,"updated":"2015-03-13 19:32:58.000000000","message":"is there a reason why this was done here and not as a parameter of\n\n@index.when(method\u003d\u0027GET\u0027)\n\n?\n\nSuch as:\n\n@index.when(method\u003d\u0027GET\u0027, template\u003d\u0027json\u0027)","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        if not ca:"},{"line_number":77,"context_line":"            _certificate_authority_not_found()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        pecan.override_template(\u0027json\u0027, \u0027application/json\u0027)"},{"line_number":80,"context_line":"        return ca.to_dict_fields()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @pecan.expose()"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_966cc4d1","line":79,"in_reply_to":"9a80dd14_3d716c0c","updated":"2015-03-16 14:20:27.000000000","message":"good point - will fix","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"908d21c0b9b6401adc4ddde67b06a8ae5cb1b7df","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        for project_ca in project_cas:"},{"line_number":145,"context_line":"            if project_ca.ca_id \u003d\u003d ca.id:"},{"line_number":146,"context_line":"                # project already added"},{"line_number":147,"context_line":"                return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        project_ca \u003d models.ProjectCertificateAuthority("},{"line_number":150,"context_line":"            project_model.id, self.ca_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_c2286c99","line":147,"updated":"2015-03-13 21:21:09.000000000","message":"Should we just return or should we return an error code to let the user know that the CA was not really added? I\u0027m not sure I have a strong preference one way or the other, but I think it\u0027s a discussion point.","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        for project_ca in project_cas:"},{"line_number":145,"context_line":"            if project_ca.ca_id \u003d\u003d ca.id:"},{"line_number":146,"context_line":"                # project already added"},{"line_number":147,"context_line":"                return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        project_ca \u003d models.ProjectCertificateAuthority("},{"line_number":150,"context_line":"            project_model.id, self.ca_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_96a3e4fe","line":147,"in_reply_to":"9a80dd14_c2286c99","updated":"2015-03-16 14:20:27.000000000","message":"I dont have any preference either way either.  If there was an error code, what would it be?","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"908d21c0b9b6401adc4ddde67b06a8ae5cb1b7df","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        if project_ca:"},{"line_number":180,"context_line":"            self.project_ca_repo.delete_entity_by_id("},{"line_number":181,"context_line":"                project_ca[0].id,"},{"line_number":182,"context_line":"                None)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    @pecan.expose()"},{"line_number":185,"context_line":"    @controllers.handle_exceptions(u._(\u0027Set preferred project CA\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_c544f648","line":182,"updated":"2015-03-13 21:21:09.000000000","message":"I feel like if project is not associated with CA then we should return something to indicate that, whether that be an error code or string.","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        if project_ca:"},{"line_number":180,"context_line":"            self.project_ca_repo.delete_entity_by_id("},{"line_number":181,"context_line":"                project_ca[0].id,"},{"line_number":182,"context_line":"                None)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    @pecan.expose()"},{"line_number":185,"context_line":"    @controllers.handle_exceptions(u._(\u0027Set preferred project CA\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_36ff9803","line":182,"in_reply_to":"9a80dd14_c544f648","updated":"2015-03-16 14:20:27.000000000","message":"Right now, I guess it returns 204 - No content.\nHow do folks suggest we handle this?","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"69628749a1e1036a155110eb75c580b1fed0c0e6","unresolved":false,"context_lines":[{"line_number":279,"context_line":"    @pecan.expose()"},{"line_number":280,"context_line":"    def _lookup(self, ca_id, *remainder):"},{"line_number":281,"context_line":"        return CertificateAuthorityController("},{"line_number":282,"context_line":"            ca_id), remainder"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":285,"context_line":"    def index(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5d89c024","line":282,"updated":"2015-03-13 19:32:58.000000000","message":"Even though this is correct, perhaps it would be better to refactor this such as it was done in the other controllers, in order to do the lookup in the _lookup function. instead of adding this: \n\nca \u003d self.ca_repo.get(entity_id\u003dself.ca_id, suppress_exception\u003dTrue)\nif not ca:\n    _certificate_authority_not_found()\n\nTo every function in CertificateAuthorityController","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"908d21c0b9b6401adc4ddde67b06a8ae5cb1b7df","unresolved":false,"context_lines":[{"line_number":279,"context_line":"    @pecan.expose()"},{"line_number":280,"context_line":"    def _lookup(self, ca_id, *remainder):"},{"line_number":281,"context_line":"        return CertificateAuthorityController("},{"line_number":282,"context_line":"            ca_id), remainder"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":285,"context_line":"    def index(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ff36e701","line":282,"in_reply_to":"9a80dd14_5d89c024","updated":"2015-03-13 21:21:09.000000000","message":"Juan, are you suggesting adding the code from your comment here and then passing the ca model to the CA controller? If so then +1. I think that would simplify the other methods and remove the redundancy.","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":279,"context_line":"    @pecan.expose()"},{"line_number":280,"context_line":"    def _lookup(self, ca_id, *remainder):"},{"line_number":281,"context_line":"        return CertificateAuthorityController("},{"line_number":282,"context_line":"            ca_id), remainder"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":285,"context_line":"    def index(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_f6ac2037","line":282,"in_reply_to":"9a80dd14_ff36e701","updated":"2015-03-16 14:20:27.000000000","message":"Done","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"908d21c0b9b6401adc4ddde67b06a8ae5cb1b7df","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    @index.when(method\u003d\u0027GET\u0027, template\u003d\u0027json\u0027)"},{"line_number":289,"context_line":"    @controllers.handle_exceptions(u._(\u0027Certificate Authorities retrieval\u0027))"},{"line_number":290,"context_line":"    @controllers.enforce_rbac(\u0027certificate_authorities:get\u0027)"},{"line_number":291,"context_line":"    def on_get(self, external_project_id, **kw):"},{"line_number":292,"context_line":"        LOG.debug(\u0027Start certificate_authorities on_get\u0027)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_f309c531","line":290,"updated":"2015-03-13 21:21:09.000000000","message":"Does this need @controllers.enforce_content_types([\u0027application/json\u0027]) ?","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    @index.when(method\u003d\u0027GET\u0027, template\u003d\u0027json\u0027)"},{"line_number":289,"context_line":"    @controllers.handle_exceptions(u._(\u0027Certificate Authorities retrieval\u0027))"},{"line_number":290,"context_line":"    @controllers.enforce_rbac(\u0027certificate_authorities:get\u0027)"},{"line_number":291,"context_line":"    def on_get(self, external_project_id, **kw):"},{"line_number":292,"context_line":"        LOG.debug(\u0027Start certificate_authorities on_get\u0027)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_d6b1dc8f","line":290,"in_reply_to":"9a80dd14_f309c531","updated":"2015-03-16 14:20:27.000000000","message":"I dont see that on other GET methods.  POST certainly ..","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"}],"barbican/model/repositories.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"69628749a1e1036a155110eb75c580b1fed0c0e6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"_TRANSPORT_KEY_REPOSITORY \u003d None"},{"line_number":63,"context_line":"_CA_REPOSITORY \u003d None"},{"line_number":64,"context_line":"_PROJECT_CA_REPOSITORY \u003d None"},{"line_number":65,"context_line":"_PREFERRED_CA_REPOSITORY \u003d None"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"db_opts \u003d ["},{"line_number":68,"context_line":"    cfg.IntOpt(\u0027sql_idle_timeout\u0027, default\u003d3600),"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_388a5a64","line":65,"updated":"2015-03-13 19:32:58.000000000","message":"uh... I know this is a nit... but I set those repositories in alphabetical order so they would be easier to find... don\u0027t worry about it though, if you don\u0027t feel like changing it, I will submit a subsequent CR changing that and adding a comment about the order. It might sound like too much, but the order was really helpful when refactoring the usage of the repositories.","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"9c62436d510e0bb45dfa53364491d29d4b15de2d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"_TRANSPORT_KEY_REPOSITORY \u003d None"},{"line_number":63,"context_line":"_CA_REPOSITORY \u003d None"},{"line_number":64,"context_line":"_PROJECT_CA_REPOSITORY \u003d None"},{"line_number":65,"context_line":"_PREFERRED_CA_REPOSITORY \u003d None"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"db_opts \u003d ["},{"line_number":68,"context_line":"    cfg.IntOpt(\u0027sql_idle_timeout\u0027, default\u003d3600),"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_c121184e","line":65,"in_reply_to":"9a80dd14_388a5a64","updated":"2015-03-16 14:20:27.000000000","message":"I changed the order and added a note.   I also added the get_XXX_repo functions in alphabetical order too.","commit_id":"cc8ef0a006f7612ee008d43f68e579f008ce3f38"}],"barbican/tests/api/test_certificate_authorities_resource.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"2854891a87a91be506acca10b22ae6e5afdd0f56","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_8e30a008","line":1,"updated":"2015-02-17 18:19:02.000000000","message":"2015?","commit_id":"d6fa022790fa5f98b776e897b8e1677a24cb85af"}],"barbican/tests/model/repositories/test_repositories_certificate_authorities.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"9c77814243ecc24e70d110690cd22e822dd3353f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            plugin_name\u003dself.parsed_ca[\u0027plugin_name\u0027]"},{"line_number":78,"context_line":"        )"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.assertEqual([ca1.id], [s.id for s in retrieved_cas])"},{"line_number":81,"context_line":"        self.assertEqual(0, offset)"},{"line_number":82,"context_line":"        self.assertEqual(10, limit)"},{"line_number":83,"context_line":"        self.assertEqual(1, total)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_826c7ed1","line":80,"updated":"2015-03-16 14:45:33.000000000","message":"if you need extra info, you could even use assertListEqual in this case.","commit_id":"fd475e0c511c0281c6d22998f7e5789bacdc97c9"}]}
