)]}'
{"cinderclient/base.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a5750b394ad7ef32ef63e400e38d92bef0958d72","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # that a user like admin doesn\u0027t get a failure when trying to delete"},{"line_number":247,"context_line":"        # another tenant\u0027s volume by name."},{"line_number":248,"context_line":"        if clear_cache:"},{"line_number":249,"context_line":"            self.cached_list \u003d None"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if use_cache:"},{"line_number":252,"context_line":"            if self.cached_list is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_cf110c5f","line":249,"updated":"2015-03-11 09:14:14.000000000","message":"Thanks, I decided to add the method later and forgot to change this. :)","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e9707f03e5a1330783df37abb832f822962c7900","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # that a user like admin doesn\u0027t get a failure when trying to delete"},{"line_number":247,"context_line":"        # another tenant\u0027s volume by name."},{"line_number":248,"context_line":"        if clear_cache:"},{"line_number":249,"context_line":"            self.cached_list \u003d None"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if use_cache:"},{"line_number":252,"context_line":"            if self.cached_list is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_0dbd0303","line":249,"updated":"2015-03-10 20:23:06.000000000","message":"should be self.clear_cache()","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a5750b394ad7ef32ef63e400e38d92bef0958d72","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                list_items \u003d self.cached_list"},{"line_number":254,"context_line":"            else:"},{"line_number":255,"context_line":"                list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"},{"line_number":256,"context_line":"                self.cached_list \u003d list_items"},{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_ef16d054","line":256,"updated":"2015-03-11 09:14:14.000000000","message":"But you should not overwrite the cache if you are not using it and you should not hold memory in the object for the cache if method caller didn\u0027t ask to use it.","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e9707f03e5a1330783df37abb832f822962c7900","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                list_items \u003d self.cached_list"},{"line_number":254,"context_line":"            else:"},{"line_number":255,"context_line":"                list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"},{"line_number":256,"context_line":"                self.cached_list \u003d list_items"},{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_adceb7b2","line":256,"updated":"2015-03-10 20:23:06.000000000","message":"if we add items to cache even if use_cache\u003d\u003dFalse it will simplify the code","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"a0871a29699bb2e67cd6e65673a661d68712a143","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            self.clear_cache()"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if use_cache:"},{"line_number":252,"context_line":"            if self.cached_list is not None:"},{"line_number":253,"context_line":"                list_items \u003d self.cached_list"},{"line_number":254,"context_line":"            else:"},{"line_number":255,"context_line":"                list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa041b7_4ffc793e","line":252,"updated":"2015-04-01 15:28:31.000000000","message":"I may be wrong here, but if you get here without first having called self.clear_cache(), then self.cached_list will not exist and will throw an error.\nI see that in utils.py you call first with self.clear_cache(), so it should be OK. But if the code changes later and someone re-uses findall(), it will fail.\nMaybe I\u0027m just being paranoid.....","commit_id":"08d62f56a7b7b71d47b030948911a273c1cf92c8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fe5a0de7fe78a9b78376181b01fc5c1e2e139b2d","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            self.clear_cache()"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if use_cache:"},{"line_number":252,"context_line":"            if self.cached_list is not None:"},{"line_number":253,"context_line":"                list_items \u003d self.cached_list"},{"line_number":254,"context_line":"            else:"},{"line_number":255,"context_line":"                list_items \u003d self.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa041b7_47ee9ded","line":252,"in_reply_to":"baa041b7_4ffc793e","updated":"2015-04-01 16:27:51.000000000","message":"You are not being paranoid, nice catch! :-)","commit_id":"08d62f56a7b7b71d47b030948911a273c1cf92c8"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"c9e7f23b1aaa85660eb4c8a5023f43de743b5268","unresolved":false,"context_lines":[{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def __init__(self, api):"},{"line_number":206,"context_line":"        super(ManagerWithFind, self).__init__(api)"},{"line_number":207,"context_line":"        self.cached_list \u003d None"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @abc.abstractmethod"},{"line_number":210,"context_line":"    def list(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_4e7d286d","line":207,"updated":"2015-04-08 19:58:39.000000000","message":"Should be private (self._cached_list).","commit_id":"8851cd3ad965f0a36ac45cf721c10250f7ff25b4"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ab7435e2080ce7df87451ec4f5671168cc277877","unresolved":false,"context_lines":[{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def __init__(self, api):"},{"line_number":206,"context_line":"        super(ManagerWithFind, self).__init__(api)"},{"line_number":207,"context_line":"        self.cached_list \u003d None"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @abc.abstractmethod"},{"line_number":210,"context_line":"    def list(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_aea6f450","line":207,"in_reply_to":"9aa53dc9_4e7d286d","updated":"2015-04-08 20:19:35.000000000","message":"So true...  :-)","commit_id":"8851cd3ad965f0a36ac45cf721c10250f7ff25b4"}],"cinderclient/tests/test_base.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a5750b394ad7ef32ef63e400e38d92bef0958d72","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":66,"context_line":"                          cs.volumes.find,"},{"line_number":67,"context_line":"                          vegetable\u003d\u0027carrot\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @mock.patch.object(cs.volumes, \u0027list\u0027, side_effect\u003dcs.volumes.list)"},{"line_number":70,"context_line":"    def test_findall_using_cache(self, mock_list):"},{"line_number":71,"context_line":"        cs.volumes.findall(vegetable\u003dmock.sentinel.vegetable, use_cache\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_0f0b242c","line":68,"updated":"2015-03-11 09:14:14.000000000","message":"Done!","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e9707f03e5a1330783df37abb832f822962c7900","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":66,"context_line":"                          cs.volumes.find,"},{"line_number":67,"context_line":"                          vegetable\u003d\u0027carrot\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @mock.patch.object(cs.volumes, \u0027list\u0027, side_effect\u003dcs.volumes.list)"},{"line_number":70,"context_line":"    def test_findall_using_cache(self, mock_list):"},{"line_number":71,"context_line":"        cs.volumes.findall(vegetable\u003dmock.sentinel.vegetable, use_cache\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_cd704b76","line":68,"updated":"2015-03-10 20:23:06.000000000","message":"Please, add tests for clear_cache method","commit_id":"b498e7046236a432527d5f6dd845d5e931688b12"}]}
