)]}'
{"quantum/db/l3_db.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a401d3d14f7c0f5341e94eb2d2e9dd23f116ed36","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # figure out if we need to delete existing port"},{"line_number":184,"context_line":"        if gw_port and gw_port[\u0027network_id\u0027] !\u003d network_id:"},{"line_number":185,"context_line":"            router_qry \u003d context.elevated().session.query(FloatingIP)"},{"line_number":186,"context_line":"            if router_qry.filter_by(router_id\u003drouter_id).all():"},{"line_number":187,"context_line":"                raise l3.RouterExternalGatewayInUseByFloatingIp("},{"line_number":188,"context_line":"                    net_id\u003dgw_port[\u0027network_id\u0027])"},{"line_number":189,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMH%2F%2FxkE%3D","line":186,"updated":"2012-11-26 10:06:07.000000000","message":"Instead of the above query, is there a chance you could use the following method: get_floatingips_count\n\nThe difference is minimal, but will give us two little benefits:\n1) we will keep queries which verify for presence of floating ips on a router in a single place, which good for maintanability\n2) we will execute a count() instead of an all(), which is good for efficiency","commit_id":"cfa4f93d6264ba59a100601d32627ce68ce16597"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b63362737d0513038acecc847d8f40edd5f8cf7e","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # figure out if we need to delete existing port"},{"line_number":184,"context_line":"        if gw_port and gw_port[\u0027network_id\u0027] !\u003d network_id:"},{"line_number":185,"context_line":"            router_qry \u003d context.elevated().session.query(FloatingIP)"},{"line_number":186,"context_line":"            if router_qry.filter_by(router_id\u003drouter_id).all():"},{"line_number":187,"context_line":"                raise l3.RouterExternalGatewayInUseByFloatingIp("},{"line_number":188,"context_line":"                    net_id\u003dgw_port[\u0027network_id\u0027])"},{"line_number":189,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMH%2F%2Fxf4%3D","line":186,"in_reply_to":"AAAAMH%2F%2FxkE%3D","updated":"2012-11-26 13:25:24.000000000","message":"Thanks, Salvatore. You are right, use \u0027get_floatingips_count\u0027 is better.","commit_id":"cfa4f93d6264ba59a100601d32627ce68ce16597"}],"quantum/extensions/l3.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class RouterExternalGatewayInUseByFloatingIp(qexception.InUse):"},{"line_number":70,"context_line":"    message \u003d _(\"Router\u0027s external network gateway %(net_id)s cannot be \""},{"line_number":71,"context_line":"                \"updated, since it used by Floating IP\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def _validate_uuid_or_none(data, valid_values\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMH%2F%2FvAg%3D","line":71,"updated":"2012-11-28 02:09:47.000000000","message":"perhaps say: \n\nGateway cannot be updated for router %(router_id), since a gateway to external network %(net_id) is required by one or more floating IPs.","commit_id":"c1d492653b2b9f2cb7876b12ccf66a07e7138b5c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b63362737d0513038acecc847d8f40edd5f8cf7e","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class RouterExternalGatewayInUseByFloatingIp(qexception.InUse):"},{"line_number":70,"context_line":"    message \u003d _(\"Router\u0027s external network gateway %(net_id)s cannot be \""},{"line_number":71,"context_line":"                \"updated, since it used by Floating IP\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def _validate_uuid_or_none(data, valid_values\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMH%2F%2Fu8I%3D","line":71,"in_reply_to":"AAAAMH%2F%2FvAg%3D","updated":"2012-11-28 03:10:13.000000000","message":"Done, Thanks","commit_id":"c1d492653b2b9f2cb7876b12ccf66a07e7138b5c"}]}
