)]}'
{"neutron/tests/fullstack/base.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b6f372664024ad4fc43b8dcea0abc67c9c01c5a9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            [netaddr.IPAddress(ip[\u0027ip_address\u0027])"},{"line_number":134,"context_line":"             for port in ports for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":135,"context_line":"        used_ips.add(netaddr.IPAddress(subnet[\u0027gateway_ip\u0027]))"},{"line_number":136,"context_line":"        # Note(lajoskatona): Suppose that we have 1 allocation pool for the"},{"line_number":137,"context_line":"        # subnet, that should be quite good for testing."},{"line_number":138,"context_line":"        valid_ip_pool \u003d subnet[\u0027allocation_pools\u0027][0]"},{"line_number":139,"context_line":"        valid_ips \u003d netaddr.IPSet((netaddr.iter_iprange("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f50ef731","line":136,"updated":"2019-11-06 11:42:08.000000000","message":"nit: IMO, this note is not needed. In fullstack tests, the subnets are created using a CIDR (--subnet-range). This CIDR will generate an allocation pool. We\u0027ll always have at least one allocation pool.","commit_id":"570a9f407e2e287700aa99fddd2057a96b2290fa"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"376af81e324c6116e695bc5ed12d7610beba745a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            [netaddr.IPAddress(ip[\u0027ip_address\u0027])"},{"line_number":134,"context_line":"             for port in ports for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":135,"context_line":"        used_ips.add(netaddr.IPAddress(subnet[\u0027gateway_ip\u0027]))"},{"line_number":136,"context_line":"        # Note(lajoskatona): Suppose that we have 1 allocation pool for the"},{"line_number":137,"context_line":"        # subnet, that should be quite good for testing."},{"line_number":138,"context_line":"        valid_ip_pool \u003d subnet[\u0027allocation_pools\u0027][0]"},{"line_number":139,"context_line":"        valid_ips \u003d netaddr.IPSet((netaddr.iter_iprange("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e104c41a","line":136,"in_reply_to":"3fa7e38b_f50ef731","updated":"2019-11-12 14:03:40.000000000","message":"Personally I feel it is better to add notes, to make the code readers life easier.","commit_id":"570a9f407e2e287700aa99fddd2057a96b2290fa"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b6f372664024ad4fc43b8dcea0abc67c9c01c5a9","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # Note(lajoskatona): Suppose that we have 1 allocation pool for the"},{"line_number":137,"context_line":"        # subnet, that should be quite good for testing."},{"line_number":138,"context_line":"        valid_ip_pool \u003d subnet[\u0027allocation_pools\u0027][0]"},{"line_number":139,"context_line":"        valid_ips \u003d netaddr.IPSet((netaddr.iter_iprange("},{"line_number":140,"context_line":"            valid_ip_pool[\u0027start\u0027],"},{"line_number":141,"context_line":"            valid_ip_pool[\u0027end\u0027]))"},{"line_number":142,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_959c63c0","line":139,"updated":"2019-11-06 11:42:08.000000000","message":"This operation is very inefficient. Instead of this, you should use IPRange:\n\nipr \u003d netaddr.IPRange(valid_ip_pool[\u0027start\u0027], valid_ip_pool[\u0027end\u0027])\nvalid_ips \u003d netaddr.IPSet(ipr)\n\nAs an example, with /8 networks:\nip1\u003d\u002710.0.0.1\u0027\nip2\u003d\u002710.255.255.254\u0027\nipr_a \u003d netaddr.iter_iprange(ip1, ip2)\nipr_b \u003d netaddr.IPRange(ip1, ip2)\nips_a \u003d netaddr.IPSet(ipr_a)  # 104 seconds in my laptop\nips_b \u003d netaddr.IPSet(ipr_b)  # 0.0004 seconds, same result.","commit_id":"570a9f407e2e287700aa99fddd2057a96b2290fa"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"376af81e324c6116e695bc5ed12d7610beba745a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # Note(lajoskatona): Suppose that we have 1 allocation pool for the"},{"line_number":137,"context_line":"        # subnet, that should be quite good for testing."},{"line_number":138,"context_line":"        valid_ip_pool \u003d subnet[\u0027allocation_pools\u0027][0]"},{"line_number":139,"context_line":"        valid_ips \u003d netaddr.IPSet((netaddr.iter_iprange("},{"line_number":140,"context_line":"            valid_ip_pool[\u0027start\u0027],"},{"line_number":141,"context_line":"            valid_ip_pool[\u0027end\u0027]))"},{"line_number":142,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_6111b45d","line":139,"in_reply_to":"3fa7e38b_959c63c0","updated":"2019-11-12 14:03:40.000000000","message":"Thanks Rodolfo, iter_iprange is really worse than IPRange, good catch","commit_id":"570a9f407e2e287700aa99fddd2057a96b2290fa"}]}
