)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f356884c2a72823e8175bbb9679f4bcefa4aed43","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"def fixed_ip_disassociate(context, address):"},{"line_number":1068,"context_line":"    session \u003d get_session()"},{"line_number":1069,"context_line":"    with session.begin():"},{"line_number":1070,"context_line":"        fixed_ip_ref \u003d _fixed_ip_get_by_address(context,"},{"line_number":1071,"context_line":"                                                address,"},{"line_number":1072,"context_line":"                                                session\u003dsession)"},{"line_number":1073,"context_line":"        fixed_ip_ref[\u0027instance_uuid\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F%2Bm4%3D","line":1070,"updated":"2013-05-17 10:50:34.000000000","message":"Same thing as in last comment","commit_id":"bd9b1d129afbfa9c8029d7b685e9a4a693939a63"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f356884c2a72823e8175bbb9679f4bcefa4aed43","unresolved":false,"context_lines":[{"line_number":1143,"context_line":""},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"@require_context"},{"line_number":1146,"context_line":"def _fixed_ip_get_by_address(context, address, session\u003dNone):"},{"line_number":1147,"context_line":"    result \u003d model_query(context, models.FixedIp, session\u003dsession).\\"},{"line_number":1148,"context_line":"                     filter_by(address\u003daddress).\\"},{"line_number":1149,"context_line":"                     first()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F%2BnE%3D","line":1146,"updated":"2013-05-17 10:50:34.000000000","message":"it will be better to move this method on a top (before we are calling it).\n\nAlso we don\u0027t know is there already running transaction in session. So it wil be nice to do \n\n  with session.begin(subtransaction\u003dTrue)","commit_id":"bd9b1d129afbfa9c8029d7b685e9a4a693939a63"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f356884c2a72823e8175bbb9679f4bcefa4aed43","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"    \"\"\""},{"line_number":1168,"context_line":"    :returns: a tuple of (models.FixedIp, models.Network, models.Instance)"},{"line_number":1169,"context_line":"    \"\"\""},{"line_number":1170,"context_line":"    session \u003d get_session()"},{"line_number":1171,"context_line":""},{"line_number":1172,"context_line":"    result \u003d model_query(context, models.FixedIp, models.Network,"},{"line_number":1173,"context_line":"                         models.Instance, session\u003dsession).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F%2Bn4%3D","line":1170,"updated":"2013-05-17 10:50:34.000000000","message":"remove session from here and model_query()","commit_id":"bd9b1d129afbfa9c8029d7b685e9a4a693939a63"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f356884c2a72823e8175bbb9679f4bcefa4aed43","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"def fixed_ip_update(context, address, values):"},{"line_number":1253,"context_line":"    session \u003d get_session()"},{"line_number":1254,"context_line":"    with session.begin():"},{"line_number":1255,"context_line":"        fixed_ip_ref \u003d _fixed_ip_get_by_address(context,"},{"line_number":1256,"context_line":"                                                address,"},{"line_number":1257,"context_line":"                                                session\u003dsession)"},{"line_number":1258,"context_line":"        fixed_ip_ref.update(values)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F%2Bm8%3D","line":1255,"updated":"2013-05-17 10:50:34.000000000","message":"Ok here we are making:\n  1 query to get fixed_ip_by_address\n  1 query to check is policy ok\n  1 query to update. \n\nIs it possible to make for example 1 query to check policy, and 1 update query, because we don\u0027t use result of this operation.","commit_id":"bd9b1d129afbfa9c8029d7b685e9a4a693939a63"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6f3aa8e8dd774747620e36bd672ef7faf22f529","unresolved":false,"context_lines":[{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"@require_context"},{"line_number":1101,"context_line":"def _fixed_ip_get_by_address(context, address, session\u003dNone):"},{"line_number":1102,"context_line":""},{"line_number":1103,"context_line":"    if session is None:"},{"line_number":1104,"context_line":"        session \u003d get_session()"},{"line_number":1105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F%2BYc%3D","line":1102,"updated":"2013-05-17 13:24:16.000000000","message":"nit: empty line is unnecessary here","commit_id":"aa35eb5ccf143bc6bdd34c1b452cdaa34a698ef5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6f3aa8e8dd774747620e36bd672ef7faf22f529","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"@require_context"},{"line_number":1213,"context_line":"def fixed_ip_disassociate(context, address):"},{"line_number":1214,"context_line":"    session \u003d get_session()"},{"line_number":1215,"context_line":"    with session.begin():"},{"line_number":1216,"context_line":"        _fixed_ip_get_by_address(context, address, session\u003dsession).\\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F%2BZc%3D","line":1213,"updated":"2013-05-17 13:24:16.000000000","message":"nit: please do not move code around when possible, because this makes reading of diffs harder","commit_id":"aa35eb5ccf143bc6bdd34c1b452cdaa34a698ef5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"94f50c39a4236ffc6fe62492c51ea8fe72158e8a","unresolved":false,"context_lines":[{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"@require_context"},{"line_number":1213,"context_line":"def fixed_ip_disassociate(context, address):"},{"line_number":1214,"context_line":"    session \u003d get_session()"},{"line_number":1215,"context_line":"    with session.begin():"},{"line_number":1216,"context_line":"        _fixed_ip_get_by_address(context, address, session\u003dsession).\\"},{"line_number":1217,"context_line":"                                 update({\u0027instance_uuid\u0027: None})"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F%2BVA%3D","line":1214,"updated":"2013-05-17 13:37:25.000000000","message":"do not use here session \u003d)","commit_id":"aa35eb5ccf143bc6bdd34c1b452cdaa34a698ef5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6f3aa8e8dd774747620e36bd672ef7faf22f529","unresolved":false,"context_lines":[{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"@require_admin_context"},{"line_number":1221,"context_line":"def fixed_ip_disassociate_all_by_timeout(context, host, time):"},{"line_number":1222,"context_line":"    session \u003d get_session()"},{"line_number":1223,"context_line":"    # NOTE(vish): only update fixed ips that \"belong\" to this"},{"line_number":1224,"context_line":"    #             host; i.e. the network host or the instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F%2BZQ%3D","line":1221,"updated":"2013-05-17 13:24:16.000000000","message":"nit: ditto","commit_id":"aa35eb5ccf143bc6bdd34c1b452cdaa34a698ef5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"94f50c39a4236ffc6fe62492c51ea8fe72158e8a","unresolved":false,"context_lines":[{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"@require_context"},{"line_number":1255,"context_line":"def fixed_ip_update(context, address, values):"},{"line_number":1256,"context_line":"    session \u003d get_session()"},{"line_number":1257,"context_line":"    with session.begin():"},{"line_number":1258,"context_line":"        _fixed_ip_get_by_address(context, address, session\u003dsession).\\"},{"line_number":1259,"context_line":"                                 update(values)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F%2BU8%3D","line":1256,"updated":"2013-05-17 13:37:25.000000000","message":"do not use session here","commit_id":"aa35eb5ccf143bc6bdd34c1b452cdaa34a698ef5"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"7badb0609e29573830dd55e7a5cfecc24240f22a","unresolved":false,"context_lines":[{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"@require_context"},{"line_number":1101,"context_line":"def _fixed_ip_get_by_address(context, address, session\u003dNone):"},{"line_number":1102,"context_line":"    if session is None:"},{"line_number":1103,"context_line":"        session \u003d get_session()"},{"line_number":1104,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F3uY%3D","line":1101,"updated":"2013-05-21 09:57:59.000000000","message":"Is session is really needed here?","commit_id":"4a6afaee343c424138b61ed03d32b2f984149f64"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"b6aac260f2fe3e6932152af00a63917aba04804b","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"                                 update({\u0027instance_uuid\u0027: None})"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"@require_admin_context"},{"line_number":1220,"context_line":"def fixed_ip_disassociate_all_by_timeout(context, host, time):"},{"line_number":1221,"context_line":"    session \u003d get_session()"},{"line_number":1222,"context_line":"    # NOTE(vish): only update fixed ips that \"belong\" to this"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F0o0%3D","line":1219,"updated":"2013-05-22 09:21:22.000000000","message":"Why move this down?","commit_id":"4a6afaee343c424138b61ed03d32b2f984149f64"}]}
