)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Calico dhcp agent created dhcp interface with gateway IP address"},{"line_number":10,"context_line":"assigned. This patch changes this behaviour. Now neutron server"},{"line_number":11,"context_line":"pre-allocates DHCP port, which allows to reserve single IP address"},{"line_number":12,"context_line":"shared between DHCP agents and distinct from gateway address."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1541490"},{"line_number":15,"context_line":"Closes-Bug: #1625209"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5a74a57a_455adf84","line":12,"updated":"2016-11-23 13:02:30.000000000","message":"Alex, can you add some further details here that I think would help me to understand this change:\n\n- How many DHCP ports are there?  I think it is one for each DHCP-enabled subnet, is that right?\n\n- Is each DHCP port shared between all of the hosts that have instances on that subnet?\n\n- What information about the DHCP port does each host need, and how is that information passed to each host?","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"aaba302a142d5da85ef1819a0524104d8f371c05","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Calico dhcp agent created dhcp interface with gateway IP address"},{"line_number":10,"context_line":"assigned. This patch changes this behaviour. Now neutron server"},{"line_number":11,"context_line":"pre-allocates DHCP port, which allows to reserve single IP address"},{"line_number":12,"context_line":"shared between DHCP agents and distinct from gateway address."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1541490"},{"line_number":15,"context_line":"Closes-Bug: #1625209"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5a74a57a_9a5edbe7","line":12,"in_reply_to":"5a74a57a_455adf84","updated":"2016-11-24 12:35:53.000000000","message":"Yes, I\u0027ll add more details.\n\n\u003e How many DHCP ports are there?  I think it is one for each DHCP-enabled subnet, is that right?\nOne port per network\n\n\u003e Is each DHCP port shared between all of the hosts that have instances on that subnet?\nRight\n\n\u003e What information about the DHCP port does each host need, and how is that information passed to each host?\n\nport ID, network ID and fixed IPs list","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Calico dhcp agent created dhcp interface with gateway IP address"},{"line_number":10,"context_line":"assigned. This patch changes this behaviour. Now neutron server"},{"line_number":11,"context_line":"pre-allocates DHCP port, which allows to reserve single IP address"},{"line_number":12,"context_line":"shared between DHCP agents and distinct from gateway address."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1541490"},{"line_number":15,"context_line":"Closes-Bug: #1625209"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5a74a57a_21a05c90","line":12,"in_reply_to":"5a74a57a_9a5edbe7","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"}],"networking_calico/agent/dhcp_agent.py":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_65ed1b8b","line":83,"updated":"2016-11-23 13:02:30.000000000","message":"I think create_dhcp_port should not be called at all now.  Is that correct?\n\nIf so, please update comment to make that clear, and raise an exception if it is called.  Or perhaps delete this method completely?","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_81b5b0d1","line":83,"in_reply_to":"5a74a57a_5a6d2397","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"aaba302a142d5da85ef1819a0524104d8f371c05","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_5a6d2397","line":83,"in_reply_to":"5a74a57a_65ed1b8b","updated":"2016-11-24 12:35:53.000000000","message":"Agree, this need to be fixed.","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.plugin.release_dhcp_port(network.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_c5fc2f41","line":85,"updated":"2016-11-23 13:02:30.000000000","message":"Can this be called?  If so, can you add a comment to explain when?","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.plugin.release_dhcp_port(network.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_c1afa87b","line":85,"in_reply_to":"5a74a57a_7a681f88","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"aaba302a142d5da85ef1819a0524104d8f371c05","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        LOG.debug(\"create_dhcp_port: %s\", port)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def release_dhcp_port(self, network_id, device_id):"},{"line_number":86,"context_line":"        \"\"\"Support the following DHCP DeviceManager calls."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.plugin.release_dhcp_port(network.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_7a681f88","line":85,"in_reply_to":"5a74a57a_c5fc2f41","updated":"2016-11-24 12:35:53.000000000","message":"Ditto","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"dad04e3d8b3387ab6ed1049a1ed04e5a4fb8a0c0","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def create_dhcp_port(self, port):"},{"line_number":79,"context_line":"        \"\"\"This function should never be called\"\"\""},{"line_number":80,"context_line":"        raise NotImplementedError(\"This function should never be called\")"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_26814d90","line":78,"updated":"2016-11-30 16:01:12.000000000","message":"seems, these methods should be removed and docstring for the class should be fixed.","commit_id":"dbc2e21c50962e7a0e01a1491fa5130cda918667"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"5e952e17c64dde16295dc0f928ff5406fb16fa16","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def create_dhcp_port(self, port):"},{"line_number":79,"context_line":"        \"\"\"This function should never be called\"\"\""},{"line_number":80,"context_line":"        raise NotImplementedError(\"This function should never be called\")"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_94eef9ea","line":78,"in_reply_to":"5a74a57a_26814d90","updated":"2016-12-07 11:17:20.000000000","message":"Done","commit_id":"dbc2e21c50962e7a0e01a1491fa5130cda918667"}],"networking_calico/datamodel_v1.py":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Information intended for use by the DHCP agent."},{"line_number":78,"context_line":"DHCP_DIR \u003d ROOT_DIR + \"/dhcp\" + DHCP_VERSION"},{"line_number":79,"context_line":"SUBNET_DIR \u003d DHCP_DIR + \"/subnet\""},{"line_number":80,"context_line":"DHCP_PORT_DIR \u003d DHCP_DIR + \"/port\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def dir_for_host(hostname):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_20523114","line":80,"updated":"2016-11-23 13:02:30.000000000","message":"Oh, so it is actually one DHCP port per network?  (Not per subnet?)","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"aaba302a142d5da85ef1819a0524104d8f371c05","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Information intended for use by the DHCP agent."},{"line_number":78,"context_line":"DHCP_DIR \u003d ROOT_DIR + \"/dhcp\" + DHCP_VERSION"},{"line_number":79,"context_line":"SUBNET_DIR \u003d DHCP_DIR + \"/subnet\""},{"line_number":80,"context_line":"DHCP_PORT_DIR \u003d DHCP_DIR + \"/port\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def dir_for_host(hostname):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_faf6eff7","line":80,"in_reply_to":"5a74a57a_20523114","updated":"2016-11-24 12:35:53.000000000","message":"Right, one DHCP port per network","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Information intended for use by the DHCP agent."},{"line_number":78,"context_line":"DHCP_DIR \u003d ROOT_DIR + \"/dhcp\" + DHCP_VERSION"},{"line_number":79,"context_line":"SUBNET_DIR \u003d DHCP_DIR + \"/subnet\""},{"line_number":80,"context_line":"DHCP_PORT_DIR \u003d DHCP_DIR + \"/port\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def dir_for_host(hostname):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_21c77c46","line":80,"in_reply_to":"5a74a57a_faf6eff7","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"}],"networking_calico/plugins/calico/plugin.py":[{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"27b36948b3be71ac0c323ec270ab05ae395effff","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        old_subnet \u003d self.get_subnet(context, id_)"},{"line_number":117,"context_line":"        new_subnet \u003d super(CalicoPlugin, self).update_subnet("},{"line_number":118,"context_line":"            context, id_, subnet)"},{"line_number":119,"context_line":"        if new_subnet[\u0027enable_dhcp\u0027] !\u003d old_subnet[\u0027enable_dhcp\u0027]:"},{"line_number":120,"context_line":"            self._update_dhcp_port(context, new_subnet,"},{"line_number":121,"context_line":"                                   delete\u003dold_subnet[\u0027enable_dhcp\u0027])"},{"line_number":122,"context_line":"        return new_subnet"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_da4cb844","line":119,"updated":"2016-11-09 07:44:48.000000000","message":"you check \u0027enable_dhcp\u0027 just here. seems, this can work wrong when \u0027enable_dhcp\u0027\u003dfalse on subnet creation.","commit_id":"91e0a111f0bfc70f48383809dd1fe80e37c925d1"}],"networking_calico/plugins/ml2/drivers/calico/mech_calico.py":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":577,"context_line":"        with self._txn_from_context(plugin_context, tag\u003d\"update-subnet\"):"},{"line_number":578,"context_line":"            subnet \u003d self.db.get_subnet(plugin_context, subnet[\u0027id\u0027])"},{"line_number":579,"context_line":"            dhcp_port \u003d self._update_dhcp_port("},{"line_number":580,"context_line":"                plugin_context, subnet, delete\u003dnot subnet[\u0027enable_dhcp\u0027])"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"            if subnet[\u0027enable_dhcp\u0027]:"},{"line_number":583,"context_line":"                # Pass relevant subnet info to the transport layer."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_c0e7bd3e","line":580,"updated":"2016-11-23 13:02:30.000000000","message":"As you\u0027re passing the whole subnet dict here, can you put the logic to check subnet[\u0027enable_dhcp\u0027] inside _update_dhcp_port?\n\nI think that would be cleaner than having an optional \u0027delete\u0027 arg.","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":577,"context_line":"        with self._txn_from_context(plugin_context, tag\u003d\"update-subnet\"):"},{"line_number":578,"context_line":"            subnet \u003d self.db.get_subnet(plugin_context, subnet[\u0027id\u0027])"},{"line_number":579,"context_line":"            dhcp_port \u003d self._update_dhcp_port("},{"line_number":580,"context_line":"                plugin_context, subnet, delete\u003dnot subnet[\u0027enable_dhcp\u0027])"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"            if subnet[\u0027enable_dhcp\u0027]:"},{"line_number":583,"context_line":"                # Pass relevant subnet info to the transport layer."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_61c1742e","line":580,"in_reply_to":"5a74a57a_1afacbbd","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"aaba302a142d5da85ef1819a0524104d8f371c05","unresolved":false,"context_lines":[{"line_number":577,"context_line":"        with self._txn_from_context(plugin_context, tag\u003d\"update-subnet\"):"},{"line_number":578,"context_line":"            subnet \u003d self.db.get_subnet(plugin_context, subnet[\u0027id\u0027])"},{"line_number":579,"context_line":"            dhcp_port \u003d self._update_dhcp_port("},{"line_number":580,"context_line":"                plugin_context, subnet, delete\u003dnot subnet[\u0027enable_dhcp\u0027])"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"            if subnet[\u0027enable_dhcp\u0027]:"},{"line_number":583,"context_line":"                # Pass relevant subnet info to the transport layer."}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_1afacbbd","line":580,"in_reply_to":"5a74a57a_c0e7bd3e","updated":"2016-11-24 12:35:53.000000000","message":"Will do","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            return ports[0]"},{"line_number":908,"context_line":"        return None"},{"line_number":909,"context_line":""},{"line_number":910,"context_line":"    def _update_dhcp_port(self, plugin_context, subnet, delete\u003dFalse):"},{"line_number":911,"context_line":"        dhcp_port \u003d self._get_dhcp_port(plugin_context, subnet[\u0027network_id\u0027])"},{"line_number":912,"context_line":""},{"line_number":913,"context_line":"        if dhcp_port:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_400c8d94","line":910,"updated":"2016-11-23 13:02:30.000000000","message":"I\u0027m not sure this logic is robust if there are multiple concurrent subnet updates being handled by different instances of the Neutron server.\n\nI think it would be more robust to reread all of the DHCP-enabled subnets that are now associated with the network ID, and add a fixed IP entry for each subnet that doesn\u0027t already have one, and delete fixed IP entries for any subnet IDs that are no longer associated.","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            return ports[0]"},{"line_number":908,"context_line":"        return None"},{"line_number":909,"context_line":""},{"line_number":910,"context_line":"    def _update_dhcp_port(self, plugin_context, subnet, delete\u003dFalse):"},{"line_number":911,"context_line":"        dhcp_port \u003d self._get_dhcp_port(plugin_context, subnet[\u0027network_id\u0027])"},{"line_number":912,"context_line":""},{"line_number":913,"context_line":"        if dhcp_port:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_c1e6c8e7","line":910,"in_reply_to":"5a74a57a_400c8d94","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"61d5c56e6bcb57b0bffdaf11aa259160de956eb0","unresolved":false,"context_lines":[{"line_number":916,"context_line":"                fixed_ips \u003d [fip for fip in fixed_ips"},{"line_number":917,"context_line":"                             if fip[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":918,"context_line":"            else:"},{"line_number":919,"context_line":"                fixed_ips.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"            if fixed_ips:"},{"line_number":922,"context_line":"                return self.db.update_port("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_e0ee79eb","line":919,"updated":"2016-11-23 13:02:30.000000000","message":"I think there are probably update_subnet_postcommit cases where the subnet already existed and was already DHCP-enabled (e.g. adding a host route), and so the dhcp_port will already have a fixed IP for the subnet.","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":11898,"name":"Alexander Saprykin","email":"cutwatercore@gmail.com","username":"asaprykin"},"change_message_id":"2942c2842454b53d16bf3eb176762a476a62d0f4","unresolved":false,"context_lines":[{"line_number":916,"context_line":"                fixed_ips \u003d [fip for fip in fixed_ips"},{"line_number":917,"context_line":"                             if fip[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":918,"context_line":"            else:"},{"line_number":919,"context_line":"                fixed_ips.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"            if fixed_ips:"},{"line_number":922,"context_line":"                return self.db.update_port("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_013fe025","line":919,"in_reply_to":"5a74a57a_e0ee79eb","updated":"2016-11-30 14:49:50.000000000","message":"Done","commit_id":"c46aa2d078f2d02a9c8b6c8df0d57b1f3d1170d5"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"dad04e3d8b3387ab6ed1049a1ed04e5a4fb8a0c0","unresolved":false,"context_lines":[{"line_number":918,"context_line":"            old_subnets \u003d set(fip[\u0027subnet_id\u0027]"},{"line_number":919,"context_line":"                              for fip in dhcp_port[\u0027fixed_ips\u0027])"},{"line_number":920,"context_line":"            to_add \u003d new_subnets - old_subnets"},{"line_number":921,"context_line":"            to_del \u003d old_subnets - new_subnets"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"            fixed_ips \u003d [fip for fip in dhcp_port[\u0027fixed_ips\u0027]"},{"line_number":924,"context_line":"                         if fip[\u0027subnet_id\u0027] not in to_del]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_29067e20","line":921,"updated":"2016-11-30 16:01:12.000000000","message":"would the check for emptyness help here (check \"to_add\" and \"to_del\" and return if empty) ?","commit_id":"dbc2e21c50962e7a0e01a1491fa5130cda918667"}]}
