)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"6c34cef3d0d9a9a5a3dc70aa947ac977d7a1c624","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"57ab1978_3fb4fecd","updated":"2022-11-25 10:12:55.000000000","message":"Good start.  Now, of course, we need:\n1) unit and functional tests\n2) release note (particularly as we are changing default behavior)","commit_id":"42e7588c4861f0971e7f3a72fb05b158c8e4c2df"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"f962d5c30837f04d5ddcddfe41c864168f50f381","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2b5d796a_54667979","updated":"2022-11-25 16:25:57.000000000","message":"recheck","commit_id":"67a68e7fae6bae258f764dae4ed229b0b98608d0"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"74b3e15632087feef050376029f0b1d551fe40fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"4ad27725_6b4fba31","updated":"2023-01-18 17:05:40.000000000","message":"This also needs a release note.","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"}],"barbicanclient/barbican_cli/v1/secrets.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"6c34cef3d0d9a9a5a3dc70aa947ac977d7a1c624","unresolved":true,"context_lines":[{"line_number":206,"context_line":"        return entity._get_formatted_entity()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class RegisterConsumer(command.Command):"},{"line_number":210,"context_line":"    \"\"\"Register a consumer for a secret.\"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ecc15ff4_3e369aeb","line":209,"range":{"start_line":209,"start_character":6,"end_line":209,"end_character":23},"updated":"2022-11-25 10:12:55.000000000","message":"For consistency, use CreateConsumer, DeleteConsumer","commit_id":"42e7588c4861f0971e7f3a72fb05b158c8e4c2df"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"f962d5c30837f04d5ddcddfe41c864168f50f381","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return entity._get_formatted_entity()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class RegisterConsumer(command.Command):"},{"line_number":210,"context_line":"    \"\"\"Register a consumer for a secret.\"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"c6b29732_c576835d","line":209,"range":{"start_line":209,"start_character":6,"end_line":209,"end_character":23},"in_reply_to":"ecc15ff4_3e369aeb","updated":"2022-11-25 16:25:57.000000000","message":"Shouldn\u0027t we use the similar names of the ones used by the original methods (register_consumer() and remove_consumer())?","commit_id":"42e7588c4861f0971e7f3a72fb05b158c8e4c2df"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"74b3e15632087feef050376029f0b1d551fe40fb","unresolved":true,"context_lines":[{"line_number":206,"context_line":"        return entity._get_formatted_entity()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class CreateConsumer(command.Command):"},{"line_number":210,"context_line":"    \"\"\"Create a consumer for a secret.\"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf2ad3c4_f23f575b","line":209,"range":{"start_line":209,"start_character":0,"end_line":209,"end_character":8},"updated":"2023-01-18 17:05:40.000000000","message":"Both these classes are completely untested by CI.\n\nWe need to do some CLI tests.  These can be found in python-barbicanclient/functionaltests/cli/v1/smoke .  We need to add tests for these two\nclasses as well as the delete change above.","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"c01470c3a4536fc98f897e7bbc090dfa08c9a9e4","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return entity._get_formatted_entity()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class CreateConsumer(command.Command):"},{"line_number":210,"context_line":"    \"\"\"Create a consumer for a secret.\"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":12,"id":"8f112d5f_950b06ee","line":209,"range":{"start_line":209,"start_character":0,"end_line":209,"end_character":8},"in_reply_to":"bf2ad3c4_f23f575b","updated":"2023-02-03 15:01:02.000000000","message":"Done","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"0a2d37fd6a79629fe1632d69458a6d2a6c5e84f8","unresolved":true,"context_lines":[{"line_number":212,"context_line":"    def get_parser(self, prog_name):"},{"line_number":213,"context_line":"        parser \u003d super(CreateConsumer, self).get_parser(prog_name)"},{"line_number":214,"context_line":"        parser.add_argument(\u0027URI\u0027, help\u003d\u0027The URI reference for the secret\u0027)"},{"line_number":215,"context_line":"        parser.add_argument(\u0027--servicename\u0027, \u0027-s\u0027, required\u003dTrue,"},{"line_number":216,"context_line":"                            help\u003d\u0027the service that will consume the secret\u0027)"},{"line_number":217,"context_line":"        parser.add_argument(\u0027--resource-type\u0027, \u0027-t\u0027, required\u003dTrue,"},{"line_number":218,"context_line":"                            help\u003d\u0027the type of resource that will consume \u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"ef7e000e_66c8fb04","line":215,"updated":"2023-02-02 12:34:56.000000000","message":"We\u0027re changing service-name to service-type. This will be compatible with the naming used in the field description in the spec https://specs.openstack.org/openstack/barbican-specs/specs/train/secret-consumers.html#rest-api-impact","commit_id":"7fc4f2eb96cf51ff0712fdeb435eafbf4eca3d75"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"2acbcc83182d3353696ff5268f56cabee6d399ab","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    def get_parser(self, prog_name):"},{"line_number":213,"context_line":"        parser \u003d super(CreateConsumer, self).get_parser(prog_name)"},{"line_number":214,"context_line":"        parser.add_argument(\u0027URI\u0027, help\u003d\u0027The URI reference for the secret\u0027)"},{"line_number":215,"context_line":"        parser.add_argument(\u0027--servicename\u0027, \u0027-s\u0027, required\u003dTrue,"},{"line_number":216,"context_line":"                            help\u003d\u0027the service that will consume the secret\u0027)"},{"line_number":217,"context_line":"        parser.add_argument(\u0027--resource-type\u0027, \u0027-t\u0027, required\u003dTrue,"},{"line_number":218,"context_line":"                            help\u003d\u0027the type of resource that will consume \u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"0541fbbd_03316f10","line":215,"in_reply_to":"ef7e000e_66c8fb04","updated":"2023-02-02 15:12:08.000000000","message":"Done","commit_id":"7fc4f2eb96cf51ff0712fdeb435eafbf4eca3d75"}],"barbicanclient/tests/v1/test_consumers.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"e4aec292f60608ce57c61e23e38d054be571d0c5","unresolved":true,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        self._delete_from_manager(secret_ref, force\u003dforce, consumers\u003dconsumers)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_should_delete_from_manager_with_consumers_without_force(self):"},{"line_number":120,"context_line":"        self.assertRaises("},{"line_number":121,"context_line":"            ValueError,"},{"line_number":122,"context_line":"            self._delete_from_manager_with_consumers, self.entity_href,"}],"source_content_type":"text/x-python","patch_set":15,"id":"27069ab4_5820e9b8","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":68},"updated":"2023-01-22 09:53:29.000000000","message":"test_delete_from_manager_fails_with_consumers_without_force","commit_id":"b42a80c8e3f8ae31b7868e21064302186a799533"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"1a758b267d1cfc7ac2351fe11d70be499d39d440","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        self._delete_from_manager(secret_ref, force\u003dforce, consumers\u003dconsumers)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_should_delete_from_manager_with_consumers_without_force(self):"},{"line_number":120,"context_line":"        self.assertRaises("},{"line_number":121,"context_line":"            ValueError,"},{"line_number":122,"context_line":"            self._delete_from_manager_with_consumers, self.entity_href,"}],"source_content_type":"text/x-python","patch_set":15,"id":"0aa7d844_4c1602e1","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":68},"in_reply_to":"27069ab4_5820e9b8","updated":"2023-01-23 16:20:58.000000000","message":"Done","commit_id":"b42a80c8e3f8ae31b7868e21064302186a799533"}],"barbicanclient/tests/v1/test_secrets.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"32da21b1f090d8abd258ae712810e4de04d0ac17","unresolved":true,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        delete_response \u003d self.responses.delete(self.entity_href,"},{"line_number":437,"context_line":"                                                status_code\u003d204)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":440,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"4350f0df_5988c83f","line":438,"updated":"2022-11-30 11:07:20.000000000","message":"Break up the below in multiple tests","commit_id":"67a68e7fae6bae258f764dae4ed229b0b98608d0"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"a695ce13c306ad74ff8b046db0e44838f67ea43a","unresolved":false,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        delete_response \u003d self.responses.delete(self.entity_href,"},{"line_number":437,"context_line":"                                                status_code\u003d204)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":440,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"e05978f0_8551acb7","line":438,"in_reply_to":"4350f0df_5988c83f","updated":"2022-12-02 09:37:56.000000000","message":"Done","commit_id":"67a68e7fae6bae258f764dae4ed229b0b98608d0"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"27d2bdce2c43693df14013011f5c63d969fe702e","unresolved":true,"context_lines":[{"line_number":440,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":441,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_should_delete_from_manager_with_consumers(self,"},{"line_number":446,"context_line":"                                                       secret_ref\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"c9bd7058_bf6c16a5","line":443,"updated":"2022-12-02 16:03:09.000000000","message":"What we want to test here is the manager, right?\nSo we should call this method first and then check if it called the server\u0027s API with correct parameters.","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"c8c9ba3144eecc38fd6627740552a5af526db37e","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":441,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_should_delete_from_manager_with_consumers(self,"},{"line_number":446,"context_line":"                                                       secret_ref\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"49bc81ef_5044b579","line":443,"in_reply_to":"a59e473f_5116ae3c","updated":"2022-12-16 12:42:22.000000000","message":"Done","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"4ebfbdf23d6731e7da820e20e8a151ab1e76090b","unresolved":true,"context_lines":[{"line_number":440,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":441,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_should_delete_from_manager_with_consumers(self,"},{"line_number":446,"context_line":"                                                       secret_ref\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"a59e473f_5116ae3c","line":443,"in_reply_to":"c9bd7058_bf6c16a5","updated":"2022-12-05 11:37:56.000000000","message":"Other equivalent \"from_manager\" methods here and in Castellan don\u0027t do like this.  Could you elaborate the comment with examples?","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"27d2bdce2c43693df14013011f5c63d969fe702e","unresolved":true,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_should_delete_from_manager_with_consumers(self,"},{"line_number":446,"context_line":"                                                       secret_ref\u003dNone,"},{"line_number":447,"context_line":"                                                       force\u003dFalse):"},{"line_number":448,"context_line":"        api_get_return \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fe115ce_2af39eef","line":445,"updated":"2022-12-02 16:03:09.000000000","message":"this method and the above (test_should_delete_from_manager) have too many things in common, we should extract the common part to another method and reuse it.","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"4ebfbdf23d6731e7da820e20e8a151ab1e76090b","unresolved":false,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_should_delete_from_manager_with_consumers(self,"},{"line_number":446,"context_line":"                                                       secret_ref\u003dNone,"},{"line_number":447,"context_line":"                                                       force\u003dFalse):"},{"line_number":448,"context_line":"        api_get_return \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"4003fd82_533abf33","line":445,"in_reply_to":"1fe115ce_2af39eef","updated":"2022-12-05 11:37:56.000000000","message":"Ack","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"27d2bdce2c43693df14013011f5c63d969fe702e","unresolved":true,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # Deleting a secret with consumers"},{"line_number":473,"context_line":"        if force:"},{"line_number":474,"context_line":"            self.manager.delete(secret_ref\u003dsecret_ref, force\u003dTrue)"},{"line_number":475,"context_line":"        else:"},{"line_number":476,"context_line":"            self.assertRaises(ValueError, self.manager.delete,"},{"line_number":477,"context_line":"                              secret_ref\u003dsecret_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5539a4_346fad17","line":474,"updated":"2022-12-02 16:03:09.000000000","message":"instead of just sending the delete request and not expecting an error, I think we should test if the client called the delete from the server.","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"c8c9ba3144eecc38fd6627740552a5af526db37e","unresolved":false,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # Deleting a secret with consumers"},{"line_number":473,"context_line":"        if force:"},{"line_number":474,"context_line":"            self.manager.delete(secret_ref\u003dsecret_ref, force\u003dTrue)"},{"line_number":475,"context_line":"        else:"},{"line_number":476,"context_line":"            self.assertRaises(ValueError, self.manager.delete,"},{"line_number":477,"context_line":"                              secret_ref\u003dsecret_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"513f9577_ef3ca742","line":474,"in_reply_to":"1eca6023_0a4d57b7","updated":"2022-12-16 12:42:22.000000000","message":"Done","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"4ebfbdf23d6731e7da820e20e8a151ab1e76090b","unresolved":true,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # Deleting a secret with consumers"},{"line_number":473,"context_line":"        if force:"},{"line_number":474,"context_line":"            self.manager.delete(secret_ref\u003dsecret_ref, force\u003dTrue)"},{"line_number":475,"context_line":"        else:"},{"line_number":476,"context_line":"            self.assertRaises(ValueError, self.manager.delete,"},{"line_number":477,"context_line":"                              secret_ref\u003dsecret_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1eca6023_0a4d57b7","line":474,"in_reply_to":"5a5539a4_346fad17","updated":"2022-12-05 11:37:56.000000000","message":"Could you elaborate on what you mean by \"test if the client called the delete from the server\"?","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"27d2bdce2c43693df14013011f5c63d969fe702e","unresolved":true,"context_lines":[{"line_number":477,"context_line":"                              secret_ref\u003dsecret_ref)"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def test_should_delete_from_manager_consumers_no_force(self):"},{"line_number":480,"context_line":"        self.test_should_delete_from_manager_with_consumers()"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def test_should_delete_from_manager_consumers_force(self):"},{"line_number":483,"context_line":"        self.test_should_delete_from_manager_with_consumers(self.entity_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"01ffdc82_b5a14735","line":480,"updated":"2022-12-02 16:03:09.000000000","message":"As said before, this is just rerunning test_should_delete_from_manager_with_consumers.\nFrom what I understood, we should test deleting secret without consumers without the --force flag, and with the --force flag, correct?","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"4ebfbdf23d6731e7da820e20e8a151ab1e76090b","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                              secret_ref\u003dsecret_ref)"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def test_should_delete_from_manager_consumers_no_force(self):"},{"line_number":480,"context_line":"        self.test_should_delete_from_manager_with_consumers()"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def test_should_delete_from_manager_consumers_force(self):"},{"line_number":483,"context_line":"        self.test_should_delete_from_manager_with_consumers(self.entity_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"251eeec2_c58406d6","line":480,"in_reply_to":"01ffdc82_b5a14735","updated":"2022-12-05 11:37:56.000000000","message":"Ack","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"b704f94a3c8489d739186311a587506d18405ab1","unresolved":true,"context_lines":[{"line_number":438,"context_line":"                                                status_code\u003d204)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":441,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        # Calls the delete method only if secret has no consumers."},{"line_number":444,"context_line":"        # Otherwise leaves the correct method to delete it accordingly."}],"source_content_type":"text/x-python","patch_set":12,"id":"e0a5e0c3_33b27982","line":441,"updated":"2023-01-19 16:25:54.000000000","message":"As far as I know, this assert was used because it came after the \u0027self.manager.delete\u0027, so we could see if the code used the correct url.\nWe should delete this line or move for after the call.","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"7329c6fc15d50e0a0d122f65e3c399bd8ada3263","unresolved":true,"context_lines":[{"line_number":440,"context_line":"        # Verify the correct URL was used to make the call."},{"line_number":441,"context_line":"        self.assertEqual(self.entity_href, delete_response._url)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        # Calls the delete method only if secret has no consumers."},{"line_number":444,"context_line":"        # Otherwise leaves the correct method to delete it accordingly."},{"line_number":445,"context_line":"        if len(api_get_return[\u0027consumers\u0027]) \u003d\u003d 0:"},{"line_number":446,"context_line":"            self.manager.delete(secret_ref\u003dsecret_ref)"},{"line_number":447,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"31c9fd99_874a0754","line":444,"range":{"start_line":443,"start_character":0,"end_line":444,"end_character":71},"updated":"2023-01-18 17:27:52.000000000","message":"While the logic is ultimately right here, this is confusing to follow.  I needed to read it 3 times to make sure the right cases were being handled here.\n\nMaybe what you want is a helper function to set up all the mocks, which can then be called by each of the test cases.  Its ok to repeat stuff if it makes things clear.\n\n  def _set_up_delete_mocks(consumers\u003dNone)\n     ...\n     \n  def test_should_delete_from_manager():\n     set_up_delete_mocks()\n     self.manager.delete(..)\n   \n  def test_should_delete_from_manager_with_consumers_and_force():\n     consumers \u003d {...}\n     set_up_delete_mocks(consumers)\n     self.manager.delete(...., force\u003dtrue)\n     \n  def test_should_fail_to_delete_from_manager_with_consumers_and_no_force():\n     consumers \u003d {...}\n     set_up_delete_mocks(consumers)\n     self.assertRaises(...)","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"3744e508a8d4fb70f1d6a990be0a621ac79d7b7b","unresolved":true,"context_lines":[{"line_number":567,"context_line":"    def test_should_fail_delete_no_href(self):"},{"line_number":568,"context_line":"        self.assertRaises(ValueError, self.manager.delete, None)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def test_should_register_consumer(self):"},{"line_number":571,"context_line":"        data \u003d self.secret.get_dict(self.entity_href,"},{"line_number":572,"context_line":"                                    consumers\u003d[self.secret.consumer])"},{"line_number":573,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"c0b873e9_13de120c","side":"PARENT","line":570,"updated":"2023-01-20 15:31:46.000000000","message":"test_should_register_consumer and test_should_remove_consumer were refactored and moved to test_consumers","commit_id":"3ffa1600af21620d7f141faee9389c7e7e9079e3"}],"barbicanclient/v1/secrets.py":[{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"f5a6cfe5c72ef7e687093fe801978f4842d7fad9","unresolved":true,"context_lines":[{"line_number":556,"context_line":"            self._api.delete(uuid_ref)"},{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            raise ValueError(\"Secret has consumers! Remove them first or \""},{"line_number":559,"context_line":"                             \"use the --force option.\")"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def list(self, limit\u003d10, offset\u003d0, name\u003dNone, algorithm\u003dNone, mode\u003dNone,"},{"line_number":562,"context_line":"             bits\u003d0, secret_type\u003dNone, created\u003dNone, updated\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1519c95b_5891339a","line":559,"updated":"2023-01-19 12:43:36.000000000","message":"You wouldn\u0027t always use the commandline when calling this method, so the message should specify a force argument, not \"--force option\".","commit_id":"67e43ebf7886733f25e19b3b6ea787b6d243f8ab"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"a7af5e5f530f54717917430e4e43b9c5c9e6a6ae","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            self._api.delete(uuid_ref)"},{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            raise ValueError(\"Secret has consumers! Remove them first or \""},{"line_number":559,"context_line":"                             \"use the --force option.\")"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def list(self, limit\u003d10, offset\u003d0, name\u003dNone, algorithm\u003dNone, mode\u003dNone,"},{"line_number":562,"context_line":"             bits\u003d0, secret_type\u003dNone, created\u003dNone, updated\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7b920658_cf12f179","line":559,"in_reply_to":"1519c95b_5891339a","updated":"2023-02-07 12:51:45.000000000","message":"Done","commit_id":"67e43ebf7886733f25e19b3b6ea787b6d243f8ab"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"b704f94a3c8489d739186311a587506d18405ab1","unresolved":true,"context_lines":[{"line_number":555,"context_line":"        if not secret_object.consumers or force:"},{"line_number":556,"context_line":"            self._api.delete(uuid_ref)"},{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            raise ValueError(\"Secret has consumers! Remove them first or \""},{"line_number":559,"context_line":"                             \"use the --force option.\")"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def list(self, limit\u003d10, offset\u003d0, name\u003dNone, algorithm\u003dNone, mode\u003dNone,"}],"source_content_type":"text/x-python","patch_set":12,"id":"132221e5_167692fe","line":558,"updated":"2023-01-19 16:25:54.000000000","message":"This is also not raising the exception with the correct message:\n~~~\n[...]\nraise ValueError(\"Secret has consumers! Remove them first or \"\n\n    ValueError: Secret has consumers! Remove them first or use the --force option.\n~~~","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"a7af5e5f530f54717917430e4e43b9c5c9e6a6ae","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        if not secret_object.consumers or force:"},{"line_number":556,"context_line":"            self._api.delete(uuid_ref)"},{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            raise ValueError(\"Secret has consumers! Remove them first or \""},{"line_number":559,"context_line":"                             \"use the --force option.\")"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def list(self, limit\u003d10, offset\u003d0, name\u003dNone, algorithm\u003dNone, mode\u003dNone,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bef1bf34_06534772","line":558,"in_reply_to":"132221e5_167692fe","updated":"2023-02-07 12:51:45.000000000","message":"Done","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"3744e508a8d4fb70f1d6a990be0a621ac79d7b7b","unresolved":true,"context_lines":[{"line_number":626,"context_line":"        ]"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _enforce_microversion(self, microversion\u003d\"1.0\"):"},{"line_number":629,"context_line":"        if self._api.microversion \u003d\u003d \"1.0\":"},{"line_number":630,"context_line":"            raise NotImplementedError("},{"line_number":631,"context_line":"                \"Server does not support secret consumers.  Minimum \""},{"line_number":632,"context_line":"                \"key-manager microversion required: 1.1\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"109e3b3b_38eb6a55","line":629,"updated":"2023-01-20 15:31:46.000000000","message":"The way the microversion is stored on the client is as string.\nMaybe it\u0027s better to save as tuple, I don`t have a strong opinion on this.","commit_id":"b42a80c8e3f8ae31b7868e21064302186a799533"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"dd4d24e0e8294f0f0d0ded799da27e00b88b93ef","unresolved":true,"context_lines":[{"line_number":56,"context_line":"               \"Secret type\","},{"line_number":57,"context_line":"               \"Mode\","},{"line_number":58,"context_line":"               \"Expiration\","},{"line_number":59,"context_line":"               \"Consumers\","},{"line_number":60,"context_line":"               )"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_formatted_data(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3d84c5d7_53bf4641","line":59,"range":{"start_line":59,"start_character":15,"end_line":59,"end_character":27},"updated":"2023-02-06 12:55:07.000000000","message":"I\u0027m confused -- I thought we were NOT adding this column here because it messes up the formatting -- which is why we added the list consumers CLI command.","commit_id":"7cb1e0727e2c6a250500d8c5328dd379028da613"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"dd4d24e0e8294f0f0d0ded799da27e00b88b93ef","unresolved":true,"context_lines":[{"line_number":72,"context_line":"                self.secret_type,"},{"line_number":73,"context_line":"                self.mode,"},{"line_number":74,"context_line":"                expiration,"},{"line_number":75,"context_line":"                self.consumers,"},{"line_number":76,"context_line":"                )"},{"line_number":77,"context_line":"        return data"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"2740ccba_a2a5a786","line":75,"range":{"start_line":75,"start_character":16,"end_line":75,"end_character":31},"updated":"2023-02-06 12:55:07.000000000","message":"ditto - see above","commit_id":"7cb1e0727e2c6a250500d8c5328dd379028da613"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"a7af5e5f530f54717917430e4e43b9c5c9e6a6ae","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                self.secret_type,"},{"line_number":73,"context_line":"                self.mode,"},{"line_number":74,"context_line":"                expiration,"},{"line_number":75,"context_line":"                self.consumers,"},{"line_number":76,"context_line":"                )"},{"line_number":77,"context_line":"        return data"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"931309b1_c4bb3183","line":75,"range":{"start_line":75,"start_character":16,"end_line":75,"end_character":31},"in_reply_to":"2740ccba_a2a5a786","updated":"2023-02-07 12:51:45.000000000","message":"Done","commit_id":"7cb1e0727e2c6a250500d8c5328dd379028da613"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"dd4d24e0e8294f0f0d0ded799da27e00b88b93ef","unresolved":true,"context_lines":[{"line_number":628,"context_line":"            for s in response.get(\u0027secrets\u0027, [])"},{"line_number":629,"context_line":"        ]"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    def _enforce_microversion(self, microversion\u003d\"1.0\"):"},{"line_number":632,"context_line":"        if self._api.microversion \u003d\u003d \"1.0\":"},{"line_number":633,"context_line":"            raise NotImplementedError("},{"line_number":634,"context_line":"                \"Server does not support secret consumers.  Minimum \""}],"source_content_type":"text/x-python","patch_set":28,"id":"3ac156f0_104eb1d3","line":631,"range":{"start_line":631,"start_character":36,"end_line":631,"end_character":55},"updated":"2023-02-06 12:55:07.000000000","message":"This parameter is no longer used for anything and should be removed.","commit_id":"7cb1e0727e2c6a250500d8c5328dd379028da613"}],"functionaltests/cli/v1/behaviors/consumer_behaviors.py":[{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"1685df7ca685854db6422a65eaf6e010339958c6","unresolved":true,"context_lines":[{"line_number":32,"context_line":"        argv.extend([\u0027--resource-type\u0027, resource_type])"},{"line_number":33,"context_line":"        argv.extend([\u0027--resource-id\u0027, resource_id])"},{"line_number":34,"context_line":"        argv.extend([secret_href])"},{"line_number":35,"context_line":"        print(argv)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        stdout, stderr \u003d self.issue_barbican_command(argv)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"e2335957_467635c9","line":35,"updated":"2023-02-07 12:43:14.000000000","message":"TODO: Delete","commit_id":"6b89afecf92811076ed05b426dee2e14f444e5e9"}],"functionaltests/client/v1/functional/test_secrets.py":[{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"27d2bdce2c43693df14013011f5c63d969fe702e","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        )"},{"line_number":318,"context_line":"        self.assertEqual(secret_ref, secret.secret_ref)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        self.cleanup.delete_entity(secret.secret_ref)"},{"line_number":321,"context_line":"        self.barbicanclient.secrets.delete(secret.secret_ref, True)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    @testcase.attr(\u0027negative\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bedf6688_105e472f","line":320,"updated":"2022-12-02 16:03:09.000000000","message":"I don\u0027t understand much of the functional tests, but it seems that we are deleting the secret here, and then deleting it again using the barbicanclient?","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"54216aa18ca2e490e9f3c1cabfb4b81717bec03d","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        )"},{"line_number":318,"context_line":"        self.assertEqual(secret_ref, secret.secret_ref)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        self.cleanup.delete_entity(secret.secret_ref)"},{"line_number":321,"context_line":"        self.barbicanclient.secrets.delete(secret.secret_ref, True)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    @testcase.attr(\u0027negative\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"d99763c0_e5774152","line":320,"in_reply_to":"bedf6688_105e472f","updated":"2022-12-05 11:40:13.000000000","message":"This line just deletes the secret object inside a list of objects that is created as part of the whole testset.","commit_id":"511a9abf745f9427fc6025af1cf7dc254c449227"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"74b3e15632087feef050376029f0b1d551fe40fb","unresolved":true,"context_lines":[{"line_number":316,"context_line":"                      \"--force option.\", str(e))"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":319,"context_line":"    def test_secret_delete_with_consumers_with_force(self):"},{"line_number":320,"context_line":"        \"\"\"Deleting a secret with consumers."},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        Tries to delete a secret with consumers,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0297fd_629dd0c5","line":319,"range":{"start_line":319,"start_character":8,"end_line":319,"end_character":52},"updated":"2023-01-18 17:05:40.000000000","message":"Looking through the tests, I\u0027m shocked to find -- unless I missed it, that there is no positive test of deleting a secret without consumers.\n\nPlease add this test.","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"c01470c3a4536fc98f897e7bbc090dfa08c9a9e4","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                      \"--force option.\", str(e))"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":319,"context_line":"    def test_secret_delete_with_consumers_with_force(self):"},{"line_number":320,"context_line":"        \"\"\"Deleting a secret with consumers."},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        Tries to delete a secret with consumers,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ce731483_34d525ac","line":319,"range":{"start_line":319,"start_character":8,"end_line":319,"end_character":52},"in_reply_to":"ff0297fd_629dd0c5","updated":"2023-02-03 15:01:02.000000000","message":"Done","commit_id":"a9f284b05e71b85cb9cea71aee8f58fba7c1f198"},{"author":{"_account_id":34120,"name":"Andre Aranha","display_name":"afariasa","email":"afariasa@redhat.com","username":"afariasa"},"change_message_id":"37486f54f2a620f21c80811536b9a5cc7309c9d5","unresolved":true,"context_lines":[{"line_number":296,"context_line":"        secret_ref \u003d self.cleanup.add_entity(new_secret)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        self.barbicanclient.secrets.delete(secret_ref, force\u003dFalse)"},{"line_number":299,"context_line":"        self.assertRaises("},{"line_number":300,"context_line":"            exceptions.HTTPClientError, self.barbicanclient.secrets.get,"},{"line_number":301,"context_line":"            secret_ref)"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"b1106173_217e72ac","line":299,"updated":"2023-02-03 16:17:57.000000000","message":"When getting a non-existent secret we are receiving an exception:\nbarbicanclient.exceptions.HTTPClientError: Not Found: Secret not found.\nWe should change it to just return None.","commit_id":"7cb1e0727e2c6a250500d8c5328dd379028da613"}],"setup.cfg":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"6c34cef3d0d9a9a5a3dc70aa947ac977d7a1c624","unresolved":true,"context_lines":[{"line_number":49,"context_line":"    secret_container_list \u003d barbicanclient.barbican_cli.v1.containers:ListContainer"},{"line_number":50,"context_line":"    secret_container_create \u003d barbicanclient.barbican_cli.v1.containers:CreateContainer"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    secret_consumer_register \u003d barbicanclient.barbican_cli.v1.secrets:RegisterConsumer"},{"line_number":53,"context_line":"    secret_consumer_remove \u003d barbicanclient.barbican_cli.v1.secrets:RemoveConsumer"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    ca_get \u003d barbicanclient.barbican_cli.v1.cas:GetCA"},{"line_number":56,"context_line":"    ca_list \u003d barbicanclient.barbican_cli.v1.cas:ListCA"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"926aab2d_6f11bf36","line":53,"range":{"start_line":52,"start_character":4,"end_line":53,"end_character":82},"updated":"2022-11-25 10:12:55.000000000","message":"lets be consistent with the rest of the cli.\nsecret_consumer_create\nsecret_consumer_delete","commit_id":"42e7588c4861f0971e7f3a72fb05b158c8e4c2df"},{"author":{"_account_id":35125,"name":"Mauricio Harley","email":"mharley@redhat.com","username":"mharley-rh"},"change_message_id":"f962d5c30837f04d5ddcddfe41c864168f50f381","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    secret_container_list \u003d barbicanclient.barbican_cli.v1.containers:ListContainer"},{"line_number":50,"context_line":"    secret_container_create \u003d barbicanclient.barbican_cli.v1.containers:CreateContainer"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    secret_consumer_register \u003d barbicanclient.barbican_cli.v1.secrets:RegisterConsumer"},{"line_number":53,"context_line":"    secret_consumer_remove \u003d barbicanclient.barbican_cli.v1.secrets:RemoveConsumer"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    ca_get \u003d barbicanclient.barbican_cli.v1.cas:GetCA"},{"line_number":56,"context_line":"    ca_list \u003d barbicanclient.barbican_cli.v1.cas:ListCA"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"de1b747b_91a34143","line":53,"range":{"start_line":52,"start_character":4,"end_line":53,"end_character":82},"in_reply_to":"926aab2d_6f11bf36","updated":"2022-11-25 16:25:57.000000000","message":"So the original methods need to be renamed?","commit_id":"42e7588c4861f0971e7f3a72fb05b158c8e4c2df"}]}
