)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7d4566845a691c64f8f240d6408513ac2bcfd4c","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d sub_id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if (self.get_subnet("},{"line_number":1021,"context_line":"                        context, sub_id).get(\u0027segment_id\u0027) is not None and"},{"line_number":1022,"context_line":"                        len(fixed) \u003d\u003d 0):"},{"line_number":1023,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1024,"context_line":"                             \"only on subnet %(subnet)s which is associated \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_7a710b0c","line":1021,"updated":"2020-03-04 04:45:09.000000000","message":"I think it might be possible to pass the subnet object to this method, then use subnet.segment_id here.  See my comments below.","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"09b0e50d4bb384b22f58e97e7bc6bee93f58aa6b","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d sub_id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if (self.get_subnet("},{"line_number":1021,"context_line":"                        context, sub_id).get(\u0027segment_id\u0027) is not None and"},{"line_number":1022,"context_line":"                        len(fixed) \u003d\u003d 0):"},{"line_number":1023,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1024,"context_line":"                             \"only on subnet %(subnet)s which is associated \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_070d1fe7","line":1021,"in_reply_to":"1fa4df85_7a710b0c","updated":"2020-03-04 10:05:36.000000000","message":"Nice! Done.","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7d4566845a691c64f8f240d6408513ac2bcfd4c","unresolved":false,"context_lines":[{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if (self.get_subnet("},{"line_number":1021,"context_line":"                        context, sub_id).get(\u0027segment_id\u0027) is not None and"},{"line_number":1022,"context_line":"                        len(fixed) \u003d\u003d 0):"},{"line_number":1023,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1024,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1025,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_9afba777","line":1022,"updated":"2020-03-04 04:45:09.000000000","message":"I would put the len() check first, since it would save a lookup if not zero","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"09b0e50d4bb384b22f58e97e7bc6bee93f58aa6b","unresolved":false,"context_lines":[{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if (self.get_subnet("},{"line_number":1021,"context_line":"                        context, sub_id).get(\u0027segment_id\u0027) is not None and"},{"line_number":1022,"context_line":"                        len(fixed) \u003d\u003d 0):"},{"line_number":1023,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1024,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1025,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_71bff1af","line":1022,"in_reply_to":"1fa4df85_9afba777","updated":"2020-03-04 10:05:36.000000000","message":"Done","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7d4566845a691c64f8f240d6408513ac2bcfd4c","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"        # Do not allow a subnet to be deleted if a router is attached to it"},{"line_number":1053,"context_line":"        self._subnet_check_ip_allocations_internal_router_ports("},{"line_number":1054,"context_line":"                context, id)"},{"line_number":1055,"context_line":"        subnet \u003d self._get_subnet_object(context, id)"},{"line_number":1056,"context_line":"        is_auto_addr_subnet \u003d ipv6_utils.is_auto_address_subnet(subnet)"},{"line_number":1057,"context_line":"        if not is_auto_addr_subnet:"},{"line_number":1058,"context_line":"            # we only automatically remove IP addresses from user ports if"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_9a572759","line":1055,"updated":"2020-03-04 04:45:09.000000000","message":"This was already done in the caller, can be removed if passed.","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7d4566845a691c64f8f240d6408513ac2bcfd4c","unresolved":false,"context_lines":[{"line_number":1063,"context_line":"        port_ids_on_net \u003d [ipal.port_id for ipal in net_allocs]"},{"line_number":1064,"context_line":"        for port_id in port_ids_on_net:"},{"line_number":1065,"context_line":"            self._remove_subnet_from_port(context, id, port_id,"},{"line_number":1066,"context_line":"                                          auto_subnet\u003dis_auto_addr_subnet)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1069,"context_line":"    def delete_subnet(self, context, id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_fa5e5b74","line":1066,"updated":"2020-03-04 04:45:09.000000000","message":"subnet could then be passed here","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7d4566845a691c64f8f240d6408513ac2bcfd4c","unresolved":false,"context_lines":[{"line_number":1071,"context_line":"        # Make sure the subnet isn\u0027t used by other resources"},{"line_number":1072,"context_line":"        _check_subnet_not_used(context, id)"},{"line_number":1073,"context_line":"        subnet \u003d self._get_subnet_object(context, id)"},{"line_number":1074,"context_line":"        self._remove_subnet_ip_allocations_from_ports(context, id)"},{"line_number":1075,"context_line":"        self._delete_subnet(context, subnet)"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    def _delete_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_3a695320","line":1074,"updated":"2020-03-04 04:45:09.000000000","message":"You can pass subnet here","commit_id":"694eb26e4e42d81861d4c633ca5ef832fd98b199"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8d37608587f2b5cdcb5bfa7a56e65a05820b424f","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"            fixed \u003d [f for f in self.get_port(context, port_id)[\u0027fixed_ips\u0027]"},{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d subnet.id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if len(fixed) \u003d\u003d 0 and subnet.segment_id is not None:"},{"line_number":1021,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1022,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1023,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_5a168557","line":1020,"updated":"2020-03-04 16:07:30.000000000","message":"So my only question here now is does this check belong here?  Or should it be in the segment ID extension precommit delete receiver?  I don\u0027t see any other occurrence of segment_id in this file.","commit_id":"da6777d882f4fd34b04c8f3d34573d7259202615"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"d6ddc43724574cc30ece691c611610aa3fd4f444","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"            fixed \u003d [f for f in self.get_port(context, port_id)[\u0027fixed_ips\u0027]"},{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d subnet.id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if len(fixed) \u003d\u003d 0 and subnet.segment_id is not None:"},{"line_number":1021,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1022,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1023,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_eb49a5b6","line":1020,"in_reply_to":"1fa4df85_5a168557","updated":"2020-03-04 18:14:14.000000000","message":"hm, it would have to be on port update precommit. No?\n\nSo in: neutron/services/segments/db.py something like?\n\n  def _remove_subnet_from_port(resource, event, trigger,\n                               context, port_id)\n      [ ... some code ... ]\n\n  def subscribe():\n      registry.subscribe(_remove_subnet_from_port,\n                         resources.PORT,\n                         events.PRECOMMIT_UPDATE)","commit_id":"da6777d882f4fd34b04c8f3d34573d7259202615"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ffcfcb3d8ae8c12780b3f63e54fda65eb15b4792","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"            fixed \u003d [f for f in self.get_port(context, port_id)[\u0027fixed_ips\u0027]"},{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d subnet.id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if len(fixed) \u003d\u003d 0 and subnet.segment_id is not None:"},{"line_number":1021,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1022,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1023,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_23a281fd","line":1020,"in_reply_to":"1fa4df85_c66aa07f","updated":"2020-03-13 19:42:01.000000000","message":"Harald - yes, I guess it would have to be on both.  I had added Slawek to get his opinion as well.","commit_id":"da6777d882f4fd34b04c8f3d34573d7259202615"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"949a4b548ed3309c7f2602fad27aa8d5ce09ec11","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"            fixed \u003d [f for f in self.get_port(context, port_id)[\u0027fixed_ips\u0027]"},{"line_number":1018,"context_line":"                     if f[\u0027subnet_id\u0027] !\u003d subnet.id]"},{"line_number":1019,"context_line":"            if auto_subnet:"},{"line_number":1020,"context_line":"                if len(fixed) \u003d\u003d 0 and subnet.segment_id is not None:"},{"line_number":1021,"context_line":"                    LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":1022,"context_line":"                             \"only on subnet %(subnet)s which is associated \""},{"line_number":1023,"context_line":"                             \"with a segment, cannot delete\","}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_c66aa07f","line":1020,"in_reply_to":"1fa4df85_eb49a5b6","updated":"2020-03-04 18:47:38.000000000","message":"errr, it can be on resources.SUBNET PRECOMMIT_DELETE as well.\nI can start looking into doing it in the segment extension tomorrow.","commit_id":"da6777d882f4fd34b04c8f3d34573d7259202615"}],"neutron/services/segments/plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d19827bcdf65af505212af5180ad0ad8d874a082","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"                LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":161,"context_line":"                         \"only on subnet %(subnet)s which is associated with \""},{"line_number":162,"context_line":"                         \"a segment, cannot delete\","},{"line_number":163,"context_line":"                         {\u0027port_id\u0027: port_id, \u0027subnet\u0027: subnet.id})"},{"line_number":164,"context_line":"                raise n_exc.SubnetInUse(subnet_id\u003dsubnet.id)"},{"line_number":165,"context_line":"            except n_exc.PortNotFound:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_5f21f39e","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":35},"updated":"2020-03-16 09:31:11.000000000","message":"nitty nit: maybe You could add segment id here also?","commit_id":"ecd7e1eca1b0571b0729a4d4e908211bc58f97e0"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b0a9f559abe54ad1ebe779190ea539e19232069e","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"                LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":161,"context_line":"                         \"only on subnet %(subnet)s which is associated with \""},{"line_number":162,"context_line":"                         \"a segment, cannot delete\","},{"line_number":163,"context_line":"                         {\u0027port_id\u0027: port_id, \u0027subnet\u0027: subnet.id})"},{"line_number":164,"context_line":"                raise n_exc.SubnetInUse(subnet_id\u003dsubnet.id)"},{"line_number":165,"context_line":"            except n_exc.PortNotFound:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_bef809c4","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":35},"in_reply_to":"1fa4df85_5f21f39e","updated":"2020-03-17 20:54:47.000000000","message":"Since there is a merge conflict, I will address this with the rebase.","commit_id":"ecd7e1eca1b0571b0729a4d4e908211bc58f97e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"4b32b376179e3184b770a19703020fe623180956","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"                LOG.info(\"Found port %(port_id)s, with IP auto-allocation \""},{"line_number":161,"context_line":"                         \"only on subnet %(subnet)s which is associated with \""},{"line_number":162,"context_line":"                         \"a segment, cannot delete\","},{"line_number":163,"context_line":"                         {\u0027port_id\u0027: port_id, \u0027subnet\u0027: subnet.id})"},{"line_number":164,"context_line":"                raise n_exc.SubnetInUse(subnet_id\u003dsubnet.id)"},{"line_number":165,"context_line":"            except n_exc.PortNotFound:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_5313f45c","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":35},"in_reply_to":"1fa4df85_bef809c4","updated":"2020-03-19 10:10:36.000000000","message":"Thanks :)","commit_id":"ecd7e1eca1b0571b0729a4d4e908211bc58f97e0"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":21798,"name":"Bernard Cafarelli","email":"bcafarel@redhat.com","username":"bcafarel"},"change_message_id":"bbbb0fbe67fd04d160666605e9dca7cd938be7f7","unresolved":false,"context_lines":[{"line_number":1795,"context_line":"        (network, segment_a, segment_b, subnet_a0, subnet_a1, subnet_b0,"},{"line_number":1796,"context_line":"         subnet_b1) \u003d self._create_net_two_segments_four_slaac_subnets()"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        # Create a two ports, port_a with subnet_a0 in fixed_ips and port_b"},{"line_number":1799,"context_line":"        # with subnet_b0 in fixed_ips"},{"line_number":1800,"context_line":"        port_a \u003d self._create_port_and_show("},{"line_number":1801,"context_line":"            network, fixed_ips\u003d[{\u0027subnet_id\u0027: subnet_a0[\u0027subnet\u0027][\u0027id\u0027]}])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1fa4df85_98a90126","line":1798,"range":{"start_line":1798,"start_character":17,"end_line":1798,"end_character":19},"updated":"2020-03-11 14:45:14.000000000","message":"Sorry I just note nits: similar extra \"a \" as in subnet create test","commit_id":"8f96de06d49c91fb623c75053d3c1862ee53b5ba"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b2f7864ec19fb53538dbc253be2b9d9f84467c3d","unresolved":false,"context_lines":[{"line_number":1795,"context_line":"        (network, segment_a, segment_b, subnet_a0, subnet_a1, subnet_b0,"},{"line_number":1796,"context_line":"         subnet_b1) \u003d self._create_net_two_segments_four_slaac_subnets()"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        # Create a two ports, port_a with subnet_a0 in fixed_ips and port_b"},{"line_number":1799,"context_line":"        # with subnet_b0 in fixed_ips"},{"line_number":1800,"context_line":"        port_a \u003d self._create_port_and_show("},{"line_number":1801,"context_line":"            network, fixed_ips\u003d[{\u0027subnet_id\u0027: subnet_a0[\u0027subnet\u0027][\u0027id\u0027]}])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1fa4df85_81a97f91","line":1798,"range":{"start_line":1798,"start_character":17,"end_line":1798,"end_character":19},"in_reply_to":"1fa4df85_98a90126","updated":"2020-03-12 10:23:31.000000000","message":"Done","commit_id":"8f96de06d49c91fb623c75053d3c1862ee53b5ba"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"2d10383f93c31e96a70b96582fba2dfc8affcdb3","unresolved":false,"context_lines":[{"line_number":1674,"context_line":"        (network, segment_a, segment_b, subnet_a0, subnet_a1, subnet_b0,"},{"line_number":1675,"context_line":"         subnet_b1) \u003d self._create_net_two_segments_four_slaac_subnets()"},{"line_number":1676,"context_line":""},{"line_number":1677,"context_line":"        # Create two ports, port_a with subnet_a0 in fixed_ips and port_b"},{"line_number":1678,"context_line":"        # with subnet_b0 in fixed_ips"},{"line_number":1679,"context_line":"        port_a \u003d self._create_port_and_show("},{"line_number":1680,"context_line":"            network, fixed_ips\u003d[{\u0027subnet_id\u0027: subnet_a0[\u0027subnet\u0027][\u0027id\u0027]}])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_c1e77746","line":1677,"updated":"2020-03-12 10:11:43.000000000","message":"ooops, I edited the wrong line in the gerrit editor. I will rebase it instead.","commit_id":"ccf5e351fb1ac199db7256b04912d4266521d53b"}]}
