)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f05d304d53fd516291ef6fc0b8cb7e66d9f225ef","unresolved":false,"context_lines":[{"line_number":7,"context_line":"update the way to calculate the total number of IPs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current method of calculating the total number of IPs is the total number"},{"line_number":10,"context_line":"of ip in the address pool. But some ips, such as gateway ip, are not within"},{"line_number":11,"context_line":"the address pool. some IP address in deleted address pools. In this case,"},{"line_number":12,"context_line":"the number of IPS used may be larger than the total number of ips."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"New method of calculation. the total number of IPs is the union of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_6ff913c6","line":11,"range":{"start_line":10,"start_character":27,"end_line":11,"end_character":16},"updated":"2019-08-20 10:38:03.000000000","message":"According to [1], this method calculates \"the IP availability stats on a per subnet basis\". What this method is doing is:\n1) \"_generate_subnet_total_ips_dict\"\n- Retrieving the subnets of the network\n- Retrieving the IP allocation pools\n- Calculating the total number of IPs in the subnets according to the IP allocation pools\n\n2) \"_build_network_used_ip_query\"\n- Retrieving the used IPs on this network\n\n3) Returning both sets assembled\n\n\nI don\u0027t see where this logic is wrong. This method is returning the IP availability for the current IP allocation pools. If, as you mention [2], the pool is reduced, the function should return the IPs allocated *inside* this pools and the free ones.\n\n[1] https://review.opendev.org/#/c/674723/4/neutron/db/network_ip_availability_db.py@71\n\n[2] https://review.opendev.org/#/c/674723/4/neutron/tests/unit/extensions/test_network_ip_availability.py@425","commit_id":"5ca2abd14ef510676511cf832b55dc91c3254579"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f05d304d53fd516291ef6fc0b8cb7e66d9f225ef","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current method of calculating the total number of IPs is the total number"},{"line_number":10,"context_line":"of ip in the address pool. But some ips, such as gateway ip, are not within"},{"line_number":11,"context_line":"the address pool. some IP address in deleted address pools. In this case,"},{"line_number":12,"context_line":"the number of IPS used may be larger than the total number of ips."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"New method of calculation. the total number of IPs is the union of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_2f8ebb78","line":11,"range":{"start_line":11,"start_character":18,"end_line":11,"end_character":58},"updated":"2019-08-20 10:38:03.000000000","message":"Sorry but I don\u0027t understand this. Can you explain what does it mean??","commit_id":"5ca2abd14ef510676511cf832b55dc91c3254579"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"82b6a0bb98967d84fd8d9a4a4e1bf9cc5a44e9f9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"update the way to calculate the total number of IPs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current method of calculating the total number of IPs is the total number"},{"line_number":10,"context_line":"of ip in the address pool. But some ips, such as gateway ip, are not within"},{"line_number":11,"context_line":"the address pool. some IP address in deleted address pools. In this case,"},{"line_number":12,"context_line":"the number of IPS used may be larger than the total number of ips."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"New method of calculation. the total number of IPs is the union of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_0f7dffe5","line":11,"range":{"start_line":10,"start_character":27,"end_line":11,"end_character":16},"in_reply_to":"7faddb67_6ff913c6","updated":"2019-08-20 10:56:22.000000000","message":"The current algorithm is\n\n1. If 10 IPs have been used, the address pool is reduced and only contains only 2 IPs. 10 IPs have been used and a total of 2 IPs will be returned from current interface.\n\n2. If 10 IP has been used, delete all address pool. the total of IPs is the number of cidr. But you can\u0027t create a port at this time.\n\nbug #1838487","commit_id":"5ca2abd14ef510676511cf832b55dc91c3254579"}],"neutron/db/network_ip_availability_db.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b4242d3ff7fd977de6890799c109ff460b452245","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                           \u0027project_id\u0027: db_row.tenant_id,"},{"line_number":172,"context_line":"                           \"subnet_pools\": {}}"},{"line_number":173,"context_line":"                result_dict[db_row.network_id] \u003d network"},{"line_number":174,"context_line":"            # no subnet in the network"},{"line_number":175,"context_line":"            if not db_row.subnet_id:"},{"line_number":176,"context_line":"                continue"},{"line_number":177,"context_line":"            subnet_pools \u003d network[\"subnet_pools\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_493dba2a","line":174,"range":{"start_line":174,"start_character":14,"end_line":174,"end_character":16},"updated":"2019-08-12 10:00:25.000000000","message":"s/No/no","commit_id":"8d24be6e04ecee3e255b779128e0658f1132e673"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b4242d3ff7fd977de6890799c109ff460b452245","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                subnet_pools[db_row.subnet_id] \u003d subnet"},{"line_number":187,"context_line":"            else:"},{"line_number":188,"context_line":"                subnet \u003d subnet_pools[db_row.subnet_id]"},{"line_number":189,"context_line":"            # if no ip address pool in subnet, db_row.last_ip is None"},{"line_number":190,"context_line":"            if db_row.last_ip:"},{"line_number":191,"context_line":"                pool_range \u003d netaddr.IPRange("},{"line_number":192,"context_line":"                    netaddr.IPAddress(db_row.first_ip),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c9120ab5","line":189,"range":{"start_line":189,"start_character":14,"end_line":189,"end_character":16},"updated":"2019-08-12 10:00:25.000000000","message":"s/If/if","commit_id":"8d24be6e04ecee3e255b779128e0658f1132e673"}]}
