)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8c4882608b54fe51305dc2da540a5b7ee0ec4fcd","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        last_ip \u003d net.last"},{"line_number":175,"context_line":"        if net.version \u003d\u003d 4:"},{"line_number":176,"context_line":"            # last address is broadcast in v4"},{"line_number":177,"context_line":"            last_ip -\u003d 1"},{"line_number":178,"context_line":"        gw_ip \u003d int(netaddr.IPAddress(subnet[\u0027gateway_ip\u0027] or net.last))"},{"line_number":179,"context_line":"        # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":180,"context_line":"        # for this subnet"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_0311d703","line":177,"updated":"2015-06-24 13:05:15.000000000","message":"last_ip \u003d net.last - (net.version \u003d\u003d 4)\n\nwill return last_ip - 1 only if net.version is 4\n\nI know it does not change anything but looks cool!","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"}],"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8c4882608b54fe51305dc2da540a5b7ee0ec4fcd","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        last \u003d subnet.last"},{"line_number":181,"context_line":"        if subnet.version \u003d\u003d 4:"},{"line_number":182,"context_line":"            # last address is broadcast in v4"},{"line_number":183,"context_line":"            last -\u003d 1"},{"line_number":184,"context_line":"        subnet_last_ip \u003d netaddr.IPAddress(last)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        LOG.debug(\"Performing IP validity checks on allocation pools\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_43327fa8","line":183,"updated":"2015-06-24 13:05:15.000000000","message":"aaaaaahh le code duplication....","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"304bdd884d1b96fe959b35519759106d8562c921","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        subnet \u003d netaddr.IPNetwork(subnet_cidr)"},{"line_number":135,"context_line":"        subnet_first_ip \u003d netaddr.IPAddress(subnet.first + 1)"},{"line_number":136,"context_line":"        # last address is broadcast in v4"},{"line_number":137,"context_line":"        subnet_last_ip \u003d netaddr.IPAddress(subnet.last - (subnet.version \u003d\u003d 4))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        LOG.debug(\"Performing IP validity checks on allocation pools\")"},{"line_number":140,"context_line":"        ip_sets \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_39d9a3f3","line":137,"updated":"2015-06-24 17:08:37.000000000","message":"I don\u0027t doubt that this subtracts one iff subnet.version is 4 but do we have to do this?\n\n  subnet.last - True\n  subnet.last - False","commit_id":"fccf038e2faadefbbd79ab544a51f8608e0f8c65"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"ce920f3633daaa65370e437006fb9c192c2bf6f8","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        defining the pool range."},{"line_number":177,"context_line":"        \"\"\""},{"line_number":178,"context_line":"        ipools \u003d ipam_utils.generate_pools(subnet[\u0027cidr\u0027],"},{"line_number":179,"context_line":"                                           subnet[\u0027gateway_ip\u0027] or None)"},{"line_number":180,"context_line":"        pools \u003d [{\u0027start\u0027: str(netaddr.IPAddress(pool.first)),"},{"line_number":181,"context_line":"                  \u0027end\u0027: str(netaddr.IPAddress(pool.last))}"},{"line_number":182,"context_line":"                 for pool in ipools]"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_63f5114f","line":179,"updated":"2015-06-25 11:09:12.000000000","message":"nit: explicit passing \u0027None\u0027 is not needed here, because \ngenerate_pools check:\n \n\u003eif not gateway_ip:\n\nSo passing \u0027subnet[\u0027gateway_ip\u0027] or None\u0027 will have the same effect as just \u0027subnet[\u0027gateway_ip\u0027]\u0027","commit_id":"f0b5a3cda5a056e9e53ac828135fcfde7d98d94a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"de2e23ab95098c227eb83d35c12756a74c33fa48","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        defining the pool range."},{"line_number":177,"context_line":"        \"\"\""},{"line_number":178,"context_line":"        ipools \u003d ipam_utils.generate_pools(subnet[\u0027cidr\u0027],"},{"line_number":179,"context_line":"                                           subnet[\u0027gateway_ip\u0027] or None)"},{"line_number":180,"context_line":"        pools \u003d [{\u0027start\u0027: str(netaddr.IPAddress(pool.first)),"},{"line_number":181,"context_line":"                  \u0027end\u0027: str(netaddr.IPAddress(pool.last))}"},{"line_number":182,"context_line":"                 for pool in ipools]"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_a980cfbf","line":179,"in_reply_to":"fa32b979_63f5114f","updated":"2015-06-25 15:49:25.000000000","message":"good catch.","commit_id":"f0b5a3cda5a056e9e53ac828135fcfde7d98d94a"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"2fbebe88752cc071ffa56d19af08b5b03ff0ab97","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        subnet \u003d netaddr.IPNetwork(subnet_cidr)"},{"line_number":240,"context_line":"        subnet_first_ip \u003d netaddr.IPAddress(subnet.first + 1)"},{"line_number":241,"context_line":"        # last address is broadcast in v4"},{"line_number":242,"context_line":"        subnet_last_ip \u003d netaddr.IPAddress(subnet.last - (subnet.version \u003d\u003d 4))"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        LOG.debug(\"Performing IP validity checks on allocation pools\")"},{"line_number":245,"context_line":"        ip_sets \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_3b1966d1","line":242,"updated":"2015-06-25 15:42:28.000000000","message":"clever :)","commit_id":"0b5d263cac92c8f7655f1c688fbe94dae89b2350"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bf08a7e8fb08e1aa08cc2feedb5520bf4a223059","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        subnet \u003d netaddr.IPNetwork(subnet_cidr)"},{"line_number":240,"context_line":"        subnet_first_ip \u003d netaddr.IPAddress(subnet.first + 1)"},{"line_number":241,"context_line":"        # last address is broadcast in v4"},{"line_number":242,"context_line":"        subnet_last_ip \u003d netaddr.IPAddress(subnet.last - (subnet.version \u003d\u003d 4))"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        LOG.debug(\"Performing IP validity checks on allocation pools\")"},{"line_number":245,"context_line":"        ip_sets \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_5e6a18b4","line":242,"in_reply_to":"fa32b979_3b1966d1","updated":"2015-06-25 15:48:59.000000000","message":"salvatore gets credit for suggesting that gem :)","commit_id":"0b5d263cac92c8f7655f1c688fbe94dae89b2350"}],"neutron/ipam/subnet_alloc.py":[{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"dc4691fb430c5186e56794a6e246d3d3146becc1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_subnet_ip(cidr, gateway):"},{"line_number":131,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""},{"line_number":132,"context_line":"                        \"address\")"},{"line_number":133,"context_line":"                raise n_exc.SubnetAllocationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_30dbaa23","line":130,"updated":"2015-06-26 03:27:50.000000000","message":"During a normal IPv6 subnet creation, we support specifying a gateway_ip which could be a LLA (i..e, not part of subnet CIDR). \nDo we have to support a similar use-case here?","commit_id":"d2d2279525153d10eb2af0b754d8293aa4193201"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"003e9a61926f4f0c33cf92eabb1910b3cb252a25","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_subnet_ip(cidr, gateway):"},{"line_number":131,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""},{"line_number":132,"context_line":"                        \"address\")"},{"line_number":133,"context_line":"                raise n_exc.SubnetAllocationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_f6a21afc","line":130,"in_reply_to":"fa32b979_1386b0db","updated":"2015-06-26 04:44:17.000000000","message":"@Kevin, please take a look at the following api - https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_common.py#L79","commit_id":"d2d2279525153d10eb2af0b754d8293aa4193201"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"5c917456e502c6a8bf1baa9a9ce1cd5c9cbf4b3e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_subnet_ip(cidr, gateway):"},{"line_number":131,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""},{"line_number":132,"context_line":"                        \"address\")"},{"line_number":133,"context_line":"                raise n_exc.SubnetAllocationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_1386b0db","line":130,"in_reply_to":"fa32b979_30dbaa23","updated":"2015-06-26 04:23:42.000000000","message":"oh, it looks like that would be prevented here. Is there any gateway validation we need to do on an IPv6 gateway address?","commit_id":"d2d2279525153d10eb2af0b754d8293aa4193201"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"cca600ff78768405ea17f071958acd7a07f2831c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_subnet_ip(cidr, gateway):"},{"line_number":131,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""},{"line_number":132,"context_line":"                        \"address\")"},{"line_number":133,"context_line":"                raise n_exc.SubnetAllocationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_57fdfd06","line":130,"in_reply_to":"fa32b979_d972a9e3","updated":"2015-06-26 08:21:03.000000000","message":"This check duplicates one done in [1].\nFor SubnetAllocator case, it already receives prepared SubnetRequest [2],\nso gateway validation is already done at this point.\nAlso after [3] check in [1] will apply for all subnet allocations(for all cases SubnetRequest will be created), \nso  _check_gateway_in_subnet may be no longer needed.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/ipam/__init__.py\nL102\n\n[2] https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py L477\n\n[3] https://review.openstack.org/#/c/153236/","commit_id":"d2d2279525153d10eb2af0b754d8293aa4193201"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"10467fbdf26dfc4752c539ccb886c2291155bfdd","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_subnet_ip(cidr, gateway):"},{"line_number":131,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""},{"line_number":132,"context_line":"                        \"address\")"},{"line_number":133,"context_line":"                raise n_exc.SubnetAllocationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_d972a9e3","line":130,"in_reply_to":"fa32b979_f6a21afc","updated":"2015-06-26 05:54:34.000000000","message":"ah, great. thanks","commit_id":"d2d2279525153d10eb2af0b754d8293aa4193201"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"286159dd0c33b9ca7edc2f874b4de8f94fe05c61","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            self._check_subnetpool_tenant_quota(request.tenant_id,"},{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_gateway_in_subnet(cidr,"},{"line_number":131,"context_line":"                                                                  gateway):"},{"line_number":132,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa32b979_3744f919","line":129,"updated":"2015-06-26 08:30:55.000000000","message":"See PS9.\nThis check duplicates one done on preparing SubnetRequest","commit_id":"b4f0f845261fbb02fcfd9bbf8a492249e4071124"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e9ddf994f91586ec490d18a2080f338173d02701","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            self._check_subnetpool_tenant_quota(request.tenant_id,"},{"line_number":127,"context_line":"                                                request.prefixlen)"},{"line_number":128,"context_line":"            cidr \u003d request.subnet_cidr"},{"line_number":129,"context_line":"            gateway \u003d request.gateway_ip"},{"line_number":130,"context_line":"            if gateway and not ipam_utils.check_gateway_in_subnet(cidr,"},{"line_number":131,"context_line":"                                                                  gateway):"},{"line_number":132,"context_line":"                msg \u003d _(\"Cannot allocate requested subnet due to bad gateway \""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa32b979_72ca7670","line":129,"in_reply_to":"fa32b979_3744f919","updated":"2015-06-26 17:43:58.000000000","message":"ack.","commit_id":"b4f0f845261fbb02fcfd9bbf8a492249e4071124"}],"neutron/ipam/utils.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81f83888a8805ff0405342bac6a36bf5cbfa7ced","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    ip \u003d netaddr.IPAddress(ip_address)"},{"line_number":22,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":23,"context_line":"    # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"    # network or the broadcast address"},{"line_number":25,"context_line":"    return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"            and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_e5ae3e2d","line":24,"updated":"2015-06-24 11:50:31.000000000","message":"Should we also remove this .broadcast check?","commit_id":"c916557439d1919a5b1a435bbfe1c912a9c49045"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"57ecfd99882994b955555ba4da56ffadeeb1aa59","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    ip \u003d netaddr.IPAddress(ip_address)"},{"line_number":22,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":23,"context_line":"    # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"    # network or the broadcast address"},{"line_number":25,"context_line":"    return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"            and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_b0cb9652","line":24,"in_reply_to":"fa32b979_e5ae3e2d","updated":"2015-06-24 12:00:48.000000000","message":"patch was not on latest master. that broadcast check was already removed. see PS4","commit_id":"c916557439d1919a5b1a435bbfe1c912a9c49045"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8c4882608b54fe51305dc2da540a5b7ee0ec4fcd","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    last_ip \u003d net.last"},{"line_number":41,"context_line":"    if net.version \u003d\u003d 4:"},{"line_number":42,"context_line":"        # last address is broadcast in v4"},{"line_number":43,"context_line":"        last_ip -\u003d 1"},{"line_number":44,"context_line":"    gw_ip \u003d int(netaddr.IPAddress(gateway_ip or last_ip + 1))"},{"line_number":45,"context_line":"    # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":46,"context_line":"    # for this subnet"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_a3e82be3","line":43,"updated":"2015-06-24 13:05:15.000000000","message":"duplicamus!!!","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8a055ff75a268fb6b1fa0c93f4aa3311b1a74f7f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if net.version \u003d\u003d 4:"},{"line_number":42,"context_line":"        # last address is broadcast in v4"},{"line_number":43,"context_line":"        last_ip -\u003d 1"},{"line_number":44,"context_line":"    gw_ip \u003d int(netaddr.IPAddress(gateway_ip or last_ip + 1))"},{"line_number":45,"context_line":"    # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":46,"context_line":"    # for this subnet"},{"line_number":47,"context_line":"    split_ip \u003d min(max(gw_ip, net.first), last_ip + 1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_269669f0","line":44,"updated":"2015-06-24 13:39:07.000000000","message":"Hm, so if it\u0027s ipv6 network, and gateway_ip is not specified, you will get your gw_ip out of the pool (the next address after the last one).","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"9e7a861a8f83518f08ac0d2d472b7dfe89fb13e3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if net.version \u003d\u003d 4:"},{"line_number":42,"context_line":"        # last address is broadcast in v4"},{"line_number":43,"context_line":"        last_ip -\u003d 1"},{"line_number":44,"context_line":"    gw_ip \u003d int(netaddr.IPAddress(gateway_ip or last_ip + 1))"},{"line_number":45,"context_line":"    # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":46,"context_line":"    # for this subnet"},{"line_number":47,"context_line":"    split_ip \u003d min(max(gw_ip, net.first), last_ip + 1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_7383ca03","line":44,"in_reply_to":"fa32b979_269669f0","updated":"2015-06-24 15:55:55.000000000","message":"yes, it\u0027s the same for v4. this logic is a little hard to follow. let me see if i can refactor it a bit","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a2a06bd043368e9b29762a6f661708ce57a8a3c4","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if net.version \u003d\u003d 4:"},{"line_number":42,"context_line":"        # last address is broadcast in v4"},{"line_number":43,"context_line":"        last_ip -\u003d 1"},{"line_number":44,"context_line":"    gw_ip \u003d int(netaddr.IPAddress(gateway_ip or last_ip + 1))"},{"line_number":45,"context_line":"    # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":46,"context_line":"    # for this subnet"},{"line_number":47,"context_line":"    split_ip \u003d min(max(gw_ip, net.first), last_ip + 1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_93b8cec9","line":44,"in_reply_to":"fa32b979_7383ca03","updated":"2015-06-24 15:56:26.000000000","message":"by that i mean that in v4, the gateway ends up being the broadcast address.","commit_id":"3f2017b89caa3371d9bb19543ef7fce92a71ec5c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"304bdd884d1b96fe959b35519759106d8562c921","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":38,"context_line":"    first_ip \u003d net.first + 1"},{"line_number":39,"context_line":"    # last address is broadcast in v4"},{"line_number":40,"context_line":"    last_ip \u003d net.last - (net.version \u003d\u003d 4)"},{"line_number":41,"context_line":"    if not gateway_ip:"},{"line_number":42,"context_line":"        # if no gateway, we just return the whole range"},{"line_number":43,"context_line":"        return [netaddr.IPRange(first_ip, last_ip)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_a476e6a1","line":40,"updated":"2015-06-24 17:08:37.000000000","message":"Ditto","commit_id":"fccf038e2faadefbbd79ab544a51f8608e0f8c65"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"67b91a924a15c6e3ea899b2fc4079981080dd430","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    gateway_ip \u003d int(netaddr.IPAddress(gateway_ip))"},{"line_number":45,"context_line":"    # Add a pool on each side of the gateway IP"},{"line_number":46,"context_line":"    pools \u003d []"},{"line_number":47,"context_line":"    if gateway_ip \u003e first_ip:"},{"line_number":48,"context_line":"        pools.append(netaddr.IPRange(first_ip, gateway_ip - 1))"},{"line_number":49,"context_line":"    if gateway_ip \u003c last_ip:"},{"line_number":50,"context_line":"        pools.append(netaddr.IPRange(gateway_ip + 1, last_ip))"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_9c98b6c1","line":47,"updated":"2015-06-25 11:57:12.000000000","message":"(No action required):\n\nipset \u003d netaddr.IPSet(netaddr.IPRange(first_ip, last_ip))\n\nipset.remove(netaddr.IPAddress(gateway_ip))\n\nreturn list(ipset.iter_ipranges())","commit_id":"f0b5a3cda5a056e9e53ac828135fcfde7d98d94a"}]}
