)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"a3d1a733bb1e88ba62d585fd5186eafa14b6d055","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Since we have to use the pick decorators, this converts several things"},{"line_number":14,"context_line":"to use a decorated closure for that reason. No real functional change"},{"line_number":15,"context_line":"though."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I21a2e5e534f6da22942c65196904aaf82f47c317"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a71b18c_88c9b2ae","line":16,"updated":"2016-12-06 17:04:36.000000000","message":"shouldn\u0027t we add this \u0027Implements: bp cells-scheduling-interaction\u0027 ? (not only topic)","commit_id":"3664a0d25f110339741e23f14ec2e43ff210b917"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"a3d1a733bb1e88ba62d585fd5186eafa14b6d055","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("},{"line_number":82,"context_line":"            uuid\u003duuid).first()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_a87e6e67","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":12},"updated":"2016-12-06 17:04:36.000000000","message":"maybe \u0027do_reservation_get\u0027","commit_id":"3664a0d25f110339741e23f14ec2e43ff210b917"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8d5de66a9d40c110c4be1acc035f618dc86e7162","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_1025b55a","line":78,"updated":"2016-12-07 01:12:40.000000000","message":"I think another way to do this is to replace things with for example:\n\n with sqlalchemy_api.get_context_manager(context).reader.using(context):\n\nwhich might be better than all the nested functions?","commit_id":"510c23441af28ebbd4c75dad6beddd08c6bf92b5"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"77cdbd7c39aa9cf08f8085ac0fb460322dea6896","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_9ada9b16","line":78,"in_reply_to":"3a71b18c_0f0e56e5","updated":"2016-12-07 18:06:06.000000000","message":"Okay. I don\u0027t have a strong opinion about it.","commit_id":"510c23441af28ebbd4c75dad6beddd08c6bf92b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf90972c01470cacf809648b535f9eb3404c8bc0","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_0f0e56e5","line":78,"in_reply_to":"3a71b18c_1025b55a","updated":"2016-12-07 15:45:50.000000000","message":"Maybe, although it\u0027s long. Another benefit of this, I thought, is replicating how we actually use/define these so that if we add more stuff to pick_context_manager later, we\u0027ll get it here and avoid having to change it as well.","commit_id":"510c23441af28ebbd4c75dad6beddd08c6bf92b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dca293d29c710832e222320006170d79ecbd4bca","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_b57da8b3","line":78,"in_reply_to":"3a71b18c_9ada9b16","updated":"2016-12-07 18:34:56.000000000","message":"This is what it looks like:\n\nhttp://pastebin.com/raw/cf3DZZEM\n\nWhich, because of the length and stuff doesn\u0027t seem like a major win to me, unless what I have here is not as correct for some reason.","commit_id":"510c23441af28ebbd4c75dad6beddd08c6bf92b5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"acf8dda8a3bbcd2b17a8c1c6cda606989865fddc","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _reservation_get(context, uuid):"},{"line_number":78,"context_line":"    @sqlalchemy_api.pick_context_manager_reader"},{"line_number":79,"context_line":"    def doit(context):"},{"line_number":80,"context_line":"        return sqlalchemy_api.model_query("},{"line_number":81,"context_line":"            context, models.Reservation, read_deleted\u003d\"no\").filter_by("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_fef1b596","line":78,"updated":"2016-12-08 01:20:21.000000000","message":"Could we just decorate the _reservation_get() method with this instead of an internal function?","commit_id":"fa4cde9eabe4ee8036a5d7a135bb72a15a1309b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b7be660e69fcda2d3f99afcb9e4cf959f98bad8","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"        self.create_instance_with_args(host\u003d\u0027host2\u0027)"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        @sqlalchemy_api.pick_context_manager_reader"},{"line_number":1158,"context_line":"        def test(context):"},{"line_number":1159,"context_line":"            return sqlalchemy_api._instance_get_all_uuids_by_host("},{"line_number":1160,"context_line":"                context, \u0027host1\u0027)"},{"line_number":1161,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_fbdaa716","line":1158,"range":{"start_line":1158,"start_character":12,"end_line":1158,"end_character":16},"updated":"2016-12-08 00:28:09.000000000","message":"nit: this is less of a test than it is a contextualized DB query used in a test. We could name this something like \u0027query\u0027 or just \u0027_instance_get_all_uuids_by_host\u0027 but I don\u0027t have a strong opinion about this, just wanted to mention it. I think the nested \u0027test\u0027 method construct is mostly coming from how this is done with mock decorators, but that\u0027s not actually what we\u0027re doing here.","commit_id":"fa4cde9eabe4ee8036a5d7a135bb72a15a1309b4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"acf8dda8a3bbcd2b17a8c1c6cda606989865fddc","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"        self.create_instance_with_args(host\u003d\u0027host2\u0027)"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        @sqlalchemy_api.pick_context_manager_reader"},{"line_number":1158,"context_line":"        def test(context):"},{"line_number":1159,"context_line":"            return sqlalchemy_api._instance_get_all_uuids_by_host("},{"line_number":1160,"context_line":"                context, \u0027host1\u0027)"},{"line_number":1161,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_de3b1937","line":1158,"range":{"start_line":1158,"start_character":12,"end_line":1158,"end_character":16},"in_reply_to":"3a71b18c_fbdaa716","updated":"2016-12-08 01:20:21.000000000","message":"Yeah, we could probably move them out into module-level functions like _reservation_get() above. But meh :) This works too.","commit_id":"fa4cde9eabe4ee8036a5d7a135bb72a15a1309b4"}]}
