)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7244,"name":"Victor Howard","email":"victor.r.howard@gmail.com","username":"vichoward"},"change_message_id":"18574dfece30fce8b9126e0ddf3cfe4c7ea35ac7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"it is unable to add IPv6 address with new subnet prefix,"},{"line_number":17,"context_line":"as _test_fixed_ips_for_port not returning IPv6 PD subnet."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"To fix this, we explicitely add PD subnet to \"to_add\" list,"},{"line_number":20,"context_line":"so that IPv6 address with new prefix added to PD subnet\u0027s port,"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1509626"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da6ed579_a21aeb15","line":19,"range":{"start_line":19,"start_character":16,"end_line":19,"end_character":27},"updated":"2016-01-12 16:18:20.000000000","message":"explicitly","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"0fb5694b8e7018d68b40aa2a1363b302b08594bc","unresolved":false,"context_lines":[{"line_number":765,"context_line":"                            routers.append(port[\u0027device_id\u0027])"},{"line_number":766,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":767,"context_line":"                        else:"},{"line_number":768,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]}"},{"line_number":769,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":770,"context_line":"                if ip_updated:"},{"line_number":771,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_ed120909","line":768,"updated":"2015-11-04 16:19:17.000000000","message":"nit: fixed_ip \u003d {\u0027subnet_id\u0027: s[\u0027id\u0027]}","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"212c9af3306cb807e6e6853f366f704002b444f7","unresolved":false,"context_lines":[{"line_number":765,"context_line":"                            routers.append(port[\u0027device_id\u0027])"},{"line_number":766,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":767,"context_line":"                        else:"},{"line_number":768,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]}"},{"line_number":769,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":770,"context_line":"                if ip_updated:"},{"line_number":771,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_15c09ddf","line":768,"in_reply_to":"fa80f949_ed120909","updated":"2015-11-05 07:43:02.000000000","message":"sure, thanks","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"077b0f8bedc8246fa4afe1012b8ef8302a9571bf","unresolved":false,"context_lines":[{"line_number":741,"context_line":"        # Keep up with fields that changed"},{"line_number":742,"context_line":"        result.update(changes)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        if update_ports_needed:"},{"line_number":745,"context_line":"            # Find ports that have not yet been updated"},{"line_number":746,"context_line":"            # with an IP address by Prefix Delegation, and update them"},{"line_number":747,"context_line":"            ports \u003d self.get_ports(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_e5d2e2ff","line":744,"updated":"2015-12-03 15:47:33.000000000","message":"not related to this patch, but I would consider moving everything under \u0027if update_ports_needed:\u0027 into separate method since \u0027update_subnet\u0027 is already too big (100 lines). Also this part is doing quite separate piece of work.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cb28183344defcf9a926b36f9420c86add69874b","unresolved":false,"context_lines":[{"line_number":741,"context_line":"        # Keep up with fields that changed"},{"line_number":742,"context_line":"        result.update(changes)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        if update_ports_needed:"},{"line_number":745,"context_line":"            # Find ports that have not yet been updated"},{"line_number":746,"context_line":"            # with an IP address by Prefix Delegation, and update them"},{"line_number":747,"context_line":"            ports \u003d self.get_ports(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_fb6bd2ee","line":744,"in_reply_to":"7a740942_3dd926f4","updated":"2016-04-01 16:42:23.000000000","message":"This is fine to suggest this but since it is not related tot this patch set, it shouldn\u0027t be done as part of this patch set.  If you want to post a refactor patch separately, that is fine.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f96ebed59ea7f8bdab492ec4fd8d3222d6bf36e6","unresolved":false,"context_lines":[{"line_number":741,"context_line":"        # Keep up with fields that changed"},{"line_number":742,"context_line":"        result.update(changes)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        if update_ports_needed:"},{"line_number":745,"context_line":"            # Find ports that have not yet been updated"},{"line_number":746,"context_line":"            # with an IP address by Prefix Delegation, and update them"},{"line_number":747,"context_line":"            ports \u003d self.get_ports(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_3dd926f4","line":744,"in_reply_to":"9a8ffd7b_e5d2e2ff","updated":"2015-12-04 13:31:41.000000000","message":"+1","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1f29b5e4fed4f997eae635106ec3ed2d10a52c9e","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":761,"context_line":"                        else:"},{"line_number":762,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: s[\u0027id\u0027]}"},{"line_number":763,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":764,"context_line":"                if ip_updated:"},{"line_number":765,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"},{"line_number":766,"context_line":"                    self.update_port(context, port[\u0027id\u0027], new_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_141b88cb","line":763,"updated":"2015-12-02 15:54:09.000000000","message":"Should this append only happen, if L756 is true? Indented?","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f96ebed59ea7f8bdab492ec4fd8d3222d6bf36e6","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":761,"context_line":"                        else:"},{"line_number":762,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: s[\u0027id\u0027]}"},{"line_number":763,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":764,"context_line":"                if ip_updated:"},{"line_number":765,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"},{"line_number":766,"context_line":"                    self.update_port(context, port[\u0027id\u0027], new_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_9d37faaf","line":763,"in_reply_to":"7a740942_f751b20f","updated":"2015-12-04 13:31:41.000000000","message":"Thanks for the clarification!","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"fd10516815af025ac66d37e9acae917e47184755","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":761,"context_line":"                        else:"},{"line_number":762,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: s[\u0027id\u0027]}"},{"line_number":763,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":764,"context_line":"                if ip_updated:"},{"line_number":765,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"},{"line_number":766,"context_line":"                    self.update_port(context, port[\u0027id\u0027], new_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_e0a135f8","line":763,"in_reply_to":"9a8ffd7b_141b88cb","updated":"2015-12-03 08:54:18.000000000","message":"No.\n\nFor example, I have two ports.\n1) normal_port with ipv4 address and IPv6 address. For this port, \"ip_updated\" will be False.\n2) PD_port with ipv4 address and IPv6 PD address. For this port, ip_updated should be True and above \"fixed_ips\" list, will have both ipv4 address and IPv6 PD address.  So append should always happen, so that it doesn\u0027t lose ip addresses.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"077b0f8bedc8246fa4afe1012b8ef8302a9571bf","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                            fixed_ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":761,"context_line":"                        else:"},{"line_number":762,"context_line":"                            fixed_ip \u003d {\u0027subnet_id\u0027: s[\u0027id\u0027]}"},{"line_number":763,"context_line":"                    fixed_ips.append(fixed_ip)"},{"line_number":764,"context_line":"                if ip_updated:"},{"line_number":765,"context_line":"                    new_port[\u0027port\u0027][\u0027fixed_ips\u0027] \u003d fixed_ips"},{"line_number":766,"context_line":"                    self.update_port(context, port[\u0027id\u0027], new_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_f751b20f","line":763,"in_reply_to":"9a8ffd7b_e0a135f8","updated":"2015-12-03 15:47:33.000000000","message":"sounds correct to me","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cc619763bfb0a0b4cc51e23ef01dbc620403eea4","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            ip_updated \u003d False"},{"line_number":763,"context_line":"            new_port \u003d {\u0027port\u0027: port}"},{"line_number":764,"context_line":"            for ip in port[\u0027fixed_ips\u0027]:"},{"line_number":765,"context_line":"                fixed_ip \u003d {\u0027subnet_id\u0027: ip[\u0027subnet_id\u0027],"},{"line_number":766,"context_line":"                            \u0027ip_address\u0027: ip[\u0027ip_address\u0027]}"},{"line_number":767,"context_line":"                if ip[\u0027subnet_id\u0027] \u003d\u003d subnet[\u0027id\u0027]:"},{"line_number":768,"context_line":"                    ip_updated \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_dc13c8b6","line":765,"updated":"2016-01-23 04:03:02.000000000","message":"It looks like the only condition that is concerned is that the port has \u0027fixed_ip\u0027 in \u0027subnet\u0027. So, I think no need to assign fixed_ip here and append it at line 774 for every port. It seems like a waste.\n\nWhat about this style?\n\nfor port in ports:\n    subnet_ids \u003d {ip[\u0027subnet\u0027] for ip in port[\u0027fixed_ips\u0027]}\n    if subnet[\u0027id\u0027] not in subnet_ids:\n        continue\n    # Do the handling you want\n    for ip in port[\u0027fixed_ips\u0027]:\n        ...\n        ...\n\nAnd think more, why not using a DB query to get the ports that have \u0027fixed_id\u0027 in \u0027subnet\u0027, although the original code doesn\u0027t do so.","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"3261c4dd815b44a9f3e625c6a2ad88eebb283547","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            ip_updated \u003d False"},{"line_number":763,"context_line":"            new_port \u003d {\u0027port\u0027: port}"},{"line_number":764,"context_line":"            for ip in port[\u0027fixed_ips\u0027]:"},{"line_number":765,"context_line":"                fixed_ip \u003d {\u0027subnet_id\u0027: ip[\u0027subnet_id\u0027],"},{"line_number":766,"context_line":"                            \u0027ip_address\u0027: ip[\u0027ip_address\u0027]}"},{"line_number":767,"context_line":"                if ip[\u0027subnet_id\u0027] \u003d\u003d subnet[\u0027id\u0027]:"},{"line_number":768,"context_line":"                    ip_updated \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_5579ebc6","line":765,"in_reply_to":"9a68dd71_dc13c8b6","updated":"2016-01-23 07:09:45.000000000","message":"sure, thanks","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"3455464a1b8035b331bec8895a798602117b1e65","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                        routers.append(port[\u0027device_id\u0027])"},{"line_number":764,"context_line":"                        fip[\u0027ip_address\u0027] \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":765,"context_line":"                    else:"},{"line_number":766,"context_line":"                        fip.pop(\u0027ip_address\u0027, None)"},{"line_number":767,"context_line":"            self.update_port(context, port[\u0027id\u0027], {\u0027port\u0027: port})"},{"line_number":768,"context_line":"        # Send router_update to l3_agent"},{"line_number":769,"context_line":"        if routers:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_8674bfcf","line":766,"range":{"start_line":766,"start_character":50,"end_line":766,"end_character":51},"updated":"2016-01-27 13:43:25.000000000","message":"Nit: I understand why \u0027ip_address\u0027 should be removed (and later populated with a PD address). Some comments may help, though.","commit_id":"78b135119551749def24e2f9a99420277d33abbb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"44ea619b4ac0855d7459471b8d257a575481f51c","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                        routers.append(port[\u0027device_id\u0027])"},{"line_number":764,"context_line":"                        fip[\u0027ip_address\u0027] \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":765,"context_line":"                    else:"},{"line_number":766,"context_line":"                        fip.pop(\u0027ip_address\u0027, None)"},{"line_number":767,"context_line":"            self.update_port(context, port[\u0027id\u0027], {\u0027port\u0027: port})"},{"line_number":768,"context_line":"        # Send router_update to l3_agent"},{"line_number":769,"context_line":"        if routers:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_c8a4fd09","line":766,"range":{"start_line":766,"start_character":50,"end_line":766,"end_character":51},"in_reply_to":"7a5de9d1_8674bfcf","updated":"2016-01-27 15:30:33.000000000","message":"I think with comments in L754 and L755, and looking the code here, we can understand that we are removing ip_address so that PD can update with new address in port_update.","commit_id":"78b135119551749def24e2f9a99420277d33abbb"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"91f40617196d064d54a2daad84c62b96765d97cf","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        return result"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    def _update_ports_and_routers(self, context, subnet):"},{"line_number":788,"context_line":"        # Find ports that have not yet been updated"},{"line_number":789,"context_line":"        # with an IP address by Prefix Delegation, and update them"},{"line_number":790,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet[\u0027id\u0027]]}}"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa0719c6_8effb600","line":787,"range":{"start_line":787,"start_character":8,"end_line":787,"end_character":33},"updated":"2016-03-21 21:26:28.000000000","message":"Breaking this out in to a new method makes this review more difficult.  It also has resulted in several renames of variables that makes it more difficult too.  It is a real pain to review changes to a piece of logic when the entire block of logic is moved too.  This is why we offer this advice [1].\n\n [1] http://docs.openstack.org/developer/neutron/devref/effective_neutron.html#scoping-your-patch-appropriately","commit_id":"7d8e7c4c209c83ea01a24d8dbb9636571057e760"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6b4e2fa976a6705f5ab4b16425f446e3671ff42e","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"        return result"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"    def _update_ports_and_routers(self, context, subnet):"},{"line_number":781,"context_line":"        # Find ports that have not yet been updated"},{"line_number":782,"context_line":"        # with an IP address by Prefix Delegation, and update them"},{"line_number":783,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet[\u0027id\u0027]]}}"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_3b61ca05","line":780,"range":{"start_line":780,"start_character":8,"end_line":780,"end_character":33},"updated":"2016-04-01 16:42:58.000000000","message":"My comment from PS19 stands.","commit_id":"79aee46672c2c27c8fa32e9aef081f6c333e9306"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ed7fefb3913d389de09006b19bfe077fd198278b","unresolved":false,"context_lines":[{"line_number":764,"context_line":"                                                         db_pools)"},{"line_number":765,"context_line":"        result \u003d self._make_subnet_dict(subnet, context\u003dcontext)"},{"line_number":766,"context_line":"        # Keep up with fields that changed"},{"line_number":767,"context_line":"        result.update(changes)"},{"line_number":768,"context_line":"        if update_ports_needed:"},{"line_number":769,"context_line":"            # Find ports that have not yet been updated"},{"line_number":770,"context_line":"            # with an IP address by Prefix Delegation, and update them"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_a4fd593c","line":767,"updated":"2016-04-05 17:41:58.000000000","message":"Don\u0027t remove this line below here.","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"2376fe870e942ad0456eab01bfeec94f8996dbe1","unresolved":false,"context_lines":[{"line_number":764,"context_line":"                                                         db_pools)"},{"line_number":765,"context_line":"        result \u003d self._make_subnet_dict(subnet, context\u003dcontext)"},{"line_number":766,"context_line":"        # Keep up with fields that changed"},{"line_number":767,"context_line":"        result.update(changes)"},{"line_number":768,"context_line":"        if update_ports_needed:"},{"line_number":769,"context_line":"            # Find ports that have not yet been updated"},{"line_number":770,"context_line":"            # with an IP address by Prefix Delegation, and update them"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_e2260acd","line":767,"in_reply_to":"9a061dce_a4fd593c","updated":"2016-04-06 06:28:22.000000000","message":"sure, thanks","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ed7fefb3913d389de09006b19bfe077fd198278b","unresolved":false,"context_lines":[{"line_number":768,"context_line":"        if update_ports_needed:"},{"line_number":769,"context_line":"            # Find ports that have not yet been updated"},{"line_number":770,"context_line":"            # with an IP address by Prefix Delegation, and update them"},{"line_number":771,"context_line":"            filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [s[\u0027id\u0027]]}}"},{"line_number":772,"context_line":"            ports \u003d self.get_ports(context, filters\u003dfilters)"},{"line_number":773,"context_line":"            routers \u003d []"},{"line_number":774,"context_line":"            for port in ports:"},{"line_number":775,"context_line":"                for ip in port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_7f73c815","line":772,"range":{"start_line":771,"start_character":12,"end_line":772,"end_character":60},"updated":"2016-04-05 17:41:58.000000000","message":"I suspect there are two independent changes in here.  One is to optimize the query by passing these filters and the other is the one that fixes PD.  Is this true?  If so, would you mind separating them in to two patches?  It helped me to understand better what you\u0027re doing here.\n\n [1] https://github.com/ecbaldwin/neutron/commit/4a0ec1b5e9fc9fb5ff1fdfcbe90f378082cbb5d2\n [2] https://github.com/ecbaldwin/neutron/commit/ad374609d73ebbdd08645a95bdc419ed2c5e6f57","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"2376fe870e942ad0456eab01bfeec94f8996dbe1","unresolved":false,"context_lines":[{"line_number":768,"context_line":"        if update_ports_needed:"},{"line_number":769,"context_line":"            # Find ports that have not yet been updated"},{"line_number":770,"context_line":"            # with an IP address by Prefix Delegation, and update them"},{"line_number":771,"context_line":"            filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [s[\u0027id\u0027]]}}"},{"line_number":772,"context_line":"            ports \u003d self.get_ports(context, filters\u003dfilters)"},{"line_number":773,"context_line":"            routers \u003d []"},{"line_number":774,"context_line":"            for port in ports:"},{"line_number":775,"context_line":"                for ip in port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_02033e10","line":772,"range":{"start_line":771,"start_character":12,"end_line":772,"end_character":60},"in_reply_to":"9a061dce_7f73c815","updated":"2016-04-06 06:28:22.000000000","message":"Thanks Carl. I will split into two changes.","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d28ee927db9f842a2593fe3447285c4e35324b76","unresolved":false,"context_lines":[{"line_number":779,"context_line":"                            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":780,"context_line":"                            routers.append(port[\u0027device_id\u0027])"},{"line_number":781,"context_line":"                            ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":782,"context_line":"                        else:"},{"line_number":783,"context_line":"                            # We remove ip_address and pass only PD subnet_id"},{"line_number":784,"context_line":"                            # in port\u0027s fixed_ip for port_update. Later, IPAM"},{"line_number":785,"context_line":"                            # drivers will allocate eui64 address with new"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a122d0e_093d6f2b","line":782,"updated":"2016-04-17 07:58:29.000000000","message":"is this also valid for the v4 flow? do we not need a safeguard that this is v6?","commit_id":"70c3b66ac3f01fe907df08d2c50386a192e1d85c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6d3aad68d684237cca929a13e464a1bd1652bcf8","unresolved":false,"context_lines":[{"line_number":779,"context_line":"                            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":780,"context_line":"                            routers.append(port[\u0027device_id\u0027])"},{"line_number":781,"context_line":"                            ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":782,"context_line":"                        else:"},{"line_number":783,"context_line":"                            # We remove ip_address and pass only PD subnet_id"},{"line_number":784,"context_line":"                            # in port\u0027s fixed_ip for port_update. Later, IPAM"},{"line_number":785,"context_line":"                            # drivers will allocate eui64 address with new"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a122d0e_8b0ee6e2","line":782,"in_reply_to":"1a122d0e_093d6f2b","updated":"2016-04-20 20:36:30.000000000","message":"A fair question, could you respond?","commit_id":"70c3b66ac3f01fe907df08d2c50386a192e1d85c"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"25d74c8dfeb700bf5a10c6b1c739f9de4eae2a8b","unresolved":false,"context_lines":[{"line_number":779,"context_line":"                            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":780,"context_line":"                            routers.append(port[\u0027device_id\u0027])"},{"line_number":781,"context_line":"                            ip[\u0027ip_address\u0027] \u003d s[\u0027gateway_ip\u0027]"},{"line_number":782,"context_line":"                        else:"},{"line_number":783,"context_line":"                            # We remove ip_address and pass only PD subnet_id"},{"line_number":784,"context_line":"                            # in port\u0027s fixed_ip for port_update. Later, IPAM"},{"line_number":785,"context_line":"                            # drivers will allocate eui64 address with new"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a122d0e_41d940f2","line":782,"in_reply_to":"1a122d0e_8b0ee6e2","updated":"2016-04-21 06:37:53.000000000","message":"Here subnet \"s\" is IPv6 PD subnet and not any other subnet(i.e v4 or other v6 subnets) as update_ports_needed is set for only v6 PD subnet.\n\nSo code between lines 777 to 788 is executed for only IPv6 PD subnet(and not any other subnets).\n\nSo if a port has fixed_ips with v4 subnet and v6 PD subnet, like below,\n\n[{\u0027ip_address\u0027: \u002710.0.0.2\u0027, \u0027subnet_id\u0027: \u0027v4_subnet\u0027}, {\u0027ip_address\u0027: \u0027::1034:56ff:fe78:c606\u0027, \u0027subnet_id\u0027: \u0027v6_pd_subnet\u0027}]\n\nlines 777 to 788 will change fixed_ips like below\n\n[{\u0027ip_address\u0027: \u002710.0.0.2\u0027, \u0027subnet_id\u0027: \u0027v4_subnet\u0027}, {\u0027subnet_id\u0027: \u0027v6_pd_subnet\u0027}]\n\ni.e it won\u0027t change fip which has v4 or any other v6 subnet.\n\nTest  test_subnet_update_ipv4_and_ipv6_pd_slaac_subnets in test_db_base_plugin_v2.py(Line 4327) added to test this.","commit_id":"70c3b66ac3f01fe907df08d2c50386a192e1d85c"}],"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ed7fefb3913d389de09006b19bfe077fd198278b","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    def _update_ips_for_pd_subnet(self, context, subnets,"},{"line_number":472,"context_line":"                                  fixed_ips, mac_address\u003dNone):"},{"line_number":473,"context_line":"        fixed_ip_list \u003d []"},{"line_number":474,"context_line":"        subnet_list \u003d [fixed[\u0027subnet_id\u0027] for fixed in fixed_ips"},{"line_number":475,"context_line":"                       if \u0027subnet_id\u0027 in fixed]"},{"line_number":476,"context_line":"        for subnet_id in subnet_list:"},{"line_number":477,"context_line":"            for subnet in subnets:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_3e73114f","line":474,"range":{"start_line":474,"start_character":22,"end_line":474,"end_character":23},"updated":"2016-04-05 17:41:58.000000000","message":"Make this a set:\n\n  subnet_set \u003d {fixed[\u0027subnet_id\u0027]\n                for fixed in fixed_ips\n                if \u0027subnet_id\u0027 in fixed}","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"2376fe870e942ad0456eab01bfeec94f8996dbe1","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    def _update_ips_for_pd_subnet(self, context, subnets,"},{"line_number":472,"context_line":"                                  fixed_ips, mac_address\u003dNone):"},{"line_number":473,"context_line":"        fixed_ip_list \u003d []"},{"line_number":474,"context_line":"        subnet_list \u003d [fixed[\u0027subnet_id\u0027] for fixed in fixed_ips"},{"line_number":475,"context_line":"                       if \u0027subnet_id\u0027 in fixed]"},{"line_number":476,"context_line":"        for subnet_id in subnet_list:"},{"line_number":477,"context_line":"            for subnet in subnets:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_423536f5","line":474,"range":{"start_line":474,"start_character":22,"end_line":474,"end_character":23},"in_reply_to":"9a061dce_3e73114f","updated":"2016-04-06 06:28:22.000000000","message":"sure, thanks","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ed7fefb3913d389de09006b19bfe077fd198278b","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        fixed_ip_list \u003d []"},{"line_number":474,"context_line":"        subnet_list \u003d [fixed[\u0027subnet_id\u0027] for fixed in fixed_ips"},{"line_number":475,"context_line":"                       if \u0027subnet_id\u0027 in fixed]"},{"line_number":476,"context_line":"        for subnet_id in subnet_list:"},{"line_number":477,"context_line":"            for subnet in subnets:"},{"line_number":478,"context_line":"                # Already checked subnet validity in _get_subnet_for_fixed_ip"},{"line_number":479,"context_line":"                if (subnet[\u0027id\u0027] \u003d\u003d subnet_id and"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_be39e143","line":476,"range":{"start_line":476,"start_character":8,"end_line":476,"end_character":37},"updated":"2016-04-05 17:41:58.000000000","message":"This is an overly complex quadratic algorithm.\n\n  pd_enabled_subnets \u003d [s for s in subnets\n                        if (s[\u0027id\u0027] in subnet_set\n                            and ipv6_utils.is_ipv6_pd_enabled(s))]\n  for subnet in subnets:\n      if mac_address:\n          ...","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"2376fe870e942ad0456eab01bfeec94f8996dbe1","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        fixed_ip_list \u003d []"},{"line_number":474,"context_line":"        subnet_list \u003d [fixed[\u0027subnet_id\u0027] for fixed in fixed_ips"},{"line_number":475,"context_line":"                       if \u0027subnet_id\u0027 in fixed]"},{"line_number":476,"context_line":"        for subnet_id in subnet_list:"},{"line_number":477,"context_line":"            for subnet in subnets:"},{"line_number":478,"context_line":"                # Already checked subnet validity in _get_subnet_for_fixed_ip"},{"line_number":479,"context_line":"                if (subnet[\u0027id\u0027] \u003d\u003d subnet_id and"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a061dce_e25f2a3f","line":476,"range":{"start_line":476,"start_character":8,"end_line":476,"end_character":37},"in_reply_to":"9a061dce_be39e143","updated":"2016-04-06 06:28:22.000000000","message":"Thanks Carl. Your suggestion simplifies the code.","commit_id":"5f10d42e42483126d02e72b959b71c8b3f396073"}],"neutron/db/ipam_non_pluggable_backend.py":[{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"0fb5694b8e7018d68b40aa2a1363b302b08594bc","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_6dc0592b","line":274,"updated":"2015-11-04 16:19:17.000000000","message":"Can you explain why the changes in this file are needed? I don\u0027t see how they relate to this bug. Thanks.","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"aadb90fe82dfe8451e91ace3259a0b22365409d0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_e81eca5d","line":274,"in_reply_to":"da85f559_b494a58a","updated":"2015-11-12 14:29:22.000000000","message":"Thanks Pavel\n\nIf I add that, ipam unit test fails as a call to _allocate_fixed_ips(or _ipam_allocate_ips) is missing at\nhttps://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L195\n\nwhereas the same present at https://github.com/openstack/neutron/blob/master/neutron/db/ipam_non_pluggable_backend.py#L358\n\nI gave the same reply comment in test_db_base_plugin_v2.py\n\nCan I add a call to _ipam_allocate_ips at \nhttps://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L195\n?","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"7d36c8088876ea724ac54edd328944592c9c148d","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_2c05c10f","line":274,"in_reply_to":"da85f559_e81eca5d","updated":"2015-11-12 15:37:59.000000000","message":"You don\u0027t need to add _ipam_allocate_ips at https://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L195, because it is called in the end of this method where fixed and auto ips are collected https://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L228\nAnd _allocate_fixed_ips are not the same as _ipam_allocate_ips. Part of work that was done in _allocate_fixed_ips is now delegated to ipam driver, like ip address generating and others.\nI am not sure if this check is needed for pluggable ipam, since workflow is a bit different there, but I\u0027ll try to figure it out.","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"212c9af3306cb807e6e6853f366f704002b444f7","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_d5ea15ac","line":274,"in_reply_to":"fa80f949_6dc0592b","updated":"2015-11-05 07:43:02.000000000","message":"Thanks John. \n\nThis file(\"_update_ips_for_port\") has to allocate address with new prefix for the port. \n\nI see two ways to allocate this address. i.e either\n\n1) through function \"_allocate_fixed_ips\"(when function \"_test_fixed_ips_for_port\" returns fixed_ips) i.e L359 and L333, or\n\n2) through  scan for auto-address subnets (L367)\n\n\nPort Update Scenario -\n\nFunction \"_update_ips_for_port\" is called by PD to update the port address with new prefix. This function doesn\u0027t have 2nd way(scan for auto-address) of address allocation and only 1st way(\"test_fixed_ips_for_port\" and \"allocate_fixed_ips\") should be used for updating address. For this to happen, test_fixed_ips_for_port should return fixed_ips(with subnet_id) for PD subnet(change in L274).\n\n\n\nPort Create Scenario -\n\nFunction \"_allocate_ips_for_port\" is called for address assign during port create(and not port update). \n\nIn this case, no fixed_ip configured(i.e fixed_configured will be False in L354) for PD, so address will be assigned  through L378 for PD also. \n\nHowever, to avoid \"DBDuplicateEntry\" error for use case https://bugs.launchpad.net/neutron/+bug/1484379 \nand as  \"_allocate_fixed_ips\" is assigning address in this function for PD in this use case, this subnet shouldn\u0027t be scanned again, so need changes in L367.","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"bcbbdf474f88389128e796bc5bf903aea636d2b6","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_b494a58a","line":274,"in_reply_to":"fa80f949_d5ea15ac","updated":"2015-11-12 13:38:43.000000000","message":"I think you also need to fix this check for pluggable backend as well, to keep them in sync.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L263","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e4c6143362a560e795e02624a16c0ed8124447b0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_5239b2d7","line":274,"updated":"2015-11-30 13:24:57.000000000","message":"dodgy indentation","commit_id":"0b37446c53a8669405933220db5d9d82d653f2f1"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"830b3ff6f10a45680dc83e3c02be2f1453df3f96","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            v4 \u003d []"},{"line_number":372,"context_line":"            v6_stateful \u003d []"},{"line_number":373,"context_line":"            for subnet in subnets:"},{"line_number":374,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":375,"context_line":"                    v4.append(subnet)"},{"line_number":376,"context_line":"                elif ipv6_utils.is_auto_address_subnet(subnet):"},{"line_number":377,"context_line":"                    if not is_router_port:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_aecf5228","line":374,"updated":"2015-11-30 15:38:49.000000000","message":"I know this isn\u0027t part of your patch set, but maybe you could include the neutron.common constants and change this to use the constant for IP_VERSION_4?","commit_id":"0b37446c53a8669405933220db5d9d82d653f2f1"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1f29b5e4fed4f997eae635106ec3ed2d10a52c9e","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_970bfa23","line":274,"updated":"2015-12-02 15:54:09.000000000","message":"Would this be clearer as...\n\n    if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or\n        (not is_autoaddr_subnet and ipv6_utils.is_ipv6_pd_enabled(subnet))):\n\nIOW, use (not A and B), instead of not (A and not B)?","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5db9ccaeace1890a1bc7f240591e0f3a67e3c6de","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_c3741869","line":274,"in_reply_to":"7a740942_bdee7620","updated":"2015-12-14 15:36:23.000000000","message":"I agree with Paul. I think that the resulting logic is easier to understand.\n\nOn the other hand, I don\u0027t think that this method should be changed at all. PD enabled subnets are auto_addr subnets. This method is trying to keep those subnets out as it was originally written. Instead, I believe that the change should be made in _update_ips_for_ports().","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4fc35155730e97d62e6a13b1fdc4bbe86faa71ff","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_41b57b7b","line":274,"in_reply_to":"7a740942_c3741869","updated":"2016-01-06 17:51:24.000000000","message":"I think Robert may have something here.  Any reply?","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f96ebed59ea7f8bdab492ec4fd8d3222d6bf36e6","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_bdee7620","line":274,"in_reply_to":"9a8ffd7b_40f4c159","updated":"2015-12-04 13:31:41.000000000","message":"Sorry, bobbled that...\n\n   if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or\n        (not is_autoaddr_subnet or ipv6_utils.is_ipv6_pd_enabled(subnet))):\n\nChanging double negative \"not(A and not B)\" to \"not A or B\". In addition, since or\u0027ing all together, the least cost ones could be first to short-circuit).\n\nMore of a minor nit.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"fd10516815af025ac66d37e9acae917e47184755","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_40f4c159","line":274,"in_reply_to":"9a8ffd7b_970bfa23","updated":"2015-12-03 08:54:18.000000000","message":"Thanks Paul, but I can\u0027t use (not A and B) i.e\n(not is_autoaddr_subnet and ipv6_utils.is_ipv6_pd_enabled(subnet))\n\n\nbecause, when is_autoaddr_subnet\u003dTrue and is_ipv6_pd_enabled\u003dTrue, I want fixed_ip_set.append() to happen, but (not A and B) will be False, and will skip appending the subnet_id.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"d6b137c05b7383389aa06a091e45ab971d94c225","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # with the port."},{"line_number":272,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":273,"context_line":"                    not (is_auto_addr_subnet and"},{"line_number":274,"context_line":"                         not ipv6_utils.is_ipv6_pd_enabled(subnet))):"},{"line_number":275,"context_line":"                    fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_c9589833","line":274,"in_reply_to":"fa69d971_41b57b7b","updated":"2016-01-07 07:32:04.000000000","message":"Thanks Carl and Robert.\n\n_test_fixed_ips_for_port is used both in allocate_ips and update_ips.\nBut check for pd subnet is needed only for update_ips.\nSo I will add a flag to _test_fixed_ips_for_port like below\n\ndef _test_fixed_ips_for_port(self, ..., add_pd_subnet\u003dFalse)\n{\n ...\n else:\n   if (device_owner in ...SNAT or \n       not is_auto_addr_subnet):\n      fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})\n\n   if add_pd_subnet and is_ipv6_pd_enabled(subnet): \n      fixed_ip_set.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})\n}\n\ndef _update_ips_for_port(self, context, ...)\n{\n  to_add \u003d self._test_fixed_ips_for_port(context, .., add_pd_subnet\u003dTrue)\n}\n\nAnd remove changes in _allocate_fixed_ips.\n\nSame applicable in ipam_pluggable_backend.py","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5db9ccaeace1890a1bc7f240591e0f3a67e3c6de","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            if not is_router_port:"},{"line_number":366,"context_line":"                v6_stateless +\u003d [subnet for subnet in subnets"},{"line_number":367,"context_line":"                    if (ipv6_utils.is_auto_address_subnet(subnet) and"},{"line_number":368,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))]"},{"line_number":369,"context_line":"        else:"},{"line_number":370,"context_line":"            # Split into v4, v6 stateless and v6 stateful subnets"},{"line_number":371,"context_line":"            v4 \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_c32898e4","line":368,"updated":"2015-12-14 15:36:23.000000000","message":"this should not be changed. PD subnet is auto subnet, and should be covered by the v6_stateless.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"d6b137c05b7383389aa06a091e45ab971d94c225","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            if not is_router_port:"},{"line_number":366,"context_line":"                v6_stateless +\u003d [subnet for subnet in subnets"},{"line_number":367,"context_line":"                    if (ipv6_utils.is_auto_address_subnet(subnet) and"},{"line_number":368,"context_line":"                        not ipv6_utils.is_ipv6_pd_enabled(subnet))]"},{"line_number":369,"context_line":"        else:"},{"line_number":370,"context_line":"            # Split into v4, v6 stateless and v6 stateful subnets"},{"line_number":371,"context_line":"            v4 \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_69de4cde","line":368,"in_reply_to":"7a740942_c32898e4","updated":"2016-01-07 07:32:04.000000000","message":"I will remove this after changing code like above.","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"3455464a1b8035b331bec8895a798602117b1e65","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        fixed_ip_list \u003d []"},{"line_number":282,"context_line":"        for fixed in fixed_ips:"},{"line_number":283,"context_line":"            if \u0027subnet_id\u0027 in fixed:"},{"line_number":284,"context_line":"                subnet \u003d self._get_subnet(context, fixed[\u0027subnet_id\u0027])"},{"line_number":285,"context_line":"                if (subnet[\u0027network_id\u0027] \u003d\u003d network_id and"},{"line_number":286,"context_line":"                    ipv6_utils.is_ipv6_pd_enabled(subnet)):"},{"line_number":287,"context_line":"                    fixed_ip_list.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_7cca7651","line":284,"range":{"start_line":284,"start_character":51,"end_line":284,"end_character":56},"updated":"2016-01-27 13:43:25.000000000","message":"_get_subnet is called within _get_changed_ips_for_port() already. It may not be a big deal to make the same call in here again. \nBut I just thought that the knowledge of this update being a pd update is known by the caller already, why this check has to be done again in here? Is it possible to have the info (pd update) been conveyed in the fip dict?","commit_id":"78b135119551749def24e2f9a99420277d33abbb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"44ea619b4ac0855d7459471b8d257a575481f51c","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        fixed_ip_list \u003d []"},{"line_number":282,"context_line":"        for fixed in fixed_ips:"},{"line_number":283,"context_line":"            if \u0027subnet_id\u0027 in fixed:"},{"line_number":284,"context_line":"                subnet \u003d self._get_subnet(context, fixed[\u0027subnet_id\u0027])"},{"line_number":285,"context_line":"                if (subnet[\u0027network_id\u0027] \u003d\u003d network_id and"},{"line_number":286,"context_line":"                    ipv6_utils.is_ipv6_pd_enabled(subnet)):"},{"line_number":287,"context_line":"                    fixed_ip_list.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_9ddba9ed","line":284,"range":{"start_line":284,"start_character":51,"end_line":284,"end_character":56},"in_reply_to":"7a5de9d1_7cca7651","updated":"2016-01-27 15:30:33.000000000","message":"But _get_changed_ips_for_port is calling _get_subnet for remove_ips list and not for add_ips list.\n\nIn add_ips list, _test_fixed_ips_for_port is already processing for some fixed_ips except for PD subnet. So in update_ips_for_pd_subnet we explicitly process for PD subnet and hence a check for PD subnet is needed.\n\nConventionally, fixed_ips will have subnet_id or(and) ip_address. So better to have only subnet_id in fixed_ip to update PD instead of any flag like PD_UPDATE. And after looking at the function update_ips_for_pd_subnet, we can assume that here we are processing fixed_ips with only having PD subnet.","commit_id":"78b135119551749def24e2f9a99420277d33abbb"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1bf3433060d2a43588bc22680c50cface87c661b","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set, device_owner)"},{"line_number":278,"context_line":"        return fixed_ip_set"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _update_ips_for_pd_subnet(self, context, network_id, fixed_ips):"},{"line_number":281,"context_line":"        fixed_ip_list \u003d []"},{"line_number":282,"context_line":"        for fixed in fixed_ips:"},{"line_number":283,"context_line":"            if \u0027subnet_id\u0027 in fixed:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a57f1b5_a0e2dc01","line":280,"updated":"2016-02-10 14:12:44.000000000","message":"This method and the one in pluggable IPAM are very similar. Would it make sense to try to extract commonality into a single method?\n\nIf mac passed, add extra fields to dict being appended?","commit_id":"a312e916fca1f9af67610e670e2350c1794db1f5"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7a77156447f723dbe2a41d287be5d90d0379e06d","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self._validate_max_ips_per_port(fixed_ip_set, device_owner)"},{"line_number":278,"context_line":"        return fixed_ip_set"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _update_ips_for_pd_subnet(self, context, network_id, fixed_ips):"},{"line_number":281,"context_line":"        fixed_ip_list \u003d []"},{"line_number":282,"context_line":"        for fixed in fixed_ips:"},{"line_number":283,"context_line":"            if \u0027subnet_id\u0027 in fixed:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a57f1b5_c3604238","line":280,"in_reply_to":"3a57f1b5_a0e2dc01","updated":"2016-02-10 14:33:16.000000000","message":"sure, thanks Paul","commit_id":"a312e916fca1f9af67610e670e2350c1794db1f5"}],"neutron/db/ipam_pluggable_backend.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ee304fb31a856cfb4ca4b6fa48f4cb7fb92ab8e8","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                if (device_owner in constants.ROUTER_INTERFACE_OWNERS_SNAT or"},{"line_number":265,"context_line":"                        not is_auto_addr_subnet):"},{"line_number":266,"context_line":"                    fixed_ip_list.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":267,"context_line":"                else:"},{"line_number":268,"context_line":"                    if (is_auto_addr_subnet and"},{"line_number":269,"context_line":"                            ipv6_utils.is_ipv6_pd_enabled(subnet)):"},{"line_number":270,"context_line":"                        fixed_ip_list.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_e835f7d9","line":267,"updated":"2015-12-17 21:50:30.000000000","message":"nit: this can be \u0027elif\u0027","commit_id":"125750e751ed75cac67c12417fe28621d24f927d"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"0fb5694b8e7018d68b40aa2a1363b302b08594bc","unresolved":false,"context_lines":[{"line_number":4016,"context_line":"        # this test is incompatible with pluggable ipam, because subnets"},{"line_number":4017,"context_line":"        # were not actually created, so no ipam_subnet exists"},{"line_number":4018,"context_line":"        if cfg.CONF.ipam_driver is \u0027internal\u0027:"},{"line_number":4019,"context_line":"            self.skipTest(\"Skip test for ipam_pluggable driver\")"},{"line_number":4020,"context_line":"        # Test prefix update for IPv6 PD subnet"},{"line_number":4021,"context_line":"        # when the network has both IPv4 and IPv6(PD) subnets"},{"line_number":4022,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_c8f2969a","line":4019,"updated":"2015-11-04 16:19:17.000000000","message":"PD works with pluggable ipam, so if you\u0027re seeing failures here you should look at what changes need to be made to ipam_pluggable_backend.py, rather than skipping the test.","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"212c9af3306cb807e6e6853f366f704002b444f7","unresolved":false,"context_lines":[{"line_number":4016,"context_line":"        # this test is incompatible with pluggable ipam, because subnets"},{"line_number":4017,"context_line":"        # were not actually created, so no ipam_subnet exists"},{"line_number":4018,"context_line":"        if cfg.CONF.ipam_driver is \u0027internal\u0027:"},{"line_number":4019,"context_line":"            self.skipTest(\"Skip test for ipam_pluggable driver\")"},{"line_number":4020,"context_line":"        # Test prefix update for IPv6 PD subnet"},{"line_number":4021,"context_line":"        # when the network has both IPv4 and IPv6(PD) subnets"},{"line_number":4022,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_35e601b5","line":4019,"in_reply_to":"fa80f949_c8f2969a","updated":"2015-11-05 07:43:02.000000000","message":"Thanks John.\n\nIn module ipam_pluggable_backend.py, function \"_allocate_ips_for_port\" is missing calling _allocate_fixed_ips, after _test_fixed_ips_for_port returning fixed_ips. \n\nSo a call to \"_allocate_fixed_ips\" is missing in function \"_allocate_ips_for_port\" in module ipam_pluggable_backend.py, where the same is present in ipam_non_pluggable_backend.py","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"0fb5694b8e7018d68b40aa2a1363b302b08594bc","unresolved":false,"context_lines":[{"line_number":4040,"context_line":"                                                             port_mac))"},{"line_number":4041,"context_line":"                req \u003d self.new_show_request(\u0027ports\u0027,"},{"line_number":4042,"context_line":"                    port[\u0027port\u0027][\u0027id\u0027], self.fmt)"},{"line_number":4043,"context_line":"                sport \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":4044,"context_line":"                new_ips \u003d sport[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":4045,"context_line":"                self.assertEqual(len(ips), 2)"},{"line_number":4046,"context_line":"                for fip in ips:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_8ac5638f","line":4043,"updated":"2015-11-04 16:19:17.000000000","message":"sport isn\u0027t a very clear variable name. Perhaps new_port? updated_port?","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"212c9af3306cb807e6e6853f366f704002b444f7","unresolved":false,"context_lines":[{"line_number":4040,"context_line":"                                                             port_mac))"},{"line_number":4041,"context_line":"                req \u003d self.new_show_request(\u0027ports\u0027,"},{"line_number":4042,"context_line":"                    port[\u0027port\u0027][\u0027id\u0027], self.fmt)"},{"line_number":4043,"context_line":"                sport \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":4044,"context_line":"                new_ips \u003d sport[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":4045,"context_line":"                self.assertEqual(len(ips), 2)"},{"line_number":4046,"context_line":"                for fip in ips:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_f5ee398a","line":4043,"in_reply_to":"fa80f949_8ac5638f","updated":"2015-11-05 07:43:02.000000000","message":"sure, thanks John.","commit_id":"c5c1cad93e8620959f932a46d620c59fabaafd2a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e4c6143362a560e795e02624a16c0ed8124447b0","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            cidr \u003d None"},{"line_number":471,"context_line":"            gateway \u003d None"},{"line_number":472,"context_line":"            cfg.CONF.set_override(\u0027ipv6_pd_enabled\u0027, True)"},{"line_number":473,"context_line":"        return (self._make_subnet(self.fmt, network, gateway\u003dgateway,"},{"line_number":474,"context_line":"                                  cidr\u003dcidr, ip_version\u003d6,"},{"line_number":475,"context_line":"                                  ipv6_ra_mode\u003dra_addr_mode,"},{"line_number":476,"context_line":"                                  ipv6_address_mode\u003dra_addr_mode))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_7264f6e4","line":473,"updated":"2015-11-30 13:24:57.000000000","message":"why do you need the brackets?","commit_id":"0b37446c53a8669405933220db5d9d82d653f2f1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e4c6143362a560e795e02624a16c0ed8124447b0","unresolved":false,"context_lines":[{"line_number":4091,"context_line":"                updated_port \u003d self.deserialize(self.fmt,"},{"line_number":4092,"context_line":"                    req.get_response(self.api))"},{"line_number":4093,"context_line":"                new_ips \u003d updated_port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":4094,"context_line":"                self.assertEqual(len(ips), 2)"},{"line_number":4095,"context_line":"                for fip in ips:"},{"line_number":4096,"context_line":"                    if fip[\u0027subnet_id\u0027] \u003d\u003d subnet[\u0027subnet\u0027][\u0027id\u0027]:"},{"line_number":4097,"context_line":"                        fip[\u0027ip_address\u0027] \u003d eui_addr"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_b2e01efc","line":4094,"updated":"2015-11-30 13:24:57.000000000","message":"expected value should come first","commit_id":"0b37446c53a8669405933220db5d9d82d653f2f1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cc619763bfb0a0b4cc51e23ef01dbc620403eea4","unresolved":false,"context_lines":[{"line_number":4113,"context_line":"        # when the network has both IPv4 and IPv6(PD slaac) subnets"},{"line_number":4114,"context_line":"        with self.network() as network:"},{"line_number":4115,"context_line":"            with self.subnet(network\u003dnetwork):"},{"line_number":4116,"context_line":"                subnet \u003d self._make_v6_subnet(network,"},{"line_number":4117,"context_line":"                    constants.IPV6_SLAAC, ipv6_pd\u003dTrue)"},{"line_number":4118,"context_line":"                res \u003d self._create_port(self.fmt,"},{"line_number":4119,"context_line":"                    subnet[\u0027subnet\u0027][\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9f06a21a","line":4116,"updated":"2016-01-23 04:03:02.000000000","message":"nit: the style should be:\n subnet \u003d self._make_v6_subnet(\n     network, constants.IPV6_SLAAC, ipv6_pd\u003dTrue)","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cc619763bfb0a0b4cc51e23ef01dbc620403eea4","unresolved":false,"context_lines":[{"line_number":4141,"context_line":"                        fip[\u0027ip_address\u0027] \u003d eui_addr"},{"line_number":4142,"context_line":"                    self.assertIn(fip, new_ips)"},{"line_number":4143,"context_line":""},{"line_number":4144,"context_line":"    def test_subnet_update_ipv4_and_ipv6_pd_v6stateless_subnets(self):"},{"line_number":4145,"context_line":"        # Test prefix update for IPv6 PD subnet"},{"line_number":4146,"context_line":"        # when the network has both IPv4 and IPv6(PD dhcpv6 stateless) subnets"},{"line_number":4147,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9f1d4264","line":4144,"updated":"2016-01-23 04:03:02.000000000","message":"test_subnet_update_ipv4_and_ipv6_pd_slaac_subnets is very similar with this one, can you use a helper function to avoid code duplication.","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"3261c4dd815b44a9f3e625c6a2ad88eebb283547","unresolved":false,"context_lines":[{"line_number":4141,"context_line":"                        fip[\u0027ip_address\u0027] \u003d eui_addr"},{"line_number":4142,"context_line":"                    self.assertIn(fip, new_ips)"},{"line_number":4143,"context_line":""},{"line_number":4144,"context_line":"    def test_subnet_update_ipv4_and_ipv6_pd_v6stateless_subnets(self):"},{"line_number":4145,"context_line":"        # Test prefix update for IPv6 PD subnet"},{"line_number":4146,"context_line":"        # when the network has both IPv4 and IPv6(PD dhcpv6 stateless) subnets"},{"line_number":4147,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_b56f07fb","line":4144,"in_reply_to":"9a68dd71_9f1d4264","updated":"2016-01-23 07:09:45.000000000","message":"sure, thanks","commit_id":"c43b0d78ef9d119541ff112c14ce1481ae36a000"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1bf3433060d2a43588bc22680c50cface87c661b","unresolved":false,"context_lines":[{"line_number":1691,"context_line":"                                     \u0027ip_address\u0027: \u00272001::2\u0027}]}"},{"line_number":1692,"context_line":"            # pd is a auto address subnet, so can\u0027t have 2001::2"},{"line_number":1693,"context_line":"            res \u003d self._create_port(self.fmt, net_id\u003dnet_id, **kwargs)"},{"line_number":1694,"context_line":"            self.assertEqual(res.status_int,"},{"line_number":1695,"context_line":"                             webob.exc.HTTPClientError.code)"},{"line_number":1696,"context_line":""},{"line_number":1697,"context_line":"    def test_update_port_invalid_fixed_ip_address_v6_pd_slaac(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a57f1b5_bd31a50d","line":1694,"updated":"2016-02-10 14:12:44.000000000","message":"For all the asserts in tests added, the args should be ordered (expected, actual).","commit_id":"a312e916fca1f9af67610e670e2350c1794db1f5"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"13930134ca87daddcde5821cf16b3f36a90ac6e1","unresolved":false,"context_lines":[{"line_number":4262,"context_line":""},{"line_number":4263,"context_line":"                def mock_update_port(context, id, port):"},{"line_number":4264,"context_line":"                    self.assertEqual(port_dict[\u0027id\u0027], id)"},{"line_number":4265,"context_line":"                    self.assertEqual(fips, port[\u0027port\u0027][\u0027fixed_ips\u0027])"},{"line_number":4266,"context_line":"                    orig_update_port(context, id, port)"},{"line_number":4267,"context_line":""},{"line_number":4268,"context_line":"                update_port.side_effect \u003d mock_update_port"}],"source_content_type":"text/x-python","patch_set":16,"id":"7af24918_793a20cf","line":4265,"range":{"start_line":4265,"start_character":16,"end_line":4265,"end_character":69},"updated":"2016-03-01 13:39:53.000000000","message":"It\u0027s no big deal and it\u0027s your call. But I\u0027m thinking about mock.assert_called_with(). With that, no need to cache the original method, etc.","commit_id":"793436179b2ffc80feafd075865dc607cc58652a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"1e985300610d8ac568c5401cc28deb64ac9ec17c","unresolved":false,"context_lines":[{"line_number":4262,"context_line":""},{"line_number":4263,"context_line":"                def mock_update_port(context, id, port):"},{"line_number":4264,"context_line":"                    self.assertEqual(port_dict[\u0027id\u0027], id)"},{"line_number":4265,"context_line":"                    self.assertEqual(fips, port[\u0027port\u0027][\u0027fixed_ips\u0027])"},{"line_number":4266,"context_line":"                    orig_update_port(context, id, port)"},{"line_number":4267,"context_line":""},{"line_number":4268,"context_line":"                update_port.side_effect \u003d mock_update_port"}],"source_content_type":"text/x-python","patch_set":16,"id":"7af24918_94aa516f","line":4265,"range":{"start_line":4265,"start_character":16,"end_line":4265,"end_character":69},"in_reply_to":"7af24918_793a20cf","updated":"2016-03-01 13:58:58.000000000","message":"Thanks Robert.\nI can\u0027t use update_port.assert_called_with(id, port).\n\nWhen update_subnet calls update_port(id, port), it is adding some extra parameters to port like dns_name etc.. which are not available in the port I created in test(i.e L4253). So can\u0027t use update_port.assert_called_with(id, port) as port has some extra fields in the actual call which will be missing in expected port.\n\nAnd as this patch is modifying only fixed_ips, I am checking update_port is called with intended fixed_ips or not.","commit_id":"793436179b2ffc80feafd075865dc607cc58652a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d28ee927db9f842a2593fe3447285c4e35324b76","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            gateway \u003d None"},{"line_number":481,"context_line":"            subnetpool_id \u003d constants.IPV6_PD_POOL_ID"},{"line_number":482,"context_line":"            cfg.CONF.set_override(\u0027ipv6_pd_enabled\u0027, True)"},{"line_number":483,"context_line":"        return (self._make_subnet(self.fmt, network, gateway\u003dgateway,"},{"line_number":484,"context_line":"                                  subnetpool_id\u003dsubnetpool_id,"},{"line_number":485,"context_line":"                                  cidr\u003dcidr, ip_version\u003d6,"},{"line_number":486,"context_line":"                                  ipv6_ra_mode\u003dra_addr_mode,"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a122d0e_e90c7396","line":483,"updated":"2016-04-17 07:58:29.000000000","message":"nit the extra brackets are not required","commit_id":"70c3b66ac3f01fe907df08d2c50386a192e1d85c"}]}
