)]}'
{"designate/storage/api.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        :param values: Values to create the new Quota from."},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        self.storage.begin()"},{"line_number":39,"context_line":"        quota \u003d self.storage.create_quota(context, values)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        try:"},{"line_number":42,"context_line":"            yield quota"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bm0U%3D","line":39,"updated":"2014-01-23 23:01:42.000000000","message":"I think we can move this, and similar creates/updates, inside the try/catch .. Removing the need to rollback on Duplicate\u0027s in the driver itself.","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"c56f61ee064e336003e59fd2b892e669e3fe6584","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :param context: RPC Context."},{"line_number":102,"context_line":"        :param quota_id: Delete a Quota via ID"},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        yield self.storage.get_quota(context, quota_id)"},{"line_number":105,"context_line":"        self.storage.delete_quota(context, quota_id)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BnoA%3D","line":104,"updated":"2014-01-23 20:27:50.000000000","message":"I\u0027m not sure if I should wrap these deletes in begins and rollbacks? Isn\u0027t it possible on a zone delete for example for something to go wrong in the backend, in which case we\u0027d want to roll it back in storage?","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :param context: RPC Context."},{"line_number":102,"context_line":"        :param quota_id: Delete a Quota via ID"},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        yield self.storage.get_quota(context, quota_id)"},{"line_number":105,"context_line":"        self.storage.delete_quota(context, quota_id)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bm2Q%3D","line":104,"in_reply_to":"AAAAUH%2F%2BnoA%3D","updated":"2014-01-23 23:01:42.000000000","message":"Yea, I think we\u0027ll want to wrap these in a try/catch, deleting the quota could be the final step in a multiple-action TX, so rolling back if that fails makes sense.\n\nWhich means they\u0027ll also need the \"with excutils.save_and_reraise_exception():\" to handle some eventlet quriks","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"8f108cff6a282562cdf47e5d72cabe4903d0f6de","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        try:"},{"line_number":194,"context_line":"            yield tld"},{"line_number":195,"context_line":"        except Exception:"},{"line_number":196,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":197,"context_line":"                self.storage.delete_tld(context, tld[\u0027id\u0027])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def get_tld(self, context, tld_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BmwY%3D","line":196,"updated":"2014-01-23 23:11:48.000000000","message":"Could you do the same rollback changes for the tld operations too?","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"}],"designate/storage/impl_sqlalchemy/__init__.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        try:"},{"line_number":141,"context_line":"            quota.save(self.session)"},{"line_number":142,"context_line":"        except exceptions.Duplicate:"},{"line_number":143,"context_line":"            self.session.rollback()"},{"line_number":144,"context_line":"            raise exceptions.DuplicateQuota()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        return dict(quota)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bm04%3D","line":143,"updated":"2014-01-23 23:01:42.000000000","message":"Rather than rolling back in here, I think it would make more sense to handle this in storage/api.py","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"}],"designate/tests/test_storage/test_api.py":[{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"c56f61ee064e336003e59fd2b892e669e3fe6584","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self._assert_called_with(\u0027begin\u0027)"},{"line_number":76,"context_line":"        self._assert_called_with(\u0027rollback\u0027)"},{"line_number":77,"context_line":"        self._assert_called_with(\u0027create_quota\u0027, context, values)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_get_quota(self):"},{"line_number":80,"context_line":"        context \u003d mock.sentinel.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bnns%3D","line":77,"updated":"2014-01-23 20:27:50.000000000","message":"Not sure that these are sufficient. I\u0027d really like a test to see that it didn\u0027t actually make it into storage. But that isn\u0027t really how this works if I understand correctly.","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self._assert_called_with(\u0027begin\u0027)"},{"line_number":76,"context_line":"        self._assert_called_with(\u0027rollback\u0027)"},{"line_number":77,"context_line":"        self._assert_called_with(\u0027create_quota\u0027, context, values)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_get_quota(self):"},{"line_number":80,"context_line":"        context \u003d mock.sentinel.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bmy4%3D","line":77,"in_reply_to":"AAAAUH%2F%2Bnns%3D","updated":"2014-01-23 23:01:42.000000000","message":"Correct, these tests don\u0027t actually touch the SQLA code, and purely test that the storage API class behaves correctly under well-known circumstances.","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"c56f61ee064e336003e59fd2b892e669e3fe6584","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self._assert_called_with(\u0027rollback\u0027)"},{"line_number":133,"context_line":"        # self._assert_has_calls(\u0027update_quota\u0027, ["},{"line_number":134,"context_line":"        #     mock.call(context, 123, values),"},{"line_number":135,"context_line":"        #     mock.call(context, 123, {\u0027test\u0027: 1}),"},{"line_number":136,"context_line":"        # ])"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_delete_quota(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bnnk%3D","line":135,"updated":"2014-01-23 20:27:50.000000000","message":"Not sure if we need these still here. It wouldn\u0027t be bad to maybe check if the update was called, no?","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self._assert_called_with(\u0027rollback\u0027)"},{"line_number":133,"context_line":"        # self._assert_has_calls(\u0027update_quota\u0027, ["},{"line_number":134,"context_line":"        #     mock.call(context, 123, values),"},{"line_number":135,"context_line":"        #     mock.call(context, 123, {\u0027test\u0027: 1}),"},{"line_number":136,"context_line":"        # ])"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_delete_quota(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bmyk%3D","line":135,"in_reply_to":"AAAAUH%2F%2Bnnk%3D","updated":"2014-01-23 23:01:42.000000000","message":"Yea, this was testing that update was called twice..\n\nOnce for the real update, and once to \"rollback\" to the original values if something failed.\n\nWe should keep the first one, but drop the second in these cases. Possibly switch to _assert_called_with() as there\u0027s only a  single call now.","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":242,"context_line":"#         self._assert_has_calls(\u0027update_server\u0027, ["},{"line_number":243,"context_line":"#             mock.call(context, 123, values),"},{"line_number":244,"context_line":"#             mock.call(context, 123, {\u0027test\u0027: 1}),"},{"line_number":245,"context_line":"#         ])"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def test_delete_server(self):"},{"line_number":248,"context_line":"        context \u003d mock.sentinel.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bmx8%3D","line":245,"updated":"2014-01-23 23:01:42.000000000","message":"Same as above for these, first is good, second can go.. \n\n(I won\u0027t keep repeating myself on the rest of these in this file ;))","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b156917b53f7847f2309a85cce9ecf088d2c29f9","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        self._assert_called_with(\u0027begin\u0027)"},{"line_number":652,"context_line":"        self._assert_called_with(\u0027rollback\u0027)"},{"line_number":653,"context_line":"        self._assert_called_with(\u0027create_record\u0027, context, 123, 321, values)"},{"line_number":654,"context_line":"        # self._assert_called_with(\u0027delete_record\u0027, context, 12345)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def test_get_record(self):"},{"line_number":657,"context_line":"        context \u003d mock.sentinel.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bmw0%3D","line":654,"updated":"2014-01-23 23:01:42.000000000","message":"These rollback assertions can be be deleted :)","commit_id":"20b1a9fbc27abdf2c969fa9be39003cbeb1f8adf"}]}
