)]}'
{"neutron/extensions/subnetpool_prefix_ops.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"26b0bef3888b6c80b212bd5da819eee30f5ea13c","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import webob.exc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron_lib.api.definitions import subnetpool as subnetpool_def"},{"line_number":21,"context_line":"from neutron_lib.api.definitions import subnetpool_prefix_ops \\"},{"line_number":22,"context_line":"    as subnetpool_prefix_ops_def"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_417ae6b9","line":19,"updated":"2019-05-30 07:31:58.000000000","message":"nitty nit: not necessary 2 empty lines, I think that webob should be in section below, together with other 3rd party libs","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7f12ee095f86af836c5b8f44d97f1fc375bbf16d","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import webob.exc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron_lib.api.definitions import subnetpool as subnetpool_def"},{"line_number":21,"context_line":"from neutron_lib.api.definitions import subnetpool_prefix_ops \\"},{"line_number":22,"context_line":"    as subnetpool_prefix_ops_def"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_b21f6b06","line":19,"in_reply_to":"bfb3d3c7_417ae6b9","updated":"2019-05-30 13:21:20.000000000","message":"Oops, didn\u0027t notice the extra lines. I\u0027ll move the webob import","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c5bd92c3ae75b9cc69e105df8039003fbffb12a","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2445,"context_line":"    def add_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2446,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2447,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2448,"context_line":"                                                    context, id\u003dsubnetpool_id)"},{"line_number":2449,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes"},{"line_number":2450,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":2451,"context_line":"            self.update_subnetpool(context, subnetpool_id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_902544b1","line":2448,"range":{"start_line":2447,"start_character":12,"end_line":2448,"end_character":78},"updated":"2019-04-01 08:33:36.000000000","message":"You should probably raise SubnetPoolNotFound exceptionalities if this will not be found in DB, right?","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c5bd92c3ae75b9cc69e105df8039003fbffb12a","unresolved":false,"context_lines":[{"line_number":2445,"context_line":"    def add_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2446,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2447,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2448,"context_line":"                                                    context, id\u003dsubnetpool_id)"},{"line_number":2449,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes"},{"line_number":2450,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":2451,"context_line":"            self.update_subnetpool(context, subnetpool_id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_5006fc1e","line":2448,"updated":"2019-04-01 08:33:36.000000000","message":"nitty nit: this indentation looks odd IMO","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"243172c5f17726d74deb305812033911a647a402","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2445,"context_line":"    def add_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2446,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2447,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2448,"context_line":"                                                    context, id\u003dsubnetpool_id)"},{"line_number":2449,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes"},{"line_number":2450,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":2451,"context_line":"            self.update_subnetpool(context, subnetpool_id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_ddd4404a","line":2448,"range":{"start_line":2447,"start_character":12,"end_line":2448,"end_character":78},"in_reply_to":"5fc1f717_902544b1","updated":"2019-04-01 12:45:39.000000000","message":"Yep, that\u0027s an oversight on my part. I\u0027ll re-work the indentation too","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2013a071f36d8d535beb7ab4966087849fb7e24","unresolved":false,"context_lines":[{"line_number":2463,"context_line":"            if all_prefix_set.isdisjoint(removal_prefix_set):"},{"line_number":2464,"context_line":"                # The prefixes requested for removal are not in the prefix"},{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_6dc9f523","line":2466,"updated":"2019-03-29 12:46:23.000000000","message":"nit: nothing is going to be modified in the DB, but maybe an exception could be useful for the user.\n\nJust a nit.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"330a25b11dae8fb34db3c5d2e0a48cf99c1fe387","unresolved":false,"context_lines":[{"line_number":2463,"context_line":"            if all_prefix_set.isdisjoint(removal_prefix_set):"},{"line_number":2464,"context_line":"                # The prefixes requested for removal are not in the prefix"},{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_0416faf2","line":2466,"in_reply_to":"5fc1f717_1bf73d8f","updated":"2019-03-31 16:52:39.000000000","message":"Yeah, the openstack client won\u0027t read the payload. However, there actually are users who interact with the API\u0027s through tools like terraform or home-grown tooling that might make use of it.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1cf8257b5604c350378914420c5fb9007a000356","unresolved":false,"context_lines":[{"line_number":2463,"context_line":"            if all_prefix_set.isdisjoint(removal_prefix_set):"},{"line_number":2464,"context_line":"                # The prefixes requested for removal are not in the prefix"},{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_1bf73d8f","line":2466,"in_reply_to":"5fc1f717_534a9c5b","updated":"2019-03-30 18:45:13.000000000","message":"I don\u0027t know if the clients (e.g.: OSClient) will read this payload. Anyway, this is just a nit.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"bb10718226acb87f5a9657ef97565c24cae68454","unresolved":false,"context_lines":[{"line_number":2463,"context_line":"            if all_prefix_set.isdisjoint(removal_prefix_set):"},{"line_number":2464,"context_line":"                # The prefixes requested for removal are not in the prefix"},{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_534a9c5b","line":2466,"in_reply_to":"5fc1f717_6dc9f523","updated":"2019-03-29 14:12:02.000000000","message":"I contemplated raising an exception here, but subnet pool prefixes have operate off of set semantics so it feels more natural to me to simply make this case a no-op. I feel very strongly there\u0027s no need to raise an exception. However, I could be persuaded to make the API return a payload containing the subnetpool resource so that clients can compare the state of prefix list against the request.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c5bd92c3ae75b9cc69e105df8039003fbffb12a","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"},{"line_number":2470,"context_line":"            allocated_prefix_set \u003d netaddr.IPSet([x.cidr for x in subnets])"},{"line_number":2471,"context_line":""},{"line_number":2472,"context_line":"            if not allocated_prefix_set.isdisjoint(removal_prefix_set):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_d032ecf2","line":2469,"range":{"start_line":2468,"start_character":12,"end_line":2469,"end_character":53},"updated":"2019-04-01 08:33:36.000000000","message":"shouldn\u0027t You check if You found any subnets?","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"243172c5f17726d74deb305812033911a647a402","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"                # list making this a no-op, so simply return."},{"line_number":2466,"context_line":"                return"},{"line_number":2467,"context_line":""},{"line_number":2468,"context_line":"            subnets \u003d subnet_obj.Subnet.get_objects("},{"line_number":2469,"context_line":"                context, subnetpool_id\u003dsubnetpool_id)"},{"line_number":2470,"context_line":"            allocated_prefix_set \u003d netaddr.IPSet([x.cidr for x in subnets])"},{"line_number":2471,"context_line":""},{"line_number":2472,"context_line":"            if not allocated_prefix_set.isdisjoint(removal_prefix_set):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_3d71c478","line":2469,"range":{"start_line":2468,"start_character":12,"end_line":2469,"end_character":53},"in_reply_to":"5fc1f717_d032ecf2","updated":"2019-04-01 12:45:39.000000000","message":"This just returns an empty list https://github.com/openstack/neutron/blob/master/neutron/objects/base.py#L634. It\u0027s fine to deal with an empty list, that just means that no prefixes have been allocated and they can be removed at will.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"bb1c63f4184c105825a0df02d3f2ea406df517b7","unresolved":false,"context_lines":[{"line_number":2442,"context_line":"                                host\u003dhost)"},{"line_number":2443,"context_line":""},{"line_number":2444,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2445,"context_line":"    def add_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2446,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2447,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2448,"context_line":"                context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_50c3498b","line":2445,"range":{"start_line":2445,"start_character":51,"end_line":2445,"end_character":59},"updated":"2019-04-02 02:52:59.000000000","message":"According to the api-ref [1], \u0027prefixes\u0027 should be in this form:\n\n  {\n    \"prefixes\": [\"192.168.0.0/24\", \"192.168.1.0/24\", \"172.16.0.0/21\"]\n  }\n\nbut it seems this method expect \u0027prefixes\u0027 to be a list. Either the API ref or this method needs to be updated.\n\nThe same applies to \u0027remove_prefixes\u0027 below.\n\n[1] https://developer.openstack.org/api-ref/network/v2/?expanded\u003dadd-prefixes-detail,create-subnet-pool-detail#add-prefixes","commit_id":"175b51da8445905b51c6ae83b1b1a61b52c94161"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d40290db6d27a73bce2de7a7b8561b8752331774","unresolved":false,"context_lines":[{"line_number":2442,"context_line":"                                host\u003dhost)"},{"line_number":2443,"context_line":""},{"line_number":2444,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2445,"context_line":"    def add_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2446,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2447,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2448,"context_line":"                context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_3326bebc","line":2445,"range":{"start_line":2445,"start_character":51,"end_line":2445,"end_character":59},"in_reply_to":"5fc1f717_50c3498b","updated":"2019-04-02 13:16:58.000000000","message":"This doesn\u0027t handle the correct input. I\u0027ll fix that. I also failed to consult the API docs (that I wrote!) on this for the return value, thanks for pointing that out.","commit_id":"175b51da8445905b51c6ae83b1b1a61b52c94161"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"bb1c63f4184c105825a0df02d3f2ea406df517b7","unresolved":false,"context_lines":[{"line_number":2452,"context_line":""},{"line_number":2453,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes"},{"line_number":2454,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":2455,"context_line":"            self.update_subnetpool(context, subnetpool_id, sp_update_req)"},{"line_number":2456,"context_line":""},{"line_number":2457,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2458,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_d03419af","line":2455,"updated":"2019-04-02 02:52:59.000000000","message":"According to the apiref [1], this method should return a json response, but this method returns null. Either the API ref or this method needs to be updated.\n\nThe same applies to \u0027remove_prefixes\u0027 below.\n\n[1] https://developer.openstack.org/api-ref/network/v2/?expanded\u003dadd-prefixes-detail,create-subnet-pool-detail#add-prefixes","commit_id":"175b51da8445905b51c6ae83b1b1a61b52c94161"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d40290db6d27a73bce2de7a7b8561b8752331774","unresolved":false,"context_lines":[{"line_number":2452,"context_line":""},{"line_number":2453,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes"},{"line_number":2454,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":2455,"context_line":"            self.update_subnetpool(context, subnetpool_id, sp_update_req)"},{"line_number":2456,"context_line":""},{"line_number":2457,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2458,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_b3394ed9","line":2455,"in_reply_to":"5fc1f717_d03419af","updated":"2019-04-02 13:16:58.000000000","message":"Same as above, will fix.","commit_id":"175b51da8445905b51c6ae83b1b1a61b52c94161"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"f8cf6ef5adfc6c7ce91d02609536318c8ea3c8f9","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2542,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2543,"context_line":"        prefixes \u003d prefixes.get(\u0027prefixes\u0027, [])"},{"line_number":2544,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2545,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2546,"context_line":"                                                    context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfb3d3c7_1ccbc5a5","line":2543,"range":{"start_line":2543,"start_character":28,"end_line":2543,"end_character":31},"updated":"2019-05-16 22:12:31.000000000","message":"I got a 500 error if I passed a list in the request body: http://paste.openstack.org/show/751491/ .\n\nWe can make the code more robust to check if \u0027prefixes\u0027 is actually a dict in before. See here as an example: https://github.com/openstack/neutron/blob/master/neutron/pecan_wsgi/hooks/body_validation.py#L41 .\n\nThe same applies to add_prefixes above.","commit_id":"81cd7598bc0f06862200e185261ac404e030ea38"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"dfa4f7a5a22e27b0b8bd8f712b0d0b2beb8d3a18","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2542,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2543,"context_line":"        prefixes \u003d prefixes.get(\u0027prefixes\u0027, [])"},{"line_number":2544,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2545,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2546,"context_line":"                                                    context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfb3d3c7_20ae90e7","line":2543,"range":{"start_line":2543,"start_character":28,"end_line":2543,"end_character":31},"in_reply_to":"bfb3d3c7_1ccbc5a5","updated":"2019-05-17 16:10:21.000000000","message":"Interesting, I wonder if a unit test to check non-list input is handled gracefully would be in order.","commit_id":"81cd7598bc0f06862200e185261ac404e030ea38"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"712e991f02956e2c840f0d9a4713fbbad976c999","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2542,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2543,"context_line":"        prefixes \u003d prefixes.get(\u0027prefixes\u0027, [])"},{"line_number":2544,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2545,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2546,"context_line":"                                                    context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfb3d3c7_b9737d80","line":2543,"range":{"start_line":2543,"start_character":28,"end_line":2543,"end_character":31},"in_reply_to":"bfb3d3c7_20ae90e7","updated":"2019-05-20 19:32:58.000000000","message":"Yeah, I think that\u0027s a good idea.","commit_id":"81cd7598bc0f06862200e185261ac404e030ea38"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"1a69aebd48f57d6c81f1769964436bd85f270b4b","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2542,"context_line":"    def remove_prefixes(self, context, subnetpool_id, prefixes):"},{"line_number":2543,"context_line":"        prefixes \u003d prefixes.get(\u0027prefixes\u0027, [])"},{"line_number":2544,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2545,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2546,"context_line":"                                                    context, id\u003dsubnetpool_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfb3d3c7_bb63ed41","line":2543,"range":{"start_line":2543,"start_character":28,"end_line":2543,"end_character":31},"in_reply_to":"bfb3d3c7_b9737d80","updated":"2019-05-28 21:24:33.000000000","message":"Done","commit_id":"81cd7598bc0f06862200e185261ac404e030ea38"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"26b0bef3888b6c80b212bd5da819eee30f5ea13c","unresolved":false,"context_lines":[{"line_number":2547,"context_line":"        prefixes \u003d subnetpool_prefix_ops.get_operation_request_body(body)"},{"line_number":2548,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2549,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2550,"context_line":"                                                    context, id\u003dsubnetpool_id)"},{"line_number":2551,"context_line":"            if not subnetpool:"},{"line_number":2552,"context_line":"                raise exc.SubnetPoolNotFound(subnetpool_id\u003did)"},{"line_number":2553,"context_line":"            if len(prefixes) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_e133da12","line":2550,"range":{"start_line":2550,"start_character":52,"end_line":2550,"end_character":59},"updated":"2019-05-30 07:31:58.000000000","message":"nitty nit: this indentation looks a bit odd for me. Can\u0027t \"context\" go to line above or can it maybe be like in L2531-2532? :)","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7f12ee095f86af836c5b8f44d97f1fc375bbf16d","unresolved":false,"context_lines":[{"line_number":2547,"context_line":"        prefixes \u003d subnetpool_prefix_ops.get_operation_request_body(body)"},{"line_number":2548,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2549,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("},{"line_number":2550,"context_line":"                                                    context, id\u003dsubnetpool_id)"},{"line_number":2551,"context_line":"            if not subnetpool:"},{"line_number":2552,"context_line":"                raise exc.SubnetPoolNotFound(subnetpool_id\u003did)"},{"line_number":2553,"context_line":"            if len(prefixes) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_92fb47bf","line":2550,"range":{"start_line":2550,"start_character":52,"end_line":2550,"end_character":59},"in_reply_to":"bfb3d3c7_e133da12","updated":"2019-05-30 13:21:20.000000000","message":"I\u0027ll fix this, it does look a bit goofy","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"26b0bef3888b6c80b212bd5da819eee30f5ea13c","unresolved":false,"context_lines":[{"line_number":2570,"context_line":"                # been allocated by a real subnet, raise an exception to"},{"line_number":2571,"context_line":"                # indicate this."},{"line_number":2572,"context_line":"                msg \u003d _(\"One or more the prefixes to be removed is in use\""},{"line_number":2573,"context_line":"                        \" by a subnet.\")"},{"line_number":2574,"context_line":"                raise exc.IllegalSubnetPoolPrefixUpdate(msg\u003dmsg)"},{"line_number":2575,"context_line":""},{"line_number":2576,"context_line":"            new_prefixes \u003d all_prefix_set.difference(removal_prefix_set)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_810bfe27","line":2573,"range":{"start_line":2573,"start_character":25,"end_line":2573,"end_character":26},"updated":"2019-05-30 07:31:58.000000000","message":"another nitty nit: our usual convention is to make such space as last char in line above","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"9283f35f1f39ee4efcabb5f0ad9fb4dd6e117f46","unresolved":false,"context_lines":[{"line_number":2531,"context_line":"        ports \u003d ports_obj.Port.get_ports_by_vnic_type_and_host("},{"line_number":2532,"context_line":"            context, vnic_type, host)"},{"line_number":2533,"context_line":"        return [self._make_port_dict(port.db_obj) for port in ports]"},{"line_number":2534,"context_line":""},{"line_number":2535,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2536,"context_line":"    def add_prefixes(self, context, subnetpool_id, body):"},{"line_number":2537,"context_line":"        prefixes \u003d subnetpool_prefix_ops.get_operation_request_body(body)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_6eca994e","line":2534,"updated":"2019-06-11 23:22:53.000000000","message":"The rest of the code for subnet pools is in https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py. By implementing this extension here, we are making the decision to make it available to ML2 based drivers, whereas the rest of the code can be used by a wider range of drivers and plugins. What is the reason we are limiting this to ML2?","commit_id":"84d02cd93cfa584fb7ece8257b0fadc2d3e1ebb9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"160dcb455d219acd24f7def3ac28f0e83f64da15","unresolved":false,"context_lines":[{"line_number":2531,"context_line":"        ports \u003d ports_obj.Port.get_ports_by_vnic_type_and_host("},{"line_number":2532,"context_line":"            context, vnic_type, host)"},{"line_number":2533,"context_line":"        return [self._make_port_dict(port.db_obj) for port in ports]"},{"line_number":2534,"context_line":""},{"line_number":2535,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2536,"context_line":"    def add_prefixes(self, context, subnetpool_id, body):"},{"line_number":2537,"context_line":"        prefixes \u003d subnetpool_prefix_ops.get_operation_request_body(body)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_860b1228","line":2534,"in_reply_to":"9fb8cfa7_6eca994e","updated":"2019-06-13 14:54:52.000000000","message":"This is an oversight. You are correct, this should be moved to db_base_plugin_v2. There\u0027s nothing ML2-specific about this.","commit_id":"84d02cd93cfa584fb7ece8257b0fadc2d3e1ebb9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e5a17c31f97685e09176edebe1a75935a2582ef7","unresolved":false,"context_lines":[{"line_number":2551,"context_line":"            return {\u0027prefixes\u0027: sp[\u0027prefixes\u0027]}"},{"line_number":2552,"context_line":""},{"line_number":2553,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2554,"context_line":"    def remove_prefixes(self, context, subnetpool_id, body):"},{"line_number":2555,"context_line":"        prefixes \u003d subnetpool_prefix_ops.get_operation_request_body(body)"},{"line_number":2556,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":2557,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object("}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_f728da86","line":2554,"range":{"start_line":2554,"start_character":8,"end_line":2554,"end_character":23},"updated":"2019-06-07 15:01:43.000000000","message":"None exists prefixes can be accepted and no explicitly tips. \n\n[yulong@controller neutron]$ curl -g -i -X PUT http://10.0.5.10:9696/v2.0/subnetpools/c4384d48-f4c9-4fc0-b39e-ecb33bb65461/remove_prefixes -H \"Accept: application/json\" -H \"User-Agent: openstacksdk/0.28.0 keystoneauth1/3.14.0 python-requests/2.22.0 CPython/2.7.5\" -H \"X-Auth-Token: gAAAAABc-nn7ryl9pdPnUfl0YnpcjafvS09zNx1RIZfqd-d4Ht3xr3rTjpyHNf-KwCoI_JECtYd5mvRJQvGbKQsSUvn-HLa1y3C9Jw8ZdYhXIR8AcnKfnffw0_gzfUBKLvkwY2G7weA2MkxoDBpGAsd0A9V-Cg_s5iCo5QjDXNRlN0uHOfN8Xq0\" -d \u0027{\"prefixes\": [\"192.168.3.0/24\", \"192.168.2.0/24\"]}\u0027\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Length: 32\nX-Openstack-Request-Id: req-cc0d4c80-55d4-4bdf-87f1-9fbd7bc14c42\nDate: Fri, 07 Jun 2019 14:57:49 GMT\n\n{\"prefixes\": [\"192.168.1.0/24\"]}[yulong@controller neutron]$ \n[yulong@controller neutron]$ \n[yulong@controller neutron]$ \n[yulong@controller neutron]$ curl -g -i -X PUT http://10.0.5.10:9696/v2.0/subnetpools/c4384d48-f4c9-4fc0-b39e-ecb33bb65461/remove_prefixes -H \"Accept: application/json\" -H \"User-Agent: openstacksdk/0.28.0 keystoneauth1/3.14.0 python-requests/2.22.0 CPython/2.7.5\" -H \"X-Auth-Token: gAAAAABc-nn7ryl9pdPnUfl0YnpcjafvS09zNx1RIZfqd-d4Ht3xr3rTjpyHNf-KwCoI_JECtYd5mvRJQvGbKQsSUvn-HLa1y3C9Jw8ZdYhXIR8AcnKfnffw0_gzfUBKLvkwY2G7weA2MkxoDBpGAsd0A9V-Cg_s5iCo5QjDXNRlN0uHOfN8Xq0\" -d \u0027{\"prefixes\": [\"192.168.4.0/24\", \"192.168.5.0/24\"]}\u0027\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Length: 32\nX-Openstack-Request-Id: req-86f15fa2-9ca7-4273-aeb8-d420a24b1f44\nDate: Fri, 07 Jun 2019 14:58:39 GMT\n\n{\"prefixes\": [\"192.168.1.0/24\"]}","commit_id":"84d02cd93cfa584fb7ece8257b0fadc2d3e1ebb9"}],"neutron/tests/unit/extensions/test_subnetpool_prefix_ops.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2013a071f36d8d535beb7ab4966087849fb7e24","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SubnetpoolPrefixOpsTesBase(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @contextlib.contextmanager"},{"line_number":33,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"},{"line_number":34,"context_line":"                      admin\u003dTrue, name\u003d\u0027test-scope\u0027, is_default_pool\u003dFalse,"},{"line_number":35,"context_line":"                      tenant_id\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_0de711af","line":32,"updated":"2019-03-29 12:46:23.000000000","message":"nit: maybe you can move \"address_scope\" to test_db_base_plugin_v2, in order to be used by any other test.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"bb10718226acb87f5a9657ef97565c24cae68454","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SubnetpoolPrefixOpsTesBase(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @contextlib.contextmanager"},{"line_number":33,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"},{"line_number":34,"context_line":"                      admin\u003dTrue, name\u003d\u0027test-scope\u0027, is_default_pool\u003dFalse,"},{"line_number":35,"context_line":"                      tenant_id\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_1359748d","line":32,"in_reply_to":"5fc1f717_0de711af","updated":"2019-03-29 14:12:02.000000000","message":"There\u0027s actually already a generator for this here [1]. test_db_base_plugin_v2 is so bloated these days, I\u0027m wondering if there\u0027s some refactoring to be done and a new pattern to begin implementing so we can skinny down what is required for tests. This probably should move to a common place where it can be re-used though.\n\n[1]https://github.com/openstack/neutron/blob/master/neutron/tests/unit/extensions/test_subnet_onboard.py#L34","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1cf8257b5604c350378914420c5fb9007a000356","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SubnetpoolPrefixOpsTesBase(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @contextlib.contextmanager"},{"line_number":33,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"},{"line_number":34,"context_line":"                      admin\u003dTrue, name\u003d\u0027test-scope\u0027, is_default_pool\u003dFalse,"},{"line_number":35,"context_line":"                      tenant_id\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_bb086991","line":32,"in_reply_to":"5fc1f717_1359748d","updated":"2019-03-30 18:45:13.000000000","message":"Yes, this refactor can be done in follow-up patches.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2013a071f36d8d535beb7ab4966087849fb7e24","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":40,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":41,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":42,"context_line":"            yield self.driver.create_address_scope("},{"line_number":43,"context_line":"                self.context,"},{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_6dc015e2","line":42,"updated":"2019-03-29 12:46:23.000000000","message":"Why instead of calling directly to the driver you don\u0027t create a request, like every other resource generator?","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1cf8257b5604c350378914420c5fb9007a000356","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":40,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":41,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":42,"context_line":"            yield self.driver.create_address_scope("},{"line_number":43,"context_line":"                self.context,"},{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_dbd775ee","line":42,"in_reply_to":"5fc1f717_53b93cea","updated":"2019-03-30 18:45:13.000000000","message":"I agree with the idea of, in unit tests, to directly call to the driver instead of hiding the DB operation with a request call.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"bb10718226acb87f5a9657ef97565c24cae68454","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":40,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":41,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":42,"context_line":"            yield self.driver.create_address_scope("},{"line_number":43,"context_line":"                self.context,"},{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_53b93cea","line":42,"in_reply_to":"5fc1f717_6dc015e2","updated":"2019-03-29 14:12:02.000000000","message":"This is what was done with subnet onboard [1][2]. It\u0027s not without precedent. I actually prefer this way because it is less opaque and the DB session is more explicit. I also went this route because of some struggles with the new DB enginefacade. In short, when you use the existing resource generators in test_db_base_plugin_v2 a different DB session is opened, and the tests aren\u0027t able to read what they write. You can find this discussion in the comments of https://review.openstack.org/#/c/348080/.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/tests/unit/extensions/test_subnet_onboard.py#L34\n[2] https://github.com/openstack/neutron/blob/master/neutron/tests/unit/extensions/test_subnet_onboard.py#L48","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2013a071f36d8d535beb7ab4966087849fb7e24","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @contextlib.contextmanager"},{"line_number":47,"context_line":"    def subnetpool(self, ip_version, prefixes\u003dNone, shared\u003dFalse, admin\u003dTrue,"},{"line_number":48,"context_line":"                   name\u003d\u0027test-pool\u0027, is_default_pool\u003dFalse, tenant_id\u003dNone,"},{"line_number":49,"context_line":"                   address_scope_id\u003dNone, **kwargs):"},{"line_number":50,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_4d92f9fe","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":18},"updated":"2019-03-29 12:46:23.000000000","message":"You have a subnetpool generator in test_db_base_plugin_v2.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1cf8257b5604c350378914420c5fb9007a000356","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @contextlib.contextmanager"},{"line_number":47,"context_line":"    def subnetpool(self, ip_version, prefixes\u003dNone, shared\u003dFalse, admin\u003dTrue,"},{"line_number":48,"context_line":"                   name\u003d\u0027test-pool\u0027, is_default_pool\u003dFalse, tenant_id\u003dNone,"},{"line_number":49,"context_line":"                   address_scope_id\u003dNone, **kwargs):"},{"line_number":50,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_9b032d77","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":18},"in_reply_to":"5fc1f717_33b4b0d1","updated":"2019-03-30 18:45:13.000000000","message":"Agree","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"bb10718226acb87f5a9657ef97565c24cae68454","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                {\u0027address_scope\u0027: scope_data})"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @contextlib.contextmanager"},{"line_number":47,"context_line":"    def subnetpool(self, ip_version, prefixes\u003dNone, shared\u003dFalse, admin\u003dTrue,"},{"line_number":48,"context_line":"                   name\u003d\u0027test-pool\u0027, is_default_pool\u003dFalse, tenant_id\u003dNone,"},{"line_number":49,"context_line":"                   address_scope_id\u003dNone, **kwargs):"},{"line_number":50,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_33b4b0d1","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":18},"in_reply_to":"5fc1f717_4d92f9fe","updated":"2019-03-29 14:12:02.000000000","message":"Yes, there is one there. However there were some struggles with the new DB enginefacade that led me down this path for subnet onboard. Until that is ironed out, I have the generators here so that the session is consistent during the tests. See the discussion lengthy discussion on https://review.openstack.org/#/c/348080/. It would be nice to refactor things so that these generators are easily re-usable though.","commit_id":"b2768e2d6cd759a0506aeb0216f07ec3b8ba3575"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"26b0bef3888b6c80b212bd5da819eee30f5ea13c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import webob.exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron_lib.db import api as db_api"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_0c050511","line":18,"updated":"2019-05-30 07:31:58.000000000","message":"this should go to section below I think as it is 3rd party lib, right?","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7f12ee095f86af836c5b8f44d97f1fc375bbf16d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import webob.exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron_lib.db import api as db_api"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_1208b7d7","line":18,"in_reply_to":"bfb3d3c7_0c050511","updated":"2019-05-30 13:21:20.000000000","message":"Yes, I\u0027ll move it","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"26b0bef3888b6c80b212bd5da819eee30f5ea13c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    cidr_to_add \u003d \"10.0.0.0/24\""},{"line_number":222,"context_line":"    overlapping_cidr \u003d \"192.168.1.128/25\""},{"line_number":223,"context_line":"    default_prefixlen \u003d 24"},{"line_number":224,"context_line":"    ip_version \u003d 4"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"class SubnetpoolPrefixOpsTestsIpv6(SubnetpoolPrefixOpsTestBase,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_0c53c518","line":224,"range":{"start_line":224,"start_character":17,"end_line":224,"end_character":18},"updated":"2019-05-30 07:31:58.000000000","message":"another nit: we have constant for this in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L87\nIf You will respin, please change it :)","commit_id":"ba43ad43bae6004ea73c4c4257d4a601450ffab7"}],"neutron/tests/unit/extensions/test_subnetpools.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d40290db6d27a73bce2de7a7b8561b8752331774","unresolved":false,"context_lines":[{"line_number":28,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class SubnetPoolTestsBase(object):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @contextlib.contextmanager"},{"line_number":34,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_d33bbac5","line":31,"range":{"start_line":31,"start_character":6,"end_line":31,"end_character":25},"updated":"2019-04-02 13:16:58.000000000","message":"I was trying for some code re-use and consolidation of subnetpool-related tests, but this unit test structure fails pep8 and needs to be refactored.","commit_id":"175b51da8445905b51c6ae83b1b1a61b52c94161"}]}
