)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-11-09 12:34:29 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DHCP port per lswitch"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I25c6a6876945c9e6ee10887e8900564692455258"},{"line_number":10,"context_line":"Closes-Bug: #1725983"},{"line_number":11,"context_line":"Closes-Bug: #1531377"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"1f485f77_9773344e","line":8,"updated":"2017-11-09 11:52:56.000000000","message":"please add more details in the commit message","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-11-09 12:34:29 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DHCP port per lswitch"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I25c6a6876945c9e6ee10887e8900564692455258"},{"line_number":10,"context_line":"Closes-Bug: #1725983"},{"line_number":11,"context_line":"Closes-Bug: #1531377"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"1f485f77_56e6d5ea","line":8,"in_reply_to":"1f485f77_9773344e","updated":"2017-11-09 21:44:36.000000000","message":"will do","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"}],"dragonflow/controller/apps/dhcp.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                  const.L2_LOOKUP_TABLE)"},{"line_number":69,"context_line":"        self._port_rate_limiters.clear()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _create_port_limter(self, lport):"},{"line_number":72,"context_line":"        port_rate_limiter \u003d df_utils.RateLimiter("},{"line_number":73,"context_line":"            max_rate\u003dself.conf.df_dhcp_max_rate_per_sec,"},{"line_number":74,"context_line":"            time_unit\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_748967c8","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":27},"updated":"2017-09-14 07:53:03.000000000","message":"typo: _create_port_limiter ?","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                  const.L2_LOOKUP_TABLE)"},{"line_number":69,"context_line":"        self._port_rate_limiters.clear()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _create_port_limter(self, lport):"},{"line_number":72,"context_line":"        port_rate_limiter \u003d df_utils.RateLimiter("},{"line_number":73,"context_line":"            max_rate\u003dself.conf.df_dhcp_max_rate_per_sec,"},{"line_number":74,"context_line":"            time_unit\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_e21b15c7","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":27},"in_reply_to":"5f2577a7_748967c8","updated":"2017-09-19 07:27:59.000000000","message":"removed","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self._port_rate_limiters[lport.id] \u003d port_rate_limiter"},{"line_number":76,"context_line":"        return port_rate_limiter"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_342f5fa2","line":78,"range":{"start_line":78,"start_character":39,"end_line":78,"end_character":46},"updated":"2017-09-14 07:53:03.000000000","message":"Unused parameter","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self._port_rate_limiters[lport.id] \u003d port_rate_limiter"},{"line_number":76,"context_line":"        return port_rate_limiter"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_625e0577","line":78,"range":{"start_line":78,"start_character":39,"end_line":78,"end_character":46},"in_reply_to":"5f2577a7_342f5fa2","updated":"2017-09-19 07:27:59.000000000","message":"will removed","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_d44ffb8f","line":80,"range":{"start_line":80,"start_character":33,"end_line":80,"end_character":52},"updated":"2017-09-14 07:53:03.000000000","message":"I think it would be better to use a defaultdict here.\ne.g.:\n\nself._port_rate_limiters \u003d defaultdict(functools.partial(df_utils.RateLimiter, max_rate\u003dself.conf.df_dhcp_max_rate_per_sec, time_unit\u003d1))","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_545b0b53","line":80,"range":{"start_line":80,"start_character":33,"end_line":80,"end_character":52},"updated":"2017-09-14 07:53:03.000000000","message":"_port_rate_limiters[lport.id] is not removed when the port is deleted (Potential memory leak)","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_029061ec","line":80,"range":{"start_line":80,"start_character":33,"end_line":80,"end_character":52},"in_reply_to":"5f2577a7_545b0b53","updated":"2017-09-19 07:27:59.000000000","message":"done","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _check_port_limit(self, lport, src_key):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        port_rate_limiter \u003d self._port_rate_limiters.get(lport.id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_c2637941","line":80,"range":{"start_line":80,"start_character":33,"end_line":80,"end_character":52},"in_reply_to":"5f2577a7_d44ffb8f","updated":"2017-09-19 07:27:59.000000000","message":"done","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        if port_rate_limiter():"},{"line_number":86,"context_line":"            return True"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return False"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def packet_in_handler(self, event):"},{"line_number":91,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_b43b4fe9","line":88,"range":{"start_line":85,"start_character":0,"end_line":88,"end_character":20},"updated":"2017-09-14 07:53:03.000000000","message":"Can be shortened to: return port_rate_limiter() (or return bool(port_rate_limiter())","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        if port_rate_limiter is None:"},{"line_number":83,"context_line":"            port_rate_limiter \u003d self._create_port_limter(lport)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        if port_rate_limiter():"},{"line_number":86,"context_line":"            return True"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return False"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def packet_in_handler(self, event):"},{"line_number":91,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_8259f18e","line":88,"range":{"start_line":85,"start_character":0,"end_line":88,"end_character":20},"in_reply_to":"5f2577a7_b43b4fe9","updated":"2017-09-19 07:27:59.000000000","message":"done","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        return subnet.cidr.version \u003d\u003d n_const.IP_VERSION_4"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def _block_port_dhcp_traffic(self, unique_key, lport):"},{"line_number":378,"context_line":"        LOG.warning(\"pass rate limit for %(port_id)s blocking DHCP \""},{"line_number":379,"context_line":"                    \"traffic for %(time)s sec\","},{"line_number":380,"context_line":"                    {\u0027port_id\u0027: lport.id,"},{"line_number":381,"context_line":"                     \u0027time\u0027: self.block_hard_timeout})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        match \u003d self.parser.OFPMatch(reg6\u003dunique_key)"},{"line_number":384,"context_line":"        drop_inst \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_740e073c","line":381,"range":{"start_line":378,"start_character":0,"end_line":381,"end_character":54},"updated":"2017-09-14 07:53:03.000000000","message":"I think it would be better that this warning will be at the caller","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        return subnet.cidr.version \u003d\u003d n_const.IP_VERSION_4"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def _block_port_dhcp_traffic(self, unique_key, lport):"},{"line_number":378,"context_line":"        LOG.warning(\"pass rate limit for %(port_id)s blocking DHCP \""},{"line_number":379,"context_line":"                    \"traffic for %(time)s sec\","},{"line_number":380,"context_line":"                    {\u0027port_id\u0027: lport.id,"},{"line_number":381,"context_line":"                     \u0027time\u0027: self.block_hard_timeout})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        match \u003d self.parser.OFPMatch(reg6\u003dunique_key)"},{"line_number":384,"context_line":"        drop_inst \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_22547d52","line":381,"range":{"start_line":378,"start_character":0,"end_line":381,"end_character":54},"in_reply_to":"5f2577a7_740e073c","updated":"2017-09-19 07:27:59.000000000","message":"done","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":404,"context_line":"            match\u003dmatch)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def _remove_dhcp_port_flow(self, lswitch):"},{"line_number":407,"context_line":"        parser \u003d self.parser"},{"line_number":408,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":409,"context_line":"        match \u003d parser.OFPMatch(metadata\u003dlswitch.unique_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_34087f2a","line":406,"range":{"start_line":406,"start_character":8,"end_line":406,"end_character":30},"updated":"2017-09-14 07:53:03.000000000","message":"This removes the network flow. Maybe rename to e.g. _remove_dhcp_network_flow ?","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":404,"context_line":"            match\u003dmatch)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def _remove_dhcp_port_flow(self, lswitch):"},{"line_number":407,"context_line":"        parser \u003d self.parser"},{"line_number":408,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":409,"context_line":"        match \u003d parser.OFPMatch(metadata\u003dlswitch.unique_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_62d3a5d6","line":406,"range":{"start_line":406,"start_character":8,"end_line":406,"end_character":30},"in_reply_to":"5f2577a7_34087f2a","updated":"2017-09-19 07:27:59.000000000","message":"done","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":414,"context_line":"            match\u003dmatch)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":417,"context_line":"        # FIXME (leyal): unify sunets and ips in db-model"},{"line_number":418,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":419,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":420,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_14034311","line":417,"range":{"start_line":417,"start_character":0,"end_line":417,"end_character":57},"updated":"2017-09-14 07:53:03.000000000","message":"Worth a bug","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":417,"context_line":"        # FIXME (leyal): unify sunets and ips in db-model"},{"line_number":418,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":419,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        while True:"},{"line_number":422,"context_line":"            try:"},{"line_number":423,"context_line":"                ip \u003d next(ips_iter)"},{"line_number":424,"context_line":"                subnet \u003d next(subnet_iter)"},{"line_number":425,"context_line":"                self._dhcp_ip_by_subnet[subnet.id] \u003d ip"},{"line_number":426,"context_line":"            except StopIteration:"},{"line_number":427,"context_line":"                break"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_CREATED)"},{"line_number":430,"context_line":"    def _lport_created(self, lport):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_8f0cba3b","line":427,"range":{"start_line":418,"start_character":0,"end_line":427,"end_character":21},"updated":"2017-09-14 07:53:03.000000000","message":"This is the same as:\nself._dhcp_ip_by_subnet.update(dict(zip(lport.subnets, lport.ips)))","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":417,"context_line":"        # FIXME (leyal): unify sunets and ips in db-model"},{"line_number":418,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":419,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        while True:"},{"line_number":422,"context_line":"            try:"},{"line_number":423,"context_line":"                ip \u003d next(ips_iter)"},{"line_number":424,"context_line":"                subnet \u003d next(subnet_iter)"},{"line_number":425,"context_line":"                self._dhcp_ip_by_subnet[subnet.id] \u003d ip"},{"line_number":426,"context_line":"            except StopIteration:"},{"line_number":427,"context_line":"                break"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_CREATED)"},{"line_number":430,"context_line":"    def _lport_created(self, lport):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_82e7b1ac","line":427,"range":{"start_line":418,"start_character":0,"end_line":427,"end_character":21},"in_reply_to":"5f2577a7_8f0cba3b","updated":"2017-09-19 07:27:59.000000000","message":"it\u0027s a problem as subnet is a ModelProxy , and we need it\u0027s id ..","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f359e6174f514f21b03eedf2015af5fcc3ee4ad4","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            match\u003dmatch)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":420,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":421,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        while True:"},{"line_number":424,"context_line":"            try:"},{"line_number":425,"context_line":"                ip \u003d next(ips_iter)"},{"line_number":426,"context_line":"                subnet \u003d next(subnet_iter)"},{"line_number":427,"context_line":"                self._dhcp_ip_by_subnet[subnet.id] \u003d ip"},{"line_number":428,"context_line":"            except StopIteration:"},{"line_number":429,"context_line":"                break"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_CREATED)"},{"line_number":432,"context_line":"    def _lport_created(self, lport):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff5d4b2f_901d7cbf","line":429,"range":{"start_line":420,"start_character":1,"end_line":429,"end_character":21},"updated":"2017-09-19 05:45:48.000000000","message":"Taken from PS1 (with slight modification:\n\nThis is the same as:\n\nsubnet_ids \u003d (subnet.id for subnet in lport.subnets)\n\nself._dhcp_ip_by_subnet.update(dict(zip(subnet_ids, lport.ips)))","commit_id":"dc3b3197844eba659859a9fcf077ec941a34db8f"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            match\u003dmatch)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":420,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":421,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        while True:"},{"line_number":424,"context_line":"            try:"},{"line_number":425,"context_line":"                ip \u003d next(ips_iter)"},{"line_number":426,"context_line":"                subnet \u003d next(subnet_iter)"},{"line_number":427,"context_line":"                self._dhcp_ip_by_subnet[subnet.id] \u003d ip"},{"line_number":428,"context_line":"            except StopIteration:"},{"line_number":429,"context_line":"                break"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_CREATED)"},{"line_number":432,"context_line":"    def _lport_created(self, lport):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff5d4b2f_fe93695b","line":429,"range":{"start_line":420,"start_character":1,"end_line":429,"end_character":21},"in_reply_to":"ff5d4b2f_901d7cbf","updated":"2017-09-19 07:27:59.000000000","message":"will do..","commit_id":"dc3b3197844eba659859a9fcf077ec941a34db8f"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"c762af922010bde6875f48332c41e08f0777cd39","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            index\u003dl2.LogicalPort.get_index(\u0027unique_key\u0027),"},{"line_number":95,"context_line":"        )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if self._check_port_limit(lport, unique_key):"},{"line_number":98,"context_line":"            self._block_port_dhcp_traffic(unique_key, lport)"},{"line_number":99,"context_line":"            LOG.warning(\"pass rate limit for %(port_id)s blocking DHCP \""},{"line_number":100,"context_line":"                        \"traffic for %(time)s sec\","}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_2963cc1c","line":97,"range":{"start_line":97,"start_character":41,"end_line":97,"end_character":51},"updated":"2017-09-25 11:49:05.000000000","message":"Isn\u0027t the last argument redundant?","commit_id":"22c633704a89a80974131ac88b0bce4962c15f30"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"5dc51ed25dd5f495026d3e9b3adb4a2b91a9ef0f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            index\u003dl2.LogicalPort.get_index(\u0027unique_key\u0027),"},{"line_number":95,"context_line":"        )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if self._check_port_limit(lport, unique_key):"},{"line_number":98,"context_line":"            self._block_port_dhcp_traffic(unique_key, lport)"},{"line_number":99,"context_line":"            LOG.warning(\"pass rate limit for %(port_id)s blocking DHCP \""},{"line_number":100,"context_line":"                        \"traffic for %(time)s sec\","}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_a4cc73bc","line":97,"range":{"start_line":97,"start_character":41,"end_line":97,"end_character":51},"in_reply_to":"7f515b1d_2963cc1c","updated":"2017-09-25 18:26:08.000000000","message":"yep, thanks.","commit_id":"22c633704a89a80974131ac88b0bce4962c15f30"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"c762af922010bde6875f48332c41e08f0777cd39","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        options \u003d dhcp.options(option_list\u003doption_list)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        dhcp_server_address \u003d dhcp_server_address"},{"line_number":169,"context_line":"        dhcp_response \u003d ryu_packet.Packet()"},{"line_number":170,"context_line":"        dhcp_response.add_protocol(ethernet.ethernet("},{"line_number":171,"context_line":"                                                ethertype\u003dether.ETH_TYPE_IP,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_89ae402c","line":168,"updated":"2017-09-25 11:49:05.000000000","message":"What does this line do?","commit_id":"22c633704a89a80974131ac88b0bce4962c15f30"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"5dc51ed25dd5f495026d3e9b3adb4a2b91a9ef0f","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        options \u003d dhcp.options(option_list\u003doption_list)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        dhcp_server_address \u003d dhcp_server_address"},{"line_number":169,"context_line":"        dhcp_response \u003d ryu_packet.Packet()"},{"line_number":170,"context_line":"        dhcp_response.add_protocol(ethernet.ethernet("},{"line_number":171,"context_line":"                                                ethertype\u003dether.ETH_TYPE_IP,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_44c13f80","line":168,"in_reply_to":"7f515b1d_89ae402c","updated":"2017-09-25 18:26:08.000000000","message":"ops","commit_id":"22c633704a89a80974131ac88b0bce4962c15f30"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"58ce18607e9ca9b4544bd971d64da78b1f5aaf3c","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            match\u003dmatch)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _add_dhcp_ips_by_subnet(self, lport):"},{"line_number":419,"context_line":"        ips_iter \u003d iter(lport.ips)"},{"line_number":420,"context_line":"        subnet_iter \u003d iter(lport.subnets)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        while True:"},{"line_number":423,"context_line":"            try:"},{"line_number":424,"context_line":"                ip \u003d next(ips_iter)"},{"line_number":425,"context_line":"                subnet \u003d next(subnet_iter)"},{"line_number":426,"context_line":"                self._dhcp_ip_by_subnet[subnet.id] \u003d ip"},{"line_number":427,"context_line":"            except StopIteration:"},{"line_number":428,"context_line":"                break"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_CREATED)"},{"line_number":431,"context_line":"    def _lport_created(self, lport):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f515b1d_8a75cb66","line":428,"range":{"start_line":419,"start_character":0,"end_line":428,"end_character":21},"updated":"2017-09-27 05:15:17.000000000","message":"Still not using dict(zip(...)) :)","commit_id":"6e47020474b84bb28eb94b7eed93430c87257b9e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2e20565e8628960e9fe4a1d16323978698a54da9","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        self.add_flow_go_to_table(const.SERVICES_CLASSIFICATION_TABLE,"},{"line_number":365,"context_line":"                                  const.PRIORITY_MEDIUM,"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"                                  const.DHCP_TABLE, match\u003dmatch)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _is_ipv4(self, subnet):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f515b1d_043f8487","line":367,"updated":"2017-09-27 13:13:31.000000000","message":"Redundant blank lines?","commit_id":"6b36b8f54d687a48b88a097fabdd062b2e66fb49"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"1cbb4ab1f4722d0de02603efa31ca6907e839784","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        self.add_flow_go_to_table(const.SERVICES_CLASSIFICATION_TABLE,"},{"line_number":365,"context_line":"                                  const.PRIORITY_MEDIUM,"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"                                  const.DHCP_TABLE, match\u003dmatch)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _is_ipv4(self, subnet):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f515b1d_a47550cd","line":367,"in_reply_to":"7f515b1d_043f8487","updated":"2017-09-27 13:27:15.000000000","message":"ops .. \nhow pep8 didn\u0027t catch it :/","commit_id":"6b36b8f54d687a48b88a097fabdd062b2e66fb49"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        self._uninstall_dhcp_port_responders(orig_lport)"},{"line_number":434,"context_line":"        self._install_dhcp_port_responders(lport)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    def _update_dhcp_ips_by_sbunet(self, lport, orig_lport):"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        self._add_dhcp_ips_by_subnet(lport)"},{"line_number":439,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_88a23efb","line":436,"range":{"start_line":436,"start_character":28,"end_line":436,"end_character":34},"updated":"2017-09-28 18:42:26.000000000","message":"subnet","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":454,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_UPDATED)"},{"line_number":455,"context_line":"    def _lport_updated(self, lport, orig_lport):"},{"line_number":456,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":457,"context_line":"            self._delete_lport_rate_limiter(lport)"},{"line_number":458,"context_line":"            return"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        if set(lport.ips) !\u003d set(orig_lport.ips) or ("}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_08b64e3f","line":457,"range":{"start_line":457,"start_character":17,"end_line":457,"end_character":43},"updated":"2017-09-28 18:42:26.000000000","message":"Why delete rate limiter on update?","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":454,"context_line":"    @df_base_app.register_event(l2.LogicalPort, model_constants.EVENT_UPDATED)"},{"line_number":455,"context_line":"    def _lport_updated(self, lport, orig_lport):"},{"line_number":456,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":457,"context_line":"            self._delete_lport_rate_limiter(lport)"},{"line_number":458,"context_line":"            return"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        if set(lport.ips) !\u003d set(orig_lport.ips) or ("}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_8fd55de8","line":457,"range":{"start_line":457,"start_character":17,"end_line":457,"end_character":43},"in_reply_to":"7f515b1d_08b64e3f","updated":"2017-10-03 16:14:57.000000000","message":"should be on delete , thanks .","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":467,"context_line":""},{"line_number":468,"context_line":"        self._update_dhcp_ips_by_sbunet(lport, orig_lport)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    def _delete_dhcp_ips_by_subent(self, lport):"},{"line_number":471,"context_line":"        for subnet in lport.subnets:"},{"line_number":472,"context_line":"            del self._dhcp_ip_by_subnet[subnet.id]"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_a88a9a66","line":470,"range":{"start_line":470,"start_character":28,"end_line":470,"end_character":34},"updated":"2017-09-28 18:42:26.000000000","message":"subnet","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c04194a125dc1b8c24709483268d6bc443512d38","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        self._update_dhcp_ips_by_subnet(lport, orig_lport)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _delete_dhcp_ips_by_subent(self, lport):"},{"line_number":470,"context_line":"        for subnet in lport.subnets:"},{"line_number":471,"context_line":"            del self._dhcp_ip_by_subnet[subnet.id]"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_5b08b090","line":469,"range":{"start_line":469,"start_character":28,"end_line":469,"end_character":34},"updated":"2017-10-15 13:00:49.000000000","message":"typo: subent -\u003e subnet?","commit_id":"5a70f125815f07aaa47cdc4b76296734aacce8d8"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c368503230424440f8d99848156eb0f3f5d9f6ad","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        self._update_dhcp_ips_by_subnet(lport, orig_lport)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _delete_dhcp_ips_by_subent(self, lport):"},{"line_number":470,"context_line":"        for subnet in lport.subnets:"},{"line_number":471,"context_line":"            del self._dhcp_ip_by_subnet[subnet.id]"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_4b2e6c92","line":469,"range":{"start_line":469,"start_character":28,"end_line":469,"end_character":34},"in_reply_to":"5f4e5783_5b08b090","updated":"2017-10-17 12:06:35.000000000","message":"done","commit_id":"5a70f125815f07aaa47cdc4b76296734aacce8d8"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"76a26ff927c85214d24e391b8fc13196213eec6a","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                                  const.PRIORITY_MEDIUM,"},{"line_number":366,"context_line":"                                  const.DHCP_TABLE, match\u003dmatch)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def _is_ipv4(self, subnet):"},{"line_number":369,"context_line":"        return subnet.cidr.version \u003d\u003d n_const.IP_VERSION_4"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def _block_port_dhcp_traffic(self, unique_key, lport):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_50207648","line":368,"range":{"start_line":368,"start_character":8,"end_line":368,"end_character":16},"updated":"2017-10-25 08:12:42.000000000","message":"Is this still used?","commit_id":"9bba9d5fce4fa730feeb10b9d7784c3cdfddc7fd"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"488d1e0804eda2ffe4533adcad5425eb6a6a8d90","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                                  const.PRIORITY_MEDIUM,"},{"line_number":366,"context_line":"                                  const.DHCP_TABLE, match\u003dmatch)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def _is_ipv4(self, subnet):"},{"line_number":369,"context_line":"        return subnet.cidr.version \u003d\u003d n_const.IP_VERSION_4"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def _block_port_dhcp_traffic(self, unique_key, lport):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_be0bfbd3","line":368,"range":{"start_line":368,"start_character":8,"end_line":368,"end_character":16},"in_reply_to":"3f4b6375_50207648","updated":"2017-10-25 09:31:05.000000000","message":"will removed","commit_id":"9bba9d5fce4fa730feeb10b9d7784c3cdfddc7fd"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"76a26ff927c85214d24e391b8fc13196213eec6a","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":457,"context_line":"            return"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        if set(lport.ips) !\u003d set(orig_lport.ips) or ("},{"line_number":460,"context_line":"                    lport.mac !\u003d orig_lport.mac):"},{"line_number":461,"context_line":"            self._update_port_responders(lport, orig_lport)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_90b82ee5","line":459,"range":{"start_line":459,"start_character":21,"end_line":459,"end_character":24},"updated":"2017-10-25 08:12:42.000000000","message":"What happens when the lport have an IPv6 address?","commit_id":"9bba9d5fce4fa730feeb10b9d7784c3cdfddc7fd"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"488d1e0804eda2ffe4533adcad5425eb6a6a8d90","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":457,"context_line":"            return"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        if set(lport.ips) !\u003d set(orig_lport.ips) or ("},{"line_number":460,"context_line":"                    lport.mac !\u003d orig_lport.mac):"},{"line_number":461,"context_line":"            self._update_port_responders(lport, orig_lport)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_fec3b355","line":459,"range":{"start_line":459,"start_character":21,"end_line":459,"end_character":24},"in_reply_to":"3f4b6375_90b82ee5","updated":"2017-10-25 09:31:05.000000000","message":"The DHCP-module (in the ml2-plugin) should not create ipv6 ports in the dhcp , as dhcpv6 not supported . I will add validation on that in the module (will throw an exception when ipv6 will enable dhcp will deployed )","commit_id":"9bba9d5fce4fa730feeb10b9d7784c3cdfddc7fd"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":459,"context_line":"        if v4_ips !\u003d v4_old_ips or lport.mac !\u003d orig_lport.mac:"},{"line_number":460,"context_line":"            self._update_port_responders(lport, orig_lport)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        if lport.lswitch.id !\u003d orig_lport.lswitch.id:"},{"line_number":463,"context_line":"            self._remove_dhcp_network_flow(orig_lport.lswitch)"},{"line_number":464,"context_line":"            self._install_dhcp_port_flow(lport.lswitch)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        self._update_dhcp_ips_by_subnet(lport, orig_lport)"},{"line_number":467,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_046f16fd","line":464,"range":{"start_line":462,"start_character":0,"end_line":464,"end_character":55},"updated":"2017-11-08 09:33:45.000000000","message":"I\u0027m not sure a port can move to another network...","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":459,"context_line":"        if v4_ips !\u003d v4_old_ips or lport.mac !\u003d orig_lport.mac:"},{"line_number":460,"context_line":"            self._update_port_responders(lport, orig_lport)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        if lport.lswitch.id !\u003d orig_lport.lswitch.id:"},{"line_number":463,"context_line":"            self._remove_dhcp_network_flow(orig_lport.lswitch)"},{"line_number":464,"context_line":"            self._install_dhcp_port_flow(lport.lswitch)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        self._update_dhcp_ips_by_subnet(lport, orig_lport)"},{"line_number":467,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_783429ad","line":464,"range":{"start_line":462,"start_character":0,"end_line":464,"end_character":55},"in_reply_to":"3f4b6375_046f16fd","updated":"2017-11-08 12:53:18.000000000","message":"It\u0027s can\u0027t , Removed","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def _install_dhcp_port_responders(self, lport):"},{"line_number":511,"context_line":"        if len(lport.ips) !\u003d 0:"},{"line_number":512,"context_line":"            self._get_dhcp_port_arp_responder(lport).add()"},{"line_number":513,"context_line":"            self._install_dhcp_port_icmp_responder(lport)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def _uninstall_dhcp_port_responders(self, lport):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_642ecaac","line":512,"range":{"start_line":512,"start_character":0,"end_line":512,"end_character":58},"updated":"2017-11-08 09:33:45.000000000","message":"What about arp responders per IP?","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def _install_dhcp_port_responders(self, lport):"},{"line_number":511,"context_line":"        if len(lport.ips) !\u003d 0:"},{"line_number":512,"context_line":"            self._get_dhcp_port_arp_responder(lport).add()"},{"line_number":513,"context_line":"            self._install_dhcp_port_icmp_responder(lport)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def _uninstall_dhcp_port_responders(self, lport):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_1843f515","line":512,"range":{"start_line":512,"start_character":0,"end_line":512,"end_character":58},"in_reply_to":"3f4b6375_642ecaac","updated":"2017-11-08 12:53:18.000000000","message":"I added , (I confused as there is only one MAC addr but it\u0027s should replay to all ips )","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":454,"context_line":"            return"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        v4_ips \u003d set(ip for ip in lport.ips if ip.version \u003d\u003d 4)"},{"line_number":457,"context_line":"        v4_old_ips \u003d set(ip for ip in orig_lport.ips if ip.version \u003d\u003d 4)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        if v4_ips !\u003d v4_old_ips or lport.mac !\u003d orig_lport.mac:"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_03602e32","line":456,"range":{"start_line":456,"start_character":61,"end_line":456,"end_character":62},"updated":"2017-11-09 07:26:48.000000000","message":"Please use common_const.IP_VERSION_4 throughout the file","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        if lport.device_owner !\u003d n_const.DEVICE_OWNER_DHCP:"},{"line_number":454,"context_line":"            return"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        v4_ips \u003d set(ip for ip in lport.ips if ip.version \u003d\u003d 4)"},{"line_number":457,"context_line":"        v4_old_ips \u003d set(ip for ip in orig_lport.ips if ip.version \u003d\u003d 4)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        if v4_ips !\u003d v4_old_ips or lport.mac !\u003d orig_lport.mac:"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_66d25037","line":456,"range":{"start_line":456,"start_character":61,"end_line":456,"end_character":62},"in_reply_to":"1f485f77_03602e32","updated":"2017-11-09 09:17:21.000000000","message":"done","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"}],"dragonflow/neutron/ml2/dhcp_module.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_dhcp_port(port):"},{"line_number":31,"context_line":"    return port[\u0027device_owner\u0027] is n_const.DEVICE_OWNER_DHCP"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class DfDHCPMoudle(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_0f468a50","line":31,"range":{"start_line":31,"start_character":32,"end_line":31,"end_character":34},"updated":"2017-09-14 07:53:03.000000000","message":"It is better to use \u0027\u003d\u003d\u0027 in this case. is tests by reference, whereas \u003d\u003d tests by content (And in theory, two different strings may have the same content)","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d ports[0][\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_af7096a6","line":62,"range":{"start_line":59,"start_character":0,"end_line":62,"end_character":31},"updated":"2017-09-14 07:53:03.000000000","message":"Can\u0027t you add the network_id to the filter?","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d ports[0][\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_5e964f4e","line":62,"range":{"start_line":59,"start_character":0,"end_line":62,"end_character":31},"in_reply_to":"5f2577a7_af7096a6","updated":"2017-09-19 07:27:59.000000000","message":"Don\u0027t sure that is good reason , the filter with \u0027network_id\u0027 didn\u0027t worked for me and i still don\u0027t understood why (done small digging into the filter code   currently can\u0027t understand why it\u0027s not work , i will try to do dig a little bit more )","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":133,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        if not _is_subnet_enable_dhcp(subnet):"},{"line_number":136,"context_line":"            self._remove_dhcp_subnet_from_netowrk(context,"},{"line_number":137,"context_line":"                                                  subnet[\u0027network_id\u0027],"},{"line_number":138,"context_line":"                                                  subnet)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_2fb9462d","line":135,"range":{"start_line":135,"start_character":11,"end_line":135,"end_character":14},"updated":"2017-09-14 07:53:03.000000000","message":"You sure? :)","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":133,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        if not _is_subnet_enable_dhcp(subnet):"},{"line_number":136,"context_line":"            self._remove_dhcp_subnet_from_netowrk(context,"},{"line_number":137,"context_line":"                                                  subnet[\u0027network_id\u0027],"},{"line_number":138,"context_line":"                                                  subnet)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_62a16546","line":135,"range":{"start_line":135,"start_character":11,"end_line":135,"end_character":14},"in_reply_to":"5f2577a7_2fb9462d","updated":"2017-09-19 07:27:59.000000000","message":"fixed","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"87d9f6e419450235b568035f377ab89615bdafb2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        else:"},{"line_number":85,"context_line":"            self._create_dhcp_port(context, subnet)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _remove_dhcp_subnet_from_netowrk(self, context, network_id, subnet):"},{"line_number":88,"context_line":"        port \u003d self._get_lswitch_dhcp_port(network_id, context)"},{"line_number":89,"context_line":"        if not port:"},{"line_number":90,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_7ef58bec","line":87,"range":{"start_line":87,"start_character":33,"end_line":87,"end_character":40},"updated":"2017-09-17 11:57:55.000000000","message":"network","commit_id":"403bce2fa42837cb487bd86388f156772075685d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f359e6174f514f21b03eedf2015af5fcc3ee4ad4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d ports[0][\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff5d4b2f_7078c8f7","line":62,"range":{"start_line":59,"start_character":0,"end_line":62,"end_character":31},"updated":"2017-09-19 05:45:48.000000000","message":"Not answered from PS1: Can\u0027t you add the network_id to the filter?","commit_id":"dc3b3197844eba659859a9fcf077ec941a34db8f"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f0732f6d59e3c138f6d401b7867a4a1f249f09a8","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d ports[0][\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff5d4b2f_5e939550","line":62,"range":{"start_line":59,"start_character":0,"end_line":62,"end_character":31},"in_reply_to":"ff5d4b2f_7078c8f7","updated":"2017-09-19 07:27:59.000000000","message":"(I forgot to submit the answer in PS1..)\n\nDon\u0027t sure that is good reason , the filter with \u0027network_id\u0027 didn\u0027t worked for me and i still don\u0027t understood why (done small digging into the filter code   currently can\u0027t understand why it\u0027s not work , i will try to do dig a little bit more )","commit_id":"dc3b3197844eba659859a9fcf077ec941a34db8f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"58ce18607e9ca9b4544bd971d64da78b1f5aaf3c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f515b1d_8a238b56","line":62,"updated":"2017-09-27 05:15:17.000000000","message":"re: Adding network_id to filters: Can be a nit for now.","commit_id":"6e47020474b84bb28eb94b7eed93430c87257b9e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    return port[\u0027device_owner\u0027] \u003d\u003d n_const.DEVICE_OWNER_DHCP"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class DfDHCPMoudle(object):"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self):"},{"line_number":37,"context_line":"        self._register_subnet_events()"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_45dc2fe3","line":34,"range":{"start_line":34,"start_character":6,"end_line":34,"end_character":18},"updated":"2017-09-28 18:42:26.000000000","message":"I think Df and DHCP should be capitalized the same, also, Moudle-\u003eModule","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def core_plugin(self):"},{"line_number":41,"context_line":"        return directory.get_plugin()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _register_events(self, resource, function_by_action):"},{"line_number":44,"context_line":"        for action, func in function_by_action.items():"},{"line_number":45,"context_line":"            registry.subscribe(func, resource, action)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _register_subnet_events(self):"},{"line_number":48,"context_line":"        function_by_action \u003d {"},{"line_number":49,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":50,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":51,"context_line":"            events.AFTER_DELETE: self._sunet_delete_handler"},{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        self._register_events(resources.SUBNET, function_by_action)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_lswitch_dhcp_port(self, network_id, context):"},{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_859c670e","line":53,"range":{"start_line":43,"start_character":0,"end_line":53,"end_character":67},"updated":"2017-09-28 18:42:26.000000000","message":"Special reason to split the two?","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def core_plugin(self):"},{"line_number":41,"context_line":"        return directory.get_plugin()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _register_events(self, resource, function_by_action):"},{"line_number":44,"context_line":"        for action, func in function_by_action.items():"},{"line_number":45,"context_line":"            registry.subscribe(func, resource, action)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _register_subnet_events(self):"},{"line_number":48,"context_line":"        function_by_action \u003d {"},{"line_number":49,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":50,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":51,"context_line":"            events.AFTER_DELETE: self._sunet_delete_handler"},{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        self._register_events(resources.SUBNET, function_by_action)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_lswitch_dhcp_port(self, network_id, context):"},{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_ef3cd131","line":53,"range":{"start_line":43,"start_character":0,"end_line":53,"end_character":67},"in_reply_to":"7f515b1d_859c670e","updated":"2017-10-03 16:14:57.000000000","message":"It\u0027s because when i wrote it i think that will include also port event.. i will update","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        self._register_events(resources.SUBNET, function_by_action)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_lswitch_dhcp_port(self, network_id, context):"},{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_8538e7ed","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":30},"updated":"2017-09-28 18:42:26.000000000","message":"There is no notion of Lswitches or Lports in this code, just Neutron objects, I think _get_dhcp_port_by_network (or something of the kind) is better.\n\nAlso, context usually comes before the rest of the params, worth keeping it that way.","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        self._register_events(resources.SUBNET, function_by_action)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_lswitch_dhcp_port(self, network_id, context):"},{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_9a1c7dc2","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":30},"in_reply_to":"7f515b1d_8538e7ed","updated":"2017-10-03 16:14:57.000000000","message":"done","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_c5bfff5e","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":27},"updated":"2017-09-28 18:42:26.000000000","message":"if ports: is the pythonic way, but the whole thing is not needed, I\u0027d just do the loop, the function will return None if there\u0027s no explicit return","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        filters \u003d {\u0027device_owner\u0027: [n_const.DEVICE_OWNER_DHCP]}"},{"line_number":57,"context_line":"        ports \u003d self.core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_2f9d490a","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":27},"in_reply_to":"7f515b1d_c5bfff5e","updated":"2017-10-03 16:14:57.000000000","message":"Don\u0027t sure that i can trust on the core_plugin that will not return None - i will check that","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_48420640","line":61,"range":{"start_line":61,"start_character":15,"end_line":61,"end_character":52},"updated":"2017-09-28 18:42:26.000000000","message":"As Omer mentioned, worth adding to the filter.","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if 0 !\u003d len(ports):"},{"line_number":60,"context_line":"            for port in ports:"},{"line_number":61,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":62,"context_line":"                    return port"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_6fbc616c","line":61,"range":{"start_line":61,"start_character":15,"end_line":61,"end_character":52},"in_reply_to":"7f515b1d_48420640","updated":"2017-10-03 16:14:57.000000000","message":"Done","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _remove_dhcp_subnet_from_network(self, context, network_id, subnet):"},{"line_number":88,"context_line":"        port \u003d self._get_lswitch_dhcp_port(network_id, context)"},{"line_number":89,"context_line":"        if not port:"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_48144644","line":89,"range":{"start_line":89,"start_character":11,"end_line":89,"end_character":19},"updated":"2017-09-28 18:42:26.000000000","message":"nit: if port is None:","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _remove_dhcp_subnet_from_network(self, context, network_id, subnet):"},{"line_number":88,"context_line":"        port \u003d self._get_lswitch_dhcp_port(network_id, context)"},{"line_number":89,"context_line":"        if not port:"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_5a7cc5ea","line":89,"range":{"start_line":89,"start_character":11,"end_line":89,"end_character":19},"in_reply_to":"7f515b1d_48144644","updated":"2017-10-03 16:14:57.000000000","message":"done","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                             fixed_ips if"},{"line_number":95,"context_line":"                             x[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if len(port[\u0027fixed_ips\u0027]) \u003d\u003d 0:"},{"line_number":98,"context_line":"            # No subnet that enabled DHCP on the port any more"},{"line_number":99,"context_line":"            self.core_plugin.delete_port(context, port[\u0027id\u0027])"},{"line_number":100,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_6824a2af","line":97,"range":{"start_line":97,"start_character":11,"end_line":97,"end_character":39},"updated":"2017-09-28 18:42:26.000000000","message":"if not port[\u0027fixed_ips\u0027]:","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                             fixed_ips if"},{"line_number":95,"context_line":"                             x[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if len(port[\u0027fixed_ips\u0027]) \u003d\u003d 0:"},{"line_number":98,"context_line":"            # No subnet that enabled DHCP on the port any more"},{"line_number":99,"context_line":"            self.core_plugin.delete_port(context, port[\u0027id\u0027])"},{"line_number":100,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_da679551","line":97,"range":{"start_line":97,"start_character":11,"end_line":97,"end_character":39},"in_reply_to":"7f515b1d_6824a2af","updated":"2017-10-03 16:14:57.000000000","message":"done","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"0ca4d8f8b2d073c1f417f419f9d0a0e0bb7f753a","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                 subnet)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _sunet_delete_handler(self, resource, event, trigger, **kwargs):"},{"line_number":134,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":135,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_c8003604","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":29},"updated":"2017-09-28 18:42:26.000000000","message":"_subnet_..","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"375c40e2d66ca4a6ea4c9eb93a704b8cc6242700","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                 subnet)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _sunet_delete_handler(self, resource, event, trigger, **kwargs):"},{"line_number":134,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":135,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_7ac5410a","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":29},"in_reply_to":"7f515b1d_c8003604","updated":"2017-10-03 16:14:57.000000000","message":"done","commit_id":"44cbd531cc45d1077323b18196157cd09d3eeb0d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c04194a125dc1b8c24709483268d6bc443512d38","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if ports:"},{"line_number":59,"context_line":"            for port in ports:"},{"line_number":60,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":61,"context_line":"                    return port"},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_1bfeb86a","line":60,"range":{"start_line":60,"start_character":0,"end_line":60,"end_character":52},"updated":"2017-10-15 13:00:49.000000000","message":"Is this needed, now that the network id is in the filter?","commit_id":"5a70f125815f07aaa47cdc4b76296734aacce8d8"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c368503230424440f8d99848156eb0f3f5d9f6ad","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if ports:"},{"line_number":59,"context_line":"            for port in ports:"},{"line_number":60,"context_line":"                if network_id \u003d\u003d port[\u0027network_id\u0027]:"},{"line_number":61,"context_line":"                    return port"},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_eb151841","line":60,"range":{"start_line":60,"start_character":0,"end_line":60,"end_character":52},"in_reply_to":"5f4e5783_1bfeb86a","updated":"2017-10-17 12:06:35.000000000","message":"indeed redundant - done","commit_id":"5a70f125815f07aaa47cdc4b76296734aacce8d8"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"41b4c9670a213d76a9a567dc284255272d2f546b","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_08c195e5","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"updated":"2017-10-26 09:08:37.000000000","message":"Why not write this validation on the application itself? This will make the DHCP application \"stand alone\" and not trust the ml2 plugin to do the sanity for it","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"99853a78f2d4db713121b780b53158a5e55742b6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_f0f13e97","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"in_reply_to":"3f4b6375_08c195e5","updated":"2017-10-29 12:24:16.000000000","message":"I don\u0027t think that correct , because the dhcp-module in the ml2 contain all the logic about the creation of the port, and attach the port to subnet\u0027s.\nSo i think that is part of that should be part of that logic..","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"da08a7eb89a3cbcfe6054ecc55208fd0e67ca5bc","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_dd5acb81","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"in_reply_to":"3f4b6375_40684120","updated":"2017-10-30 13:04:39.000000000","message":"I don\u0027t sure that i agree with that - by definition part of DF logic is in the module , the topology that create one port per-network and not per subnet  - is not translation of neutron, it\u0027s logic that belong to DF. I think that all port management code should be in one place , if one part of dhcp-port-mgmt will be here - and other part in the controller it\u0027s will be confusing. \nThis code can be used also by another dhcp-api - and all what needed to be replaced is the IPAM (core_plugin.create_port())..","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"d9800948f7141074d7e2b4ba1b414d87c9199530","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_7b0b8029","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"in_reply_to":"3f4b6375_874bb685","updated":"2017-11-02 09:25:13.000000000","message":"I will add another validation also in the app. \n(So for writing a dhcpv6 app and using this port we will need to removed the validation here but not need to touch in the dhcp-v4 app)","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"92b6b02d47a2036f30c6c658cfb9455ff9411618","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_874bb685","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"in_reply_to":"3f4b6375_dd5acb81","updated":"2017-10-31 18:31:24.000000000","message":"It\u0027s not exactly management code. This DHCP application only applies to IPv4. The API part is not part of the application, and according to what you say above (If I understand correctly), when we support DHCPv6, it\u0027s possible we\u0027ll reuse the port, but use a different DF app. In which case, at least a filtering has to be added.","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"385bc0f5695020a81c55f2268d422b5204d7c48f","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return subnet[\u0027ip_version\u0027] \u003d\u003d 4"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _is_subnet_enable_dhcp(subnet):"},{"line_number":31,"context_line":"    # currently dhcp support only ipv4"},{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_40684120","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":26},"in_reply_to":"3f4b6375_f0f13e97","updated":"2017-10-29 20:23:05.000000000","message":"lihi: +1\n\nThe Neutron driver is a translation layer - it does not define or enforce Dragonflow API or capabilities. It is more defensive to verify both locations - Neutron driver and application. This way if we have another DHCP API, e.g. via k8s, the validation won\u0027t be missed. Note that this is an error that exists in the legacy dhcp implementation.","commit_id":"9fc683e47ddcc431dfadcde87527fe5092c0343f"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if (_is_subnet_enable_dhcp(subnet) !\u003d"},{"line_number":118,"context_line":"                _is_subnet_enable_dhcp(orig_subnet)):"},{"line_number":119,"context_line":"            return True"},{"line_number":120,"context_line":"        if orig_subnet[\u0027network_id\u0027] !\u003d subnet[\u0027network_id\u0027]:"},{"line_number":121,"context_line":"            return True"},{"line_number":122,"context_line":"        return False"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _subnet_update_handler(self, resource, event, trigger, **kwargs):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_a4fa8240","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":23},"updated":"2017-11-08 09:33:45.000000000","message":"A subnet can move from network to network?","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if (_is_subnet_enable_dhcp(subnet) !\u003d"},{"line_number":118,"context_line":"                _is_subnet_enable_dhcp(orig_subnet)):"},{"line_number":119,"context_line":"            return True"},{"line_number":120,"context_line":"        if orig_subnet[\u0027network_id\u0027] !\u003d subnet[\u0027network_id\u0027]:"},{"line_number":121,"context_line":"            return True"},{"line_number":122,"context_line":"        return False"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _subnet_update_handler(self, resource, event, trigger, **kwargs):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_d8443d1c","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":23},"in_reply_to":"3f4b6375_a4fa8240","updated":"2017-11-08 12:53:18.000000000","message":"It\u0027s can\u0027t I removed that","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        self._add_dhcp_subnet_to_network(context, subnet[\u0027network_id\u0027],"},{"line_number":114,"context_line":"                                         subnet)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _is_dhcp_state_change(self, orig_subnet, subnet):"},{"line_number":117,"context_line":"        if (_is_subnet_enable_dhcp(subnet) !\u003d"},{"line_number":118,"context_line":"                _is_subnet_enable_dhcp(orig_subnet)):"},{"line_number":119,"context_line":"            return True"},{"line_number":120,"context_line":"        if orig_subnet[\u0027network_id\u0027] !\u003d subnet[\u0027network_id\u0027]:"},{"line_number":121,"context_line":"            return True"},{"line_number":122,"context_line":"        return False"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _subnet_update_handler(self, resource, event, trigger, **kwargs):"},{"line_number":125,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_24e7b2af","line":122,"range":{"start_line":116,"start_character":0,"end_line":122,"end_character":20},"updated":"2017-11-08 09:33:45.000000000","message":"nit, doesn\u0027t use self, can be placed outside","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    return subnet[\u0027enable_dhcp\u0027] is True"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def _is_dhcp_port(port):"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_23a44a08","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":40},"updated":"2017-11-09 07:26:48.000000000","message":"Why not just return subnet[\u0027enable_dhcp\u0027]?\nMay it be None??","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    if not _is_subnet_ipv4(subnet):"},{"line_number":33,"context_line":"        return False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    return subnet[\u0027enable_dhcp\u0027] is True"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def _is_dhcp_port(port):"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_690461c7","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":40},"in_reply_to":"1f485f77_23a44a08","updated":"2017-11-09 09:17:21.000000000","message":"Done ..","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _update_dhcp_port(self, context, port, subnet):"},{"line_number":81,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":82,"context_line":"        fixed_ips.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":83,"context_line":"        self.core_plugin.update_port(context, port[\u0027id\u0027], {\u0027port\u0027: port})"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _add_dhcp_subnet_to_network(self, context, network, subnet):"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_8369be8c","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":53},"updated":"2017-11-09 07:26:48.000000000","message":"Isn\u0027t it possible that we will already have the subnet_id element in the fixed_ips list attribute?","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _update_dhcp_port(self, context, port, subnet):"},{"line_number":81,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":82,"context_line":"        fixed_ips.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":83,"context_line":"        self.core_plugin.update_port(context, port[\u0027id\u0027], {\u0027port\u0027: port})"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _add_dhcp_subnet_to_network(self, context, network, subnet):"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_493be59b","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":53},"in_reply_to":"1f485f77_8369be8c","updated":"2017-11-09 09:17:21.000000000","message":"Nope - here we create the dhcp port and neutron use the subnet id for notifying the IPAM from which network ip need to be allocated","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":98,"context_line":"        port[\u0027fixed_ips\u0027] \u003d [x for x in"},{"line_number":99,"context_line":"                             fixed_ips if"},{"line_number":100,"context_line":"                             x[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_03e14eff","line":98,"range":{"start_line":98,"start_character":29,"end_line":98,"end_character":39},"updated":"2017-11-09 07:26:48.000000000","message":"please give x a meaningful name.\nThough it is easy to understand, why no just call it fixed_ip or even element?","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":98,"context_line":"        port[\u0027fixed_ips\u0027] \u003d [x for x in"},{"line_number":99,"context_line":"                             fixed_ips if"},{"line_number":100,"context_line":"                             x[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_0913ad0f","line":98,"range":{"start_line":98,"start_character":29,"end_line":98,"end_character":39},"in_reply_to":"1f485f77_03e14eff","updated":"2017-11-09 09:17:21.000000000","message":"done","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                                         subnet)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _is_dhcp_state_change(self, orig_subnet, subnet):"},{"line_number":117,"context_line":"        if (_is_subnet_enable_dhcp(subnet) !\u003d"},{"line_number":118,"context_line":"                _is_subnet_enable_dhcp(orig_subnet)):"},{"line_number":119,"context_line":"            return True"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return False"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _subnet_update_handler(self, resource, event, trigger, **kwargs):"},{"line_number":124,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_4393c650","line":121,"range":{"start_line":117,"start_character":8,"end_line":121,"end_character":20},"updated":"2017-11-09 07:26:48.000000000","message":"just a nit, why not:\nreturn _is_subnet_enable_dhcp(subnet) !\u003d\n                _is_subnet_enable_dhcp(orig_subnet)\n?","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                                         subnet)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _is_dhcp_state_change(self, orig_subnet, subnet):"},{"line_number":117,"context_line":"        if (_is_subnet_enable_dhcp(subnet) !\u003d"},{"line_number":118,"context_line":"                _is_subnet_enable_dhcp(orig_subnet)):"},{"line_number":119,"context_line":"            return True"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return False"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _subnet_update_handler(self, resource, event, trigger, **kwargs):"},{"line_number":124,"context_line":"        subnet \u003d kwargs[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_29dc2945","line":121,"range":{"start_line":117,"start_character":8,"end_line":121,"end_character":20},"in_reply_to":"1f485f77_4393c650","updated":"2017-11-09 09:17:21.000000000","message":"done","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ca98b296437289d26436258bafa3e12179cd48a4","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                self._remove_dhcp_subnet_from_network(context,"},{"line_number":130,"context_line":"                                                      subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                      subnet)"},{"line_number":132,"context_line":"            if _is_subnet_enable_dhcp(subnet):"},{"line_number":133,"context_line":"                self._add_dhcp_subnet_to_network(context,"},{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_a3ab9a73","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":20},"updated":"2017-11-09 07:26:48.000000000","message":"As this is the only option, I would either skip the \"if\" statement, or better still, use elif, and another else statement that logs an error","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"1497b055a80be31cd1ef74b903dc90c448e20152","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                self._remove_dhcp_subnet_from_network(context,"},{"line_number":130,"context_line":"                                                      subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                      subnet)"},{"line_number":132,"context_line":"            if _is_subnet_enable_dhcp(subnet):"},{"line_number":133,"context_line":"                self._add_dhcp_subnet_to_network(context,"},{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_8c31ebef","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":20},"in_reply_to":"1f485f77_09af2d95","updated":"2017-11-09 09:26:37.000000000","message":"I am not sure I follow.\nThe only function we are checking is _is_subnet_enable_dhcp which is defined in this file.\nI am not suggesting you do anything about _is_dhcp_state_change","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"a857454bc1e7249259ad3cf7fc8577bebde9ac80","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                self._remove_dhcp_subnet_from_network(context,"},{"line_number":130,"context_line":"                                                      subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                      subnet)"},{"line_number":132,"context_line":"            if _is_subnet_enable_dhcp(subnet):"},{"line_number":133,"context_line":"                self._add_dhcp_subnet_to_network(context,"},{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_8c8d6b7d","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":20},"in_reply_to":"1f485f77_8c31ebef","updated":"2017-11-09 09:37:11.000000000","message":"ok, i don\u0027t care about changing that ..","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c7a1650d33d828707909a10033d0a06c617401de","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                self._remove_dhcp_subnet_from_network(context,"},{"line_number":130,"context_line":"                                                      subnet[\u0027network_id\u0027],"},{"line_number":131,"context_line":"                                                      subnet)"},{"line_number":132,"context_line":"            if _is_subnet_enable_dhcp(subnet):"},{"line_number":133,"context_line":"                self._add_dhcp_subnet_to_network(context,"},{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_09af2d95","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":20},"in_reply_to":"1f485f77_a3ab9a73","updated":"2017-11-09 09:17:21.000000000","message":"Prefer Not to do it - as you take as assumption what done inside _is_dhcp_state change. but i don\u0027t want that change in inner function will require change in the outer function.  (It\u0027s can be change if in the feature neutron will enable to move same subnet between netwroks for example .. )","commit_id":"153f2b8f0de089cd75adf507259d91379dcb1f25"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_f2d956f4","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"updated":"2017-11-09 11:52:56.000000000","message":"Are these events in the scope of the neutron DB transaction?","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4541fadc71dba41d972c298b4608e7d0e3a36cfd","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_f04b6d84","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"in_reply_to":"1f485f77_56837505","updated":"2017-11-12 06:40:57.000000000","message":"Post commit is not supposed to update neutron DB, but in these events you do change it.","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"5676875dc31cc85487a725d805cf1f9777d14480","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_b3217fa2","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"in_reply_to":"1f485f77_700d3d3d","updated":"2017-11-12 07:22:03.000000000","message":"Please add #REVISIT note in the handler method to keep the reference to reconsider later (if needed).","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"f7ad348c965577bf22c42dbe8350f4b6d2c693d1","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_868763d8","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"in_reply_to":"1f485f77_b3217fa2","updated":"2017-11-12 13:49:33.000000000","message":"I added , \nI will also open a bug about that is an  issue need to be checked. \n(I think that relevant to all component\u0027s that use the post-commit as also the writing to DF-db can fail .. )","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"1a2db5fc0b1d49294dafc53998bfacf615b1a971","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_700d3d3d","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"in_reply_to":"1f485f77_f04b6d84","updated":"2017-11-12 07:13:25.000000000","message":"This patch keeping the current behavior of -creating the DHCP-port outside of the neutron transaction.\nMaybe it\u0027s should move into the transaction it\u0027s better idea , but i think that it raise some synchronization issue that need to be considered, so i don\u0027t think that it\u0027s need to be part of this patch.","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _register_subnet_events(self):"},{"line_number":55,"context_line":"        function_by_action \u003d {"},{"line_number":56,"context_line":"            events.AFTER_CREATE: self._subnet_create_handler,"},{"line_number":57,"context_line":"            events.AFTER_UPDATE: self._subnet_update_handler,"},{"line_number":58,"context_line":"            events.AFTER_DELETE: self._subnet_delete_handler"},{"line_number":59,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_56837505","line":56,"range":{"start_line":56,"start_character":10,"end_line":56,"end_character":31},"in_reply_to":"1f485f77_f2d956f4","updated":"2017-11-09 21:44:36.000000000","message":"They called out of the neutron-DB-transaction as well as all \nplugin post_commit callback that currently used by DF","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":101,"context_line":"        port[\u0027fixed_ips\u0027] \u003d [fixed_ip for fixed_ip in"},{"line_number":102,"context_line":"                             fixed_ips if"},{"line_number":103,"context_line":"                             fixed_ip[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if not port[\u0027fixed_ips\u0027]:"},{"line_number":106,"context_line":"            # No subnet that enabled DHCP on the port any more"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_f2ca764d","line":103,"range":{"start_line":101,"start_character":29,"end_line":103,"end_character":66},"updated":"2017-11-09 11:52:56.000000000","message":"would it stop on the first one?","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        fixed_ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":101,"context_line":"        port[\u0027fixed_ips\u0027] \u003d [fixed_ip for fixed_ip in"},{"line_number":102,"context_line":"                             fixed_ips if"},{"line_number":103,"context_line":"                             fixed_ip[\u0027subnet_id\u0027] !\u003d subnet[\u0027id\u0027]]"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if not port[\u0027fixed_ips\u0027]:"},{"line_number":106,"context_line":"            # No subnet that enabled DHCP on the port any more"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_76931151","line":103,"range":{"start_line":101,"start_character":29,"end_line":103,"end_character":66},"in_reply_to":"1f485f77_f2ca764d","updated":"2017-11-09 21:44:36.000000000","message":"it\u0027s will return all the ports except the one that should remove. it\u0027s should not stop on the first match ..","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"},{"line_number":136,"context_line":"            else:"},{"line_number":137,"context_line":"                LOG.error(\"Subnet dhcp changed but neither old_subnet or\""},{"line_number":138,"context_line":"                          \"new subnet do not enabled dhcp\")"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _subnet_delete_handler(self, resource, event, trigger, **kwargs):"},{"line_number":141,"context_line":"        context \u003d kwargs[\u0027context\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_522f0af6","line":138,"range":{"start_line":137,"start_character":27,"end_line":138,"end_character":57},"updated":"2017-11-09 11:52:56.000000000","message":"error message is not clear","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                                 subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"                                                 subnet)"},{"line_number":136,"context_line":"            else:"},{"line_number":137,"context_line":"                LOG.error(\"Subnet dhcp changed but neither old_subnet or\""},{"line_number":138,"context_line":"                          \"new subnet do not enabled dhcp\")"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _subnet_delete_handler(self, resource, event, trigger, **kwargs):"},{"line_number":141,"context_line":"        context \u003d kwargs[\u0027context\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_56b135e1","line":138,"range":{"start_line":137,"start_character":27,"end_line":138,"end_character":57},"in_reply_to":"1f485f77_522f0af6","updated":"2017-11-09 21:44:36.000000000","message":"Any Idea to for better message ? \nI don\u0027t care about remove this message at all -  as the else should never happened.. but in the previous reviews i have been asked to add an error log here. \nDoesn\u0027t really matter for me ..","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"}],"dragonflow/neutron/ml2/mech_driver.py":[{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"76a26ff927c85214d24e391b8fc13196213eec6a","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        if this port was created."},{"line_number":374,"context_line":"        \"\"\""},{"line_number":375,"context_line":"        dhcp_ip \u003d None"},{"line_number":376,"context_line":"        if cfg.CONF.df.use_centralized_ipv6_DHCP:"},{"line_number":377,"context_line":"            dhcp_ip \u003d self._update_subnet_dhcp_centralized(context, new_subnet)"},{"line_number":378,"context_line":"            return dhcp_ip, None"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if new_subnet[\u0027enable_dhcp\u0027]:"},{"line_number":381,"context_line":"            if not old_subnet[\u0027enable_dhcp\u0027]:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_d066a6c1","side":"PARENT","line":378,"range":{"start_line":376,"start_character":9,"end_line":378,"end_character":32},"updated":"2017-10-25 08:12:42.000000000","message":"Is this flow still treated in the refactor?","commit_id":"3efdf8f19e0c4d0295d1a74cfe4aa253164dff65"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"488d1e0804eda2ffe4533adcad5425eb6a6a8d90","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        if this port was created."},{"line_number":374,"context_line":"        \"\"\""},{"line_number":375,"context_line":"        dhcp_ip \u003d None"},{"line_number":376,"context_line":"        if cfg.CONF.df.use_centralized_ipv6_DHCP:"},{"line_number":377,"context_line":"            dhcp_ip \u003d self._update_subnet_dhcp_centralized(context, new_subnet)"},{"line_number":378,"context_line":"            return dhcp_ip, None"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if new_subnet[\u0027enable_dhcp\u0027]:"},{"line_number":381,"context_line":"            if not old_subnet[\u0027enable_dhcp\u0027]:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_deb917cc","side":"PARENT","line":378,"range":{"start_line":376,"start_character":9,"end_line":378,"end_character":32},"in_reply_to":"3f4b6375_d066a6c1","updated":"2017-10-25 09:31:05.000000000","message":"well when dragflow wash neutron-plugin this was relevant - but now - the dhcp_ip was trait that used just for set the src ip of the dhcp_response packet . that not revlevant in centralized topology as we don\u0027t use the dhcp-app ..","commit_id":"3efdf8f19e0c4d0295d1a74cfe4aa253164dff65"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.trunk_driver \u003d trunk_driver.DfTrunkDriver()"},{"line_number":68,"context_line":"        self.subscribe_registries()"},{"line_number":69,"context_line":"        df_qos.register()"},{"line_number":70,"context_line":"        self.dhcp_moudle \u003d dhcp_module.DFDHCPModule()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def post_fork_initialize(self, resource, event, trigger, **kwargs):"},{"line_number":73,"context_line":"        # NOTE(nick-ma-z): This will initialize all workers (API, RPC,"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_2459f28d","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":24},"updated":"2017-11-08 09:33:45.000000000","message":"module","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.trunk_driver \u003d trunk_driver.DfTrunkDriver()"},{"line_number":68,"context_line":"        self.subscribe_registries()"},{"line_number":69,"context_line":"        df_qos.register()"},{"line_number":70,"context_line":"        self.dhcp_moudle \u003d dhcp_module.DFDHCPModule()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def post_fork_initialize(self, resource, event, trigger, **kwargs):"},{"line_number":73,"context_line":"        # NOTE(nick-ma-z): This will initialize all workers (API, RPC,"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_984ec536","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":24},"in_reply_to":"3f4b6375_2459f28d","updated":"2017-11-08 12:53:18.000000000","message":"fixed","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"}],"dragonflow/tests/common/utils.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    wait_until_true(internal_predicate, timeout, sleep, exception)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_dhcp_network_rule(flows, netwrok_key):"},{"line_number":73,"context_line":"    controller_action \u003d \u0027CONTROLLER:65535\u0027"},{"line_number":74,"context_line":"    network_id \u003d \u0027metadata\u003d\u0027 + str(hex(netwrok_key))"},{"line_number":75,"context_line":"    for flow in flows:"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_924462b9","line":72,"range":{"start_line":72,"start_character":35,"end_line":72,"end_character":42},"updated":"2017-11-09 11:52:56.000000000","message":"network","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    wait_until_true(internal_predicate, timeout, sleep, exception)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_dhcp_network_rule(flows, netwrok_key):"},{"line_number":73,"context_line":"    controller_action \u003d \u0027CONTROLLER:65535\u0027"},{"line_number":74,"context_line":"    network_id \u003d \u0027metadata\u003d\u0027 + str(hex(netwrok_key))"},{"line_number":75,"context_line":"    for flow in flows:"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_36b6b9db","line":72,"range":{"start_line":72,"start_character":35,"end_line":72,"end_character":42},"in_reply_to":"1f485f77_924462b9","updated":"2017-11-09 21:44:36.000000000","message":"will do","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_dhcp_network_rule(flows, netwrok_key):"},{"line_number":73,"context_line":"    controller_action \u003d \u0027CONTROLLER:65535\u0027"},{"line_number":74,"context_line":"    network_id \u003d \u0027metadata\u003d\u0027 + str(hex(netwrok_key))"},{"line_number":75,"context_line":"    for flow in flows:"},{"line_number":76,"context_line":"        if (flow[\u0027table\u0027] \u003d\u003d str(df_const.DHCP_TABLE)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_d223fa04","line":73,"range":{"start_line":73,"start_character":25,"end_line":73,"end_character":41},"updated":"2017-11-09 11:52:56.000000000","message":"please consider constant defintion","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_dhcp_network_rule(flows, netwrok_key):"},{"line_number":73,"context_line":"    controller_action \u003d \u0027CONTROLLER:65535\u0027"},{"line_number":74,"context_line":"    network_id \u003d \u0027metadata\u003d\u0027 + str(hex(netwrok_key))"},{"line_number":75,"context_line":"    for flow in flows:"},{"line_number":76,"context_line":"        if (flow[\u0027table\u0027] \u003d\u003d str(df_const.DHCP_TABLE)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_16cbbd53","line":73,"range":{"start_line":73,"start_character":25,"end_line":73,"end_character":41},"in_reply_to":"1f485f77_d223fa04","updated":"2017-11-09 21:44:36.000000000","message":"will do","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"}],"dragonflow/tests/fullstack/test_dhcp_flows.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    break"},{"line_number":50,"context_line":"        self.assertTrue(found_dhcp_cast_flow)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _create_netowrk(self):"},{"line_number":53,"context_line":"        network \u003d self.store(objects.NetworkTestObj(self.neutron, self.nb_api))"},{"line_number":54,"context_line":"        network_id \u003d network.create()"},{"line_number":55,"context_line":"        self.assertTrue(network.exists())"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_e4699a26","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":23},"updated":"2017-11-08 09:33:45.000000000","message":"network","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    break"},{"line_number":50,"context_line":"        self.assertTrue(found_dhcp_cast_flow)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _create_netowrk(self):"},{"line_number":53,"context_line":"        network \u003d self.store(objects.NetworkTestObj(self.neutron, self.nb_api))"},{"line_number":54,"context_line":"        network_id \u003d network.create()"},{"line_number":55,"context_line":"        self.assertTrue(network.exists())"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_3857d1cd","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":23},"in_reply_to":"3f4b6375_e4699a26","updated":"2017-11-08 12:53:18.000000000","message":"done","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"}],"dragonflow/tests/unit/test_dhcp_module.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"c07dc0afe013d00f741959f3a9cae9d93021383e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from dragonflow.tests.unit import test_mech_driver as test_md"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestDfDHCPModule(test_md.TestDFMechDriver):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestDfDHCPModule, self).setUp()"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_04027670","line":24,"updated":"2017-11-08 09:33:45.000000000","message":"This runs all the TestDFMechDriver\u0027s tests too as part of this module","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"02058989b0052e5c533ecd2df3b51076e9d15e1a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from dragonflow.tests.unit import test_mech_driver as test_md"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestDfDHCPModule(test_md.TestDFMechDriver):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestDfDHCPModule, self).setUp()"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_f8701976","line":24,"in_reply_to":"3f4b6375_04027670","updated":"2017-11-08 12:53:18.000000000","message":"Fixed","commit_id":"4b1ac7303952184043834324a9d0aa721e3c5e47"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            create_mock.assert_not_called()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(DFDHCPModule, \u0027_update_dhcp_port\u0027)"},{"line_number":47,"context_line":"    def test_subnets_on_same_switch(self, update_mock):"},{"line_number":48,"context_line":"        network, _ \u003d self._test_create_network_revision()"},{"line_number":49,"context_line":"        with self.subnet(network\u003d{\u0027network\u0027: network},"},{"line_number":50,"context_line":"                         enable_dhcp\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_5266ea53","line":47,"range":{"start_line":47,"start_character":29,"end_line":47,"end_character":35},"updated":"2017-11-09 11:52:56.000000000","message":"network (this module is still in the Neutron namespace)","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            create_mock.assert_not_called()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(DFDHCPModule, \u0027_update_dhcp_port\u0027)"},{"line_number":47,"context_line":"    def test_subnets_on_same_switch(self, update_mock):"},{"line_number":48,"context_line":"        network, _ \u003d self._test_create_network_revision()"},{"line_number":49,"context_line":"        with self.subnet(network\u003d{\u0027network\u0027: network},"},{"line_number":50,"context_line":"                         enable_dhcp\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_d6c40543","line":47,"range":{"start_line":47,"start_character":29,"end_line":47,"end_character":35},"in_reply_to":"1f485f77_5266ea53","updated":"2017-11-09 21:44:36.000000000","message":"will do","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a73ea064889a8377de782463ce4ddf782abf000b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            update_mock.assert_not_called()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @mock.patch.object(Ml2Plugin, \u0027delete_port\u0027)"},{"line_number":74,"context_line":"    def test_subets_update_when_its_need(self, delete_mock):"},{"line_number":75,"context_line":"        network, _ \u003d self._test_create_network_revision()"},{"line_number":76,"context_line":"        with self.subnet(network\u003d{\u0027network\u0027: network},"},{"line_number":77,"context_line":"                         enable_dhcp\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_325b6e88","line":74,"range":{"start_line":74,"start_character":13,"end_line":74,"end_character":19},"updated":"2017-11-09 11:52:56.000000000","message":"subnet","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"e53752dd47a3d4737606feb546922283ad8fdd73","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            update_mock.assert_not_called()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @mock.patch.object(Ml2Plugin, \u0027delete_port\u0027)"},{"line_number":74,"context_line":"    def test_subets_update_when_its_need(self, delete_mock):"},{"line_number":75,"context_line":"        network, _ \u003d self._test_create_network_revision()"},{"line_number":76,"context_line":"        with self.subnet(network\u003d{\u0027network\u0027: network},"},{"line_number":77,"context_line":"                         enable_dhcp\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f485f77_96dc4d19","line":74,"range":{"start_line":74,"start_character":13,"end_line":74,"end_character":19},"in_reply_to":"1f485f77_325b6e88","updated":"2017-11-09 21:44:36.000000000","message":"will do","commit_id":"9100329e43fa7e013083218f28e0b6ddd849e562"}],"dragonflow/tests/unit/test_dhcp_moudle.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"33ea2cdce2ec719bef4a12663a2a8befe7561fc5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.plugins.ml2.plugin import Ml2Plugin"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_afcc16bc","line":15,"updated":"2017-09-14 07:53:03.000000000","message":"Typo in filename: test_dhcp_module ?","commit_id":"fcbcd35172c957895517e42700454b1de9c0b021"}]}
