)]}'
{"neutron/ipam/drivers/neutrondb_ipam/driver.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4faa84918f162e77cc4e99d7c3547ba21d6e0b5a","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            raise ipam_exc.InvalidSubnetRequest("},{"line_number":292,"context_line":"                reason\u003d_(\"An identifier must be specified when updating \""},{"line_number":293,"context_line":"                         \"a subnet\"))"},{"line_number":294,"context_line":"        if not subnet_request.allocation_pools:"},{"line_number":295,"context_line":"            LOG.debug(\"Update subnet request for subnet %s did not specify \""},{"line_number":296,"context_line":"                      \"new allocation pools, there is nothing to do\","},{"line_number":297,"context_line":"                      subnet_request.subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_7d2363bd","side":"PARENT","line":294,"range":{"start_line":294,"start_character":8,"end_line":294,"end_character":46},"updated":"2016-07-21 15:56:05.000000000","message":"Do we need to differentiate between specifying [] as the subnet pools and not specifying anything (i.e. ATTR_NOT_SPECIFIED)?  I just wonder if this was added originally for a reason.  Although, I don\u0027t see any real explanation for it when it was introduced [1].\n\n [1] https://review.openstack.org/#/c/150485/11/neutron/ipam/drivers/neutrondb_ipam/driver.py@495","commit_id":"a51e87abe8404cb95d915aad5900fe9716c3406c"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"ffffcc940f03cbd062e3632bbb63e76eed24ee7f","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            raise ipam_exc.InvalidSubnetRequest("},{"line_number":292,"context_line":"                reason\u003d_(\"An identifier must be specified when updating \""},{"line_number":293,"context_line":"                         \"a subnet\"))"},{"line_number":294,"context_line":"        if not subnet_request.allocation_pools:"},{"line_number":295,"context_line":"            LOG.debug(\"Update subnet request for subnet %s did not specify \""},{"line_number":296,"context_line":"                      \"new allocation pools, there is nothing to do\","},{"line_number":297,"context_line":"                      subnet_request.subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_c63397f4","side":"PARENT","line":294,"range":{"start_line":294,"start_character":8,"end_line":294,"end_character":46},"in_reply_to":"dada55a8_7d2363bd","updated":"2016-07-21 18:14:53.000000000","message":"This check was added at initial implementation stage when caller part was not yet ready (db_base_plugin changes), so there probably was an assumtion that it can be called with allocation_pool\u003dNone. \n\nBut according to my investigation allocation_pool\u003dNone should not come into ipam_driver with current state of code:\n\nOnce db_base_plugin changes got merged it turns out that update_subnet is not called by ipam_driver if there are no allocation_pools provided by user.\nThis is how it worked before patch [1].\nSee line \u0027if \"allocation_pools\" in s:\u0027\nWith patch [1] merged workflow has changed:\nNow ipam driver is called on each update, so if user doesn\u0027t specify new allocation pools, then  *old* allocation_pools are passed into ipam driver.\n\nBut since code around ipam driver can be changed it is better to have this check in place as \u0027if subnet_request.allocation_pools is not None\u0027 just to make sure that if things are changed around ipam driverm it will not brake.\n\nI\u0027ll update the code accordingly.\n\n[1] https://review.openstack.org/#/c/344890/1/neutron/db/ipam_pluggable_backend.py","commit_id":"a51e87abe8404cb95d915aad5900fe9716c3406c"}],"neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4faa84918f162e77cc4e99d7c3547ba21d6e0b5a","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                            netaddr.IPRange(\u002710.0.0.200\u0027, \u002710.0.0.250\u0027)]"},{"line_number":163,"context_line":"        self._test_update_subnet_pools(allocation_pools)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def test_update_subnet_pools_with_blank_pools(self):"},{"line_number":166,"context_line":"        allocation_pools \u003d []"},{"line_number":167,"context_line":"        self._test_update_subnet_pools(allocation_pools)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_e01cc86b","line":165,"updated":"2016-07-21 15:56:05.000000000","message":"I think we should we add one more test for update without specifying allocation pools at all to be sure that it doesn\u0027t try to change anything.","commit_id":"acfb81785304eb68d42a85f5be03b6e2a03e0c83"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"ffffcc940f03cbd062e3632bbb63e76eed24ee7f","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                            netaddr.IPRange(\u002710.0.0.200\u0027, \u002710.0.0.250\u0027)]"},{"line_number":163,"context_line":"        self._test_update_subnet_pools(allocation_pools)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def test_update_subnet_pools_with_blank_pools(self):"},{"line_number":166,"context_line":"        allocation_pools \u003d []"},{"line_number":167,"context_line":"        self._test_update_subnet_pools(allocation_pools)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_0992e04b","line":165,"in_reply_to":"dada55a8_e01cc86b","updated":"2016-07-21 18:14:53.000000000","message":"will do","commit_id":"acfb81785304eb68d42a85f5be03b6e2a03e0c83"}]}
