)]}'
{"neutron/plugins/midonet/plugin.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4f461a405e6a756fba1d2b43652697daea98ad0b","unresolved":false,"context_lines":[{"line_number":748,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":749,"context_line":"                r \u003d self._get_router(context, mido_router_id)"},{"line_number":750,"context_line":"                r[\u0027status\u0027] \u003d constants.NET_STATUS_ERROR"},{"line_number":751,"context_line":"                context.session.add(r)"},{"line_number":752,"context_line":"            return r"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8t3s%3D","line":751,"updated":"2013-12-21 12:15:20.000000000","message":"r[\u0027status\u0027] \u003d constants.NET_STATUS_ERROR\nor \n r.update({\u0027status\u0027: constants.NET_STATUS_ERROR})\nis what will update the status.\ncontext.session.add(r) will raise DBDuplicateEntry exception because you are adding already existing object to the session.\n\nAlso it seems unit tests don\u0027t cover this path.","commit_id":"674f6e52876348d6244518a86f2803acc4769430"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4f461a405e6a756fba1d2b43652697daea98ad0b","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"        provider_router \u003d self._get_provider_router()"},{"line_number":1028,"context_line":"        for route in provider_router.get_routes():"},{"line_number":1029,"context_line":"            if (route.get_dst_network_addr() \u003d\u003d ip and"},{"line_number":1030,"context_line":"                    route.get_dst_network_length() \u003d\u003d 32):"},{"line_number":1031,"context_line":"                self.client.delete_route(route.get_id())"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8t3o%3D","line":1030,"updated":"2013-12-21 12:15:20.000000000","message":"nit: looks like overindented line","commit_id":"674f6e52876348d6244518a86f2803acc4769430"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4f461a405e6a756fba1d2b43652697daea98ad0b","unresolved":false,"context_lines":[{"line_number":1129,"context_line":""},{"line_number":1130,"context_line":"            # getting rid of the port association"},{"line_number":1131,"context_line":"            if old_fip_port and not new_fip_port:"},{"line_number":1132,"context_line":"                self._disassoc_fip(old_fip)"},{"line_number":1133,"context_line":"            # adding a port association"},{"line_number":1134,"context_line":"            elif not old_fip_port and new_fip_port:"},{"line_number":1135,"context_line":"                self._assoc_fip(new_fip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8t3g%3D","line":1132,"updated":"2013-12-21 12:15:20.000000000","message":"Just curious: those operations (disassociate and associate fip) include calling external device(?) with the client. Usually it is considered to move such operations out of db transactions because of possible deadlocks and db connection pool exhaustion. \nSo you think it is possible in this case?","commit_id":"674f6e52876348d6244518a86f2803acc4769430"}]}
