)]}'
{"quantum/db/db_base_plugin_v2.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1377,"context_line":"                    p[\u0027fixed_ips\u0027])"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"                # Update ips if necessary"},{"line_number":1380,"context_line":"                for ip in new_ips:"},{"line_number":1381,"context_line":"                    allocated \u003d models_v2.IPAllocation("},{"line_number":1382,"context_line":"                        network_id\u003dport[\u0027network_id\u0027], port_id\u003dport.id,"},{"line_number":1383,"context_line":"                        ip_address\u003dip[\u0027ip_address\u0027], subnet_id\u003dip[\u0027subnet_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fph8%3D","line":1380,"updated":"2013-05-28 16:18:19.000000000","message":"You should however ensure all the IPs on a port have the same expiration. In this way prev_ips allocation expiration won\u0027t be updated.\n\nyou\u0027re slightly changing the behaviour of the code, but I don\u0027t mind.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"                    p[\u0027fixed_ips\u0027])"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"                # Update ips if necessary"},{"line_number":1380,"context_line":"                for ip in new_ips:"},{"line_number":1381,"context_line":"                    allocated \u003d models_v2.IPAllocation("},{"line_number":1382,"context_line":"                        network_id\u003dport[\u0027network_id\u0027], port_id\u003dport.id,"},{"line_number":1383,"context_line":"                        ip_address\u003dip[\u0027ip_address\u0027], subnet_id\u003dip[\u0027subnet_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo9w%3D","line":1380,"in_reply_to":"AAAAPH%2F%2Fph8%3D","updated":"2013-05-28 19:18:25.000000000","message":"Why should this be ensured? How did this change, change the behavior of the code?","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"decda8be974176e698bd0ed075ed98b6be75a11e","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"                    context.session.add(allocated)"},{"line_number":1386,"context_line":"        # Remove all attributes in p which are not in the port DB model"},{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FrA0%3D","line":1388,"updated":"2013-05-28 00:40:11.000000000","message":"Why isn\u0027t line 1388 in the context.session.begin block?  (It is not the code you touched.)","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"                    context.session.add(allocated)"},{"line_number":1386,"context_line":"        # Remove all attributes in p which are not in the port DB model"},{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FrAM%3D","line":1388,"in_reply_to":"AAAAPH%2F%2FrA0%3D","updated":"2013-05-28 19:18:25.000000000","message":"This is a db operation and should be indented over.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1385,"context_line":"                    context.session.add(allocated)"},{"line_number":1386,"context_line":"        # Remove all attributes in p which are not in the port DB model"},{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FpiU%3D","line":1388,"in_reply_to":"AAAAPH%2F%2FrA0%3D","updated":"2013-05-28 16:18:19.000000000","message":"it\u0027s not a db operation.\nIt\u0027s a dict update.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"                    context.session.add(allocated)"},{"line_number":1386,"context_line":"        # Remove all attributes in p which are not in the port DB model"},{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo0s%3D","line":1388,"in_reply_to":"AAAAPH%2F%2FrAM%3D","updated":"2013-05-28 19:59:08.000000000","message":"fixed via: https://review.openstack.org/30788 as this is something we will want to back port.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"decda8be974176e698bd0ed075ed98b6be75a11e","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"},{"line_number":1392,"context_line":"            result[\u0027fixed_ips\u0027] \u003d prev_ips + new_ips"},{"line_number":1393,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FrAo%3D","line":1390,"updated":"2013-05-28 00:40:11.000000000","message":"isn\u0027t _make_port_dict(port) querying all its fixed_ips from DB?","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"        # and then update the port"},{"line_number":1388,"context_line":"        port.update(self._filter_non_model_columns(p, models_v2.Port))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"},{"line_number":1392,"context_line":"            result[\u0027fixed_ips\u0027] \u003d prev_ips + new_ips"},{"line_number":1393,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo9M%3D","line":1390,"in_reply_to":"AAAAPH%2F%2FrAo%3D","updated":"2013-05-28 19:18:25.000000000","message":"When removing lazy\u003d\u0027dynamic\u0027  we get a cached copy of the result before we did the update (line 1368). Now this methods doesn\u0027t query the db which we don\u0027t really want it to do. This is only kind of weird for the update_port case. \n\nThis function should keep track of the values it updated rather than querying the db at the end which it does now.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"},{"line_number":1392,"context_line":"            result[\u0027fixed_ips\u0027] \u003d prev_ips + new_ips"},{"line_number":1393,"context_line":"        return result"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    def delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fphg%3D","line":1392,"updated":"2013-05-28 16:18:19.000000000","message":"Did you end up in a condition in which make_port_dict was querying only the new ips but not the existing ones?\nIf yes, I think you should get to the bottom of that problem instead of tweaking the result here.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"},{"line_number":1392,"context_line":"            result[\u0027fixed_ips\u0027] \u003d prev_ips + new_ips"},{"line_number":1393,"context_line":"        return result"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    def delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FhmU%3D","line":1392,"in_reply_to":"AAAAPH%2F%2Fo9I%3D","updated":"2013-05-31 09:18:46.000000000","message":"Why you do this is clear.\nSince make_port_dict might now return stale information, can you be sure that it won\u0027t affect negatively all the other places in the source tree where it\u0027s invoked?","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"        result \u003d self._make_port_dict(port)"},{"line_number":1391,"context_line":"        if changed_ips:"},{"line_number":1392,"context_line":"            result[\u0027fixed_ips\u0027] \u003d prev_ips + new_ips"},{"line_number":1393,"context_line":"        return result"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    def delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo9I%3D","line":1392,"in_reply_to":"AAAAPH%2F%2Fphg%3D","updated":"2013-05-28 19:18:25.000000000","message":"Do you see a better way to handle this? I think my comment on line 1390 explains why i did this.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"decda8be974176e698bd0ed075ed98b6be75a11e","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"                                      sorts\u003dsorts, limit\u003dlimit,"},{"line_number":1468,"context_line":"                                      marker_obj\u003dmarker_obj,"},{"line_number":1469,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1470,"context_line":"        query \u003d query.options(orm.subqueryload(models_v2.Port.fixed_ips))"},{"line_number":1471,"context_line":"        items \u003d [self._make_port_dict(c, fields) for c in query]"},{"line_number":1472,"context_line":"        if limit and page_reverse:"},{"line_number":1473,"context_line":"            items.reverse()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FrBI%3D","line":1470,"updated":"2013-05-28 00:40:11.000000000","message":"how about moving it to line 1459?","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1467,"context_line":"                                      sorts\u003dsorts, limit\u003dlimit,"},{"line_number":1468,"context_line":"                                      marker_obj\u003dmarker_obj,"},{"line_number":1469,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1470,"context_line":"        query \u003d query.options(orm.subqueryload(models_v2.Port.fixed_ips))"},{"line_number":1471,"context_line":"        items \u003d [self._make_port_dict(c, fields) for c in query]"},{"line_number":1472,"context_line":"        if limit and page_reverse:"},{"line_number":1473,"context_line":"            items.reverse()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fhmk%3D","line":1470,"in_reply_to":"AAAAPH%2F%2Fo8g%3D","updated":"2013-05-31 09:18:46.000000000","message":"Do we have the ability for not querying for fixed_ips if the user does not intend to use them? (ie: excluded in fields).\n\nThat would be great!","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"                                      sorts\u003dsorts, limit\u003dlimit,"},{"line_number":1468,"context_line":"                                      marker_obj\u003dmarker_obj,"},{"line_number":1469,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1470,"context_line":"        query \u003d query.options(orm.subqueryload(models_v2.Port.fixed_ips))"},{"line_number":1471,"context_line":"        items \u003d [self._make_port_dict(c, fields) for c in query]"},{"line_number":1472,"context_line":"        if limit and page_reverse:"},{"line_number":1473,"context_line":"            items.reverse()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo8g%3D","line":1470,"in_reply_to":"AAAAPH%2F%2Fpig%3D","updated":"2013-05-28 19:18:25.000000000","message":"I think we should move this  to 1459 and change it to: \n\n query.options(orm.joinedload(models_v2.Port.fixed_ips)) \n\nI don\u0027t think we want to change  the model to include lazy\u003d\u0027joined\u0027 as that will cause us to get these values even if we don\u0027t intend to use them.","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1467,"context_line":"                                      sorts\u003dsorts, limit\u003dlimit,"},{"line_number":1468,"context_line":"                                      marker_obj\u003dmarker_obj,"},{"line_number":1469,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1470,"context_line":"        query \u003d query.options(orm.subqueryload(models_v2.Port.fixed_ips))"},{"line_number":1471,"context_line":"        items \u003d [self._make_port_dict(c, fields) for c in query]"},{"line_number":1472,"context_line":"        if limit and page_reverse:"},{"line_number":1473,"context_line":"            items.reverse()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fpig%3D","line":1470,"in_reply_to":"AAAAPH%2F%2FrBI%3D","updated":"2013-05-28 16:18:19.000000000","message":"joined load will remove the need for this, I think","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1245,"context_line":"                for route_str in new_route_set - old_route_set:"},{"line_number":1246,"context_line":"                    new_routes.append("},{"line_number":1247,"context_line":"                        {\u0027destination\u0027: route_str.partition(\"_\")[0],"},{"line_number":1248,"context_line":"                         \u0027nexthop\u0027: route_str.partition(\"_\")[2]})"},{"line_number":1249,"context_line":"                    route \u003d models_v2.SubnetRoute("},{"line_number":1250,"context_line":"                        destination\u003droute_str.partition(\"_\")[0],"},{"line_number":1251,"context_line":"                        nexthop\u003droute_str.partition(\"_\")[2],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F9i4%3D","line":1248,"updated":"2013-06-05 03:42:09.000000000","message":"how about merging some route_str.partition(\"_\")[0] into one:\ndest \u003d route_str.partition(\"_\")[0]\nnexthop \u003d route_str.partition(\"_\")[2]\nthen line 1246, 1250 can use them?","commit_id":"fe74724a33735ccaf98c3873ff40ca070d0d9261"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1245,"context_line":"                for route_str in new_route_set - old_route_set:"},{"line_number":1246,"context_line":"                    new_routes.append("},{"line_number":1247,"context_line":"                        {\u0027destination\u0027: route_str.partition(\"_\")[0],"},{"line_number":1248,"context_line":"                         \u0027nexthop\u0027: route_str.partition(\"_\")[2]})"},{"line_number":1249,"context_line":"                    route \u003d models_v2.SubnetRoute("},{"line_number":1250,"context_line":"                        destination\u003droute_str.partition(\"_\")[0],"},{"line_number":1251,"context_line":"                        nexthop\u003droute_str.partition(\"_\")[2],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPX%2F%2F9iI%3D","line":1248,"in_reply_to":"AAAAPX%2F%2F9i4%3D","updated":"2013-06-05 03:44:02.000000000","message":"Done","commit_id":"fe74724a33735ccaf98c3873ff40ca070d0d9261"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":1246,"context_line":"                    destination \u003d route_str.partition(\"_\")[0]"},{"line_number":1247,"context_line":"                    nexthop \u003d route_str.partition(\"_\")[2]"},{"line_number":1248,"context_line":"                    new_routes.append({\u0027destination\u0027: destination,"},{"line_number":1249,"context_line":"                                       \u0027nexthop\u0027: nexthop})"},{"line_number":1250,"context_line":"                    route \u003d models_v2.SubnetRoute("},{"line_number":1251,"context_line":"                        destination\u003ddestination,"},{"line_number":1252,"context_line":"                        nexthop\u003dnexthop,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPX%2F%2F9R8%3D","line":1249,"updated":"2013-06-05 06:38:47.000000000","message":"new_routes needs to contain unchanged routes, but now it contains only added routes. new_routes should be same as s[\u0027host_routes\u0027] unless s[\u0027host_routes\u0027] contains undefined fields.","commit_id":"b5c46463d1445602c76fde696cffdffd08f25c3c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1237,"context_line":"                old_route_set \u003d set([_combine(route)"},{"line_number":1238,"context_line":"                                     for route in old_route_list])"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"                new_routes \u003d []"},{"line_number":1241,"context_line":"                for route_str in old_route_set - new_route_set:"},{"line_number":1242,"context_line":"                    for route in old_route_list:"},{"line_number":1243,"context_line":"                        if _combine(route) \u003d\u003d route_str:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F3u0%3D","line":1240,"updated":"2013-06-07 00:45:54.000000000","message":"why cannot new_routers be got from new_route_set directly? just like new_dns","commit_id":"ad2d46dd5cd12b071b0d1db11754574fdc9b4315"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"                old_route_set \u003d set([_combine(route)"},{"line_number":1238,"context_line":"                                     for route in old_route_list])"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"                new_routes \u003d []"},{"line_number":1241,"context_line":"                for route_str in old_route_set - new_route_set:"},{"line_number":1242,"context_line":"                    for route in old_route_list:"},{"line_number":1243,"context_line":"                        if _combine(route) \u003d\u003d route_str:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F3ug%3D","line":1240,"in_reply_to":"AAAAPX%2F%2F3u0%3D","updated":"2013-06-07 00:47:31.000000000","message":"ah it looks like there is the same bug i had with routes but in dns_names..","commit_id":"ad2d46dd5cd12b071b0d1db11754574fdc9b4315"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"                old_route_set \u003d set([_combine(route)"},{"line_number":1238,"context_line":"                                     for route in old_route_list])"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"                new_routes \u003d []"},{"line_number":1241,"context_line":"                for route_str in old_route_set - new_route_set:"},{"line_number":1242,"context_line":"                    for route in old_route_list:"},{"line_number":1243,"context_line":"                        if _combine(route) \u003d\u003d route_str:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPX%2F%2F2JI%3D","line":1240,"in_reply_to":"AAAAPX%2F%2F3ug%3D","updated":"2013-06-07 17:43:52.000000000","message":"Done","commit_id":"ad2d46dd5cd12b071b0d1db11754574fdc9b4315"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1387,"context_line":"                self._recycle_expired_ip_allocations(context,"},{"line_number":1388,"context_line":"                                                     port[\u0027network_id\u0027])"},{"line_number":1389,"context_line":"                original \u003d self._make_port_dict(port, process_extensions\u003dFalse)"},{"line_number":1390,"context_line":"                new_ips, prev_ips \u003d self._update_ips_for_port("},{"line_number":1391,"context_line":"                    context, port[\"network_id\"], id, original[\"fixed_ips\"],"},{"line_number":1392,"context_line":"                    p[\u0027fixed_ips\u0027])"},{"line_number":1393,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPX%2F%2F0g8%3D","line":1390,"updated":"2013-06-09 00:49:50.000000000","message":"nit: new_ips -\u003e added_ips? just be consistent with new_routes, new_dns which are all objects we want.","commit_id":"b3d762326df461dca54ef973f2f9303848c6fe0e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"                self._recycle_expired_ip_allocations(context,"},{"line_number":1388,"context_line":"                                                     port[\u0027network_id\u0027])"},{"line_number":1389,"context_line":"                original \u003d self._make_port_dict(port, process_extensions\u003dFalse)"},{"line_number":1390,"context_line":"                new_ips, prev_ips \u003d self._update_ips_for_port("},{"line_number":1391,"context_line":"                    context, port[\"network_id\"], id, original[\"fixed_ips\"],"},{"line_number":1392,"context_line":"                    p[\u0027fixed_ips\u0027])"},{"line_number":1393,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPX%2F%2F0fw%3D","line":1390,"in_reply_to":"AAAAPX%2F%2F0g8%3D","updated":"2013-06-09 01:47:03.000000000","message":"Done","commit_id":"b3d762326df461dca54ef973f2f9303848c6fe0e"}],"quantum/db/l3_db.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":754,"context_line":"                                       DEVICE_OWNER_FLOATINGIP]:"},{"line_number":755,"context_line":"            # Raise port in use only if the port has IP addresses"},{"line_number":756,"context_line":"            # Otherwise it\u0027s a stale port that can be removed"},{"line_number":757,"context_line":"            fixed_ips \u003d port_db[\u0027fixed_ips\u0027]"},{"line_number":758,"context_line":"            if fixed_ips:"},{"line_number":759,"context_line":"                raise l3.L3PortInUse(port_id\u003dport_id,"},{"line_number":760,"context_line":"                                     device_owner\u003dport_db[\u0027device_owner\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FpjI%3D","line":757,"updated":"2013-05-28 16:18:19.000000000","message":"well done, thanks","commit_id":"f776ed853ba1b428aab8dec7a4f14d2529441ea8"}],"quantum/db/models_v2.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"decda8be974176e698bd0ed075ed98b6be75a11e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":117,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\"),"},{"line_number":118,"context_line":"                           nullable\u003dFalse)"},{"line_number":119,"context_line":"    fixed_ips \u003d orm.relationship(IPAllocation, backref\u003d\u0027ports\u0027, lazy\u003d\"dynamic\")"},{"line_number":120,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":121,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":122,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FrAY%3D","side":"PARENT","line":119,"updated":"2013-05-28 00:40:11.000000000","message":"If we remove the lazy, if the sqlalchemy will do the subquery on fixed_ips itself?","commit_id":"c65a39deaf8907d50dfae44e7fc14fae451005ab"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":116,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":117,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\"),"},{"line_number":118,"context_line":"                           nullable\u003dFalse)"},{"line_number":119,"context_line":"    fixed_ips \u003d orm.relationship(IPAllocation, backref\u003d\u0027ports\u0027, lazy\u003d\"dynamic\")"},{"line_number":120,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":121,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":122,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FhmE%3D","side":"PARENT","line":119,"in_reply_to":"AAAAPH%2F%2Fo8Q%3D","updated":"2013-05-31 09:18:46.000000000","message":"Feel free to do as you prefer.","commit_id":"c65a39deaf8907d50dfae44e7fc14fae451005ab"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a88fa7e551e5702f1b2db84e8ecde7be4db93052","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":117,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\"),"},{"line_number":118,"context_line":"                           nullable\u003dFalse)"},{"line_number":119,"context_line":"    fixed_ips \u003d orm.relationship(IPAllocation, backref\u003d\u0027ports\u0027, lazy\u003d\"dynamic\")"},{"line_number":120,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":121,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":122,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fo8Q%3D","side":"PARENT","line":119,"in_reply_to":"AAAAPH%2F%2FpjM%3D","updated":"2013-05-28 19:18:25.000000000","message":"I don\u0027t think we wanted to changed this to joined as then we will be doing this query even if we don\u0027t intend to access fixed_ips. I\u0027m okay with changing this to joined if we want to simplify things on the db_base class. That might actually be a good idea.  What do you think?","commit_id":"c65a39deaf8907d50dfae44e7fc14fae451005ab"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":116,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":117,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\"),"},{"line_number":118,"context_line":"                           nullable\u003dFalse)"},{"line_number":119,"context_line":"    fixed_ips \u003d orm.relationship(IPAllocation, backref\u003d\u0027ports\u0027, lazy\u003d\"dynamic\")"},{"line_number":120,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":121,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":122,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FpjM%3D","side":"PARENT","line":119,"in_reply_to":"AAAAPH%2F%2FrAY%3D","updated":"2013-05-28 16:18:19.000000000","message":"The default value for a relationship is \u0027SELECT\u0027, which will still issue a distinct query with lazy loading.\nAs the side of the ports collection is \u003e\u003e the IP Allocation objects per port, I would prefer using lazy\u003d\u0027joined\u0027\n\n\nMore info at: http://docs.sqlalchemy.org/en/rel_0_7/orm/relationships.html?highlight\u003dorm.relationship#sqlalchemy.orm.relationship","commit_id":"c65a39deaf8907d50dfae44e7fc14fae451005ab"}]}
