)]}'
{"barbican/common/exception.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"807b30d0c823e844cd5653abca2a56582626d2ed","unresolved":false,"context_lines":[{"line_number":478,"context_line":"class CannotDeletePreferredCA(BarbicanHTTPException):"},{"line_number":479,"context_line":"    message \u003d u._(\"A new project preferred CA must be set \""},{"line_number":480,"context_line":"                  \"before this one can be deleted.\")"},{"line_number":481,"context_line":"    status_code \u003d 409"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_d6238854","line":481,"updated":"2015-09-30 15:14:03.000000000","message":"not a huge fan of using 409 (Conflict) which is normally returned on a PUT, but it looks like the best of the available 4xx error codes","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"}],"barbican/tasks/certificate_resources.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"807b30d0c823e844cd5653abca2a56582626d2ed","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    :param ca: class:`models.CertificateAuthority` to be deleted"},{"line_number":239,"context_line":"    :return: None"},{"line_number":240,"context_line":"     \"\"\""},{"line_number":241,"context_line":"    # TODO(alee) See if the checks below can be moved to the RBAC code"},{"line_number":242,"context_line":"    # Check that this CA is a subCA"},{"line_number":243,"context_line":"    if ca.project_id is None:"},{"line_number":244,"context_line":"        raise excep.CannotDeleteBaseCA()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_b699347b","line":241,"updated":"2015-09-30 15:14:03.000000000","message":"nit - if there is another patchset then howsabout a blank line between 241 and 242","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"9b1433c7c241ed0c42e4e0fa77f6f6a06d91aeea","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    :param ca: class:`models.CertificateAuthority` to be deleted"},{"line_number":239,"context_line":"    :return: None"},{"line_number":240,"context_line":"     \"\"\""},{"line_number":241,"context_line":"    # TODO(alee) See if the checks below can be moved to the RBAC code"},{"line_number":242,"context_line":"    # Check that this CA is a subCA"},{"line_number":243,"context_line":"    if ca.project_id is None:"},{"line_number":244,"context_line":"        raise excep.CannotDeleteBaseCA()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_775ce718","line":241,"in_reply_to":"9a1a9d01_b699347b","updated":"2015-09-30 21:17:28.000000000","message":"Done","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"7871f4f7444029e5945877afd64fd84e43f7cc3f","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    (preferred_cas, _, _, _) \u003d preferred_ca_repo.get_by_create_date("},{"line_number":258,"context_line":"        project_id\u003dproject.id, ca_id\u003dca.id, suppress_exception\u003dTrue)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    # Can not delete a project preferred CA, if there needs to be an heir"},{"line_number":261,"context_line":"    if project_cas and preferred_cas and not is_last_project_ca(project.id):"},{"line_number":262,"context_line":"        raise excep.CannotDeletePreferredCA()"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_745ce518","line":260,"updated":"2015-09-30 20:40:37.000000000","message":"While I understand what you mean by \u0027heir\u0027, I think you need\nto be more explicit and not define a new term.  Something like:\n\nCan not delete a project preferred CA, if other project cas exist.  One of these needs to be designated as the preferred CA first.","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"9b1433c7c241ed0c42e4e0fa77f6f6a06d91aeea","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    (preferred_cas, _, _, _) \u003d preferred_ca_repo.get_by_create_date("},{"line_number":258,"context_line":"        project_id\u003dproject.id, ca_id\u003dca.id, suppress_exception\u003dTrue)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    # Can not delete a project preferred CA, if there needs to be an heir"},{"line_number":261,"context_line":"    if project_cas and preferred_cas and not is_last_project_ca(project.id):"},{"line_number":262,"context_line":"        raise excep.CannotDeletePreferredCA()"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_d77a9376","line":260,"in_reply_to":"9a1a9d01_745ce518","updated":"2015-09-30 21:17:28.000000000","message":"Done","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"807b30d0c823e844cd5653abca2a56582626d2ed","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        external_project_id\u003dexternal_project_id)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def is_last_project_ca(project_id):"},{"line_number":286,"context_line":"    \"\"\"Returns True iff project has exactly one project CA"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    :param project_id: internal project ID"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_b68db4d4","line":285,"updated":"2015-09-30 15:14:03.000000000","message":"kinda sorta similar to the new function in barbican/api/controllers/cas.py.  not sure if its worth trying to put it in just 1 place or not.","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"7871f4f7444029e5945877afd64fd84e43f7cc3f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        external_project_id\u003dexternal_project_id)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def is_last_project_ca(project_id):"},{"line_number":286,"context_line":"    \"\"\"Returns True iff project has exactly one project CA"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    :param project_id: internal project ID"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_c028909c","line":285,"in_reply_to":"9a1a9d01_b68db4d4","updated":"2015-09-30 20:40:37.000000000","message":"maybe I\u0027m confused -- but hasn\u0027t the one in cas.py been removed (and moved here?)","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"0adb99ce0e003496c729e43868c1d435f5769623","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        external_project_id\u003dexternal_project_id)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def is_last_project_ca(project_id):"},{"line_number":286,"context_line":"    \"\"\"Returns True iff project has exactly one project CA"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    :param project_id: internal project ID"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_f4b555ec","line":285,"in_reply_to":"9a1a9d01_c028909c","updated":"2015-09-30 20:47:56.000000000","message":"its not you - its me.  I just read it wrong.  Ignore my comment above!","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"}],"barbican/tests/tasks/test_certificate_resources.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"807b30d0c823e844cd5653abca2a56582626d2ed","unresolved":false,"context_lines":[{"line_number":947,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":948,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    def test_should_delete_subca_and_friends(self):"},{"line_number":951,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":952,"context_line":"            project_model\u003dself.project,"},{"line_number":953,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_366f64fd","line":950,"updated":"2015-09-30 15:14:03.000000000","message":"certainly we need a test for the enemies as well?  :-)","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"9b1433c7c241ed0c42e4e0fa77f6f6a06d91aeea","unresolved":false,"context_lines":[{"line_number":947,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":948,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    def test_should_delete_subca_and_friends(self):"},{"line_number":951,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":952,"context_line":"            project_model\u003dself.project,"},{"line_number":953,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_f7279760","line":950,"in_reply_to":"9a1a9d01_366f64fd","updated":"2015-09-30 21:17:28.000000000","message":"Done","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"807b30d0c823e844cd5653abca2a56582626d2ed","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":969,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_should_raise_conflict_delete_subca_with_heir(self):"},{"line_number":972,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":973,"context_line":"            project_model\u003dself.project,"},{"line_number":974,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_363d24dd","line":971,"updated":"2015-09-30 15:14:03.000000000","message":"do we need to specify \"conflict\" here?","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"9b1433c7c241ed0c42e4e0fa77f6f6a06d91aeea","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":969,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_should_raise_conflict_delete_subca_with_heir(self):"},{"line_number":972,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":973,"context_line":"            project_model\u003dself.project,"},{"line_number":974,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_97fc1bb9","line":971,"in_reply_to":"9a1a9d01_14856958","updated":"2015-09-30 21:17:28.000000000","message":"Done","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"9b1433c7c241ed0c42e4e0fa77f6f6a06d91aeea","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":969,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_should_raise_conflict_delete_subca_with_heir(self):"},{"line_number":972,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":973,"context_line":"            project_model\u003dself.project,"},{"line_number":974,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_f710f701","line":971,"in_reply_to":"9a1a9d01_363d24dd","updated":"2015-09-30 21:17:28.000000000","message":"Done","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"7871f4f7444029e5945877afd64fd84e43f7cc3f","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        cert_res.delete_subordinate_ca(self.project.external_id, subca)"},{"line_number":969,"context_line":"        self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_should_raise_conflict_delete_subca_with_heir(self):"},{"line_number":972,"context_line":"        subca \u003d cert_res.create_subordinate_ca("},{"line_number":973,"context_line":"            project_model\u003dself.project,"},{"line_number":974,"context_line":"            name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_14856958","line":971,"in_reply_to":"9a1a9d01_363d24dd","updated":"2015-09-30 20:40:37.000000000","message":"same coment about \u0027heir\u0027","commit_id":"47cb67cd559a9dc8a09498a7fe9a84b793e43f96"}]}
