)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2a4e74b46ee675bc4d9d3d219a852fc52b78e148","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete dhcp port totally as agent scale down"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_f4e34fa3","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":54},"updated":"2019-07-05 08:38:09.000000000","message":"Something more strict wording like this: During scale down of dhcp agents due to maintenance or any similar operations...","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a678040f809d81fbc7953c5540ca0c3100e519df","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ie289ac8e8f2bb2748ac3c8656d82f80aa8660f24"},{"line_number":15,"context_line":"Closes-Bug: #1739219"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7faddb67_ce32a910","line":12,"updated":"2019-07-16 08:09:54.000000000","message":"Now, when I\u0027m reading this description I\u0027m starting thinking that maybe this patch is trying to solve wrong problem really.\nIMO the real problem is that when port is updated to be \"reserved_dhcp_port\" (so it\u0027s not active port) it isn\u0027t removed from dnsmasq\u0027s opts file. And IMO it should be.","commit_id":"0de5d55f333544ce367f96f639f8c6a0d5967195"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0009e833636632eab234b605eb29f48745a45206","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ie289ac8e8f2bb2748ac3c8656d82f80aa8660f24"},{"line_number":15,"context_line":"Closes-Bug: #1739219"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7faddb67_d7d8fc7b","line":12,"in_reply_to":"7faddb67_9ceceb8f","updated":"2019-07-16 10:31:48.000000000","message":"But IMO that is a bit different issue than described in this commit message. I agree that problem described here should be solved now but I also think that automatic deletion of those ports should be treated as separate issue and maybe even treated as RFE.","commit_id":"0de5d55f333544ce367f96f639f8c6a0d5967195"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"a472051674d89c6dfdf5ebef1a061a2d33a690ba","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ie289ac8e8f2bb2748ac3c8656d82f80aa8660f24"},{"line_number":15,"context_line":"Closes-Bug: #1739219"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7faddb67_9ceceb8f","line":12,"in_reply_to":"7faddb67_ce32a910","updated":"2019-07-16 10:02:26.000000000","message":"Except \u0027reserved_dhcp_port\u0027 isn\u0027t removed from dnsmsq\u0027s opt, we should remove the surplus dhcp ports, because scale down dhcp agents will cause these surplus \u0027reserved_dhcp_port\u0027 haven\u0027t release the ip and mac.","commit_id":"0de5d55f333544ce367f96f639f8c6a0d5967195"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"e566b9b647b4e9e7967205b45b01bbac0d8016c3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ie289ac8e8f2bb2748ac3c8656d82f80aa8660f24"},{"line_number":15,"context_line":"Closes-Bug: #1739219"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7faddb67_e4dbf64b","line":12,"in_reply_to":"7faddb67_d7d8fc7b","updated":"2019-07-17 01:12:08.000000000","message":"You\u0027re right. So how should I do for RFE?","commit_id":"0de5d55f333544ce367f96f639f8c6a0d5967195"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"19e9c60f4b5f00951140c330090b0db9d1dc2bc0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we scale down the dhcp agent, such as from 4 to 3,"},{"line_number":10,"context_line":"neutron-server will remove network from one dhcp agent. However,"},{"line_number":11,"context_line":"it will remain a \u0027reserved_dhcp_port\u0027 in DB and result in dnsmasq"},{"line_number":12,"context_line":"config still records this port ip in opts file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ie289ac8e8f2bb2748ac3c8656d82f80aa8660f24"},{"line_number":15,"context_line":"Closes-Bug: #1739219"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7faddb67_0d3d15dc","line":12,"in_reply_to":"7faddb67_e4dbf64b","updated":"2019-07-17 08:32:31.000000000","message":"All should be described in https://docs.openstack.org/neutron/latest/contributor/policies/blueprints.html - if something would be unclear You can as on #openstack-neutron channel on IRC","commit_id":"0de5d55f333544ce367f96f639f8c6a0d5967195"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2a4e74b46ee675bc4d9d3d219a852fc52b78e148","unresolved":false,"context_lines":[{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"        return port"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def _setup_reserved_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1357,"context_line":"        \"\"\"Setup the reserved DHCP port, if there is one.\"\"\""},{"line_number":1358,"context_line":"        LOG.debug(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":1359,"context_line":"                  \u0027 does not yet exist. Checking for a reserved port.\u0027,"},{"line_number":1360,"context_line":"                  {\u0027device_id\u0027: device_id, \u0027network_id\u0027: network.id})"},{"line_number":1361,"context_line":"        for port in network.ports:"},{"line_number":1362,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":1363,"context_line":"            if port_device_id \u003d\u003d constants.DEVICE_ID_RESERVED_DHCP_PORT:"},{"line_number":1364,"context_line":"                port \u003d self.plugin.update_dhcp_port("},{"line_number":1365,"context_line":"                    port.id, {\u0027port\u0027: {\u0027network_id\u0027: network.id,"},{"line_number":1366,"context_line":"                                       \u0027device_id\u0027: device_id}})"},{"line_number":1367,"context_line":"                if port:"},{"line_number":1368,"context_line":"                    return port"},{"line_number":1369,"context_line":""},{"line_number":1370,"context_line":"    def _setup_new_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1371,"context_line":"        \"\"\"Create and set up new DHCP port for the specified network.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_efe378a3","line":1368,"range":{"start_line":1356,"start_character":0,"end_line":1368,"end_character":31},"updated":"2019-07-05 08:38:09.000000000","message":"If you delete these ports this method should be useless/or changed","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"378fadd7b81f644562af5c0026b9c6ea46be8d05","unresolved":false,"context_lines":[{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"        return port"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def _setup_reserved_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1357,"context_line":"        \"\"\"Setup the reserved DHCP port, if there is one.\"\"\""},{"line_number":1358,"context_line":"        LOG.debug(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":1359,"context_line":"                  \u0027 does not yet exist. Checking for a reserved port.\u0027,"},{"line_number":1360,"context_line":"                  {\u0027device_id\u0027: device_id, \u0027network_id\u0027: network.id})"},{"line_number":1361,"context_line":"        for port in network.ports:"},{"line_number":1362,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":1363,"context_line":"            if port_device_id \u003d\u003d constants.DEVICE_ID_RESERVED_DHCP_PORT:"},{"line_number":1364,"context_line":"                port \u003d self.plugin.update_dhcp_port("},{"line_number":1365,"context_line":"                    port.id, {\u0027port\u0027: {\u0027network_id\u0027: network.id,"},{"line_number":1366,"context_line":"                                       \u0027device_id\u0027: device_id}})"},{"line_number":1367,"context_line":"                if port:"},{"line_number":1368,"context_line":"                    return port"},{"line_number":1369,"context_line":""},{"line_number":1370,"context_line":"    def _setup_new_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1371,"context_line":"        \"\"\"Create and set up new DHCP port for the specified network.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_57831ecd","line":1368,"range":{"start_line":1356,"start_character":0,"end_line":1368,"end_character":31},"in_reply_to":"7faddb67_0714a2f4","updated":"2019-07-09 01:25:52.000000000","message":"Done","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"39ac714bc5634f6b91e9549c9e72f943d9314878","unresolved":false,"context_lines":[{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"        return port"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def _setup_reserved_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1357,"context_line":"        \"\"\"Setup the reserved DHCP port, if there is one.\"\"\""},{"line_number":1358,"context_line":"        LOG.debug(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":1359,"context_line":"                  \u0027 does not yet exist. Checking for a reserved port.\u0027,"},{"line_number":1360,"context_line":"                  {\u0027device_id\u0027: device_id, \u0027network_id\u0027: network.id})"},{"line_number":1361,"context_line":"        for port in network.ports:"},{"line_number":1362,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":1363,"context_line":"            if port_device_id \u003d\u003d constants.DEVICE_ID_RESERVED_DHCP_PORT:"},{"line_number":1364,"context_line":"                port \u003d self.plugin.update_dhcp_port("},{"line_number":1365,"context_line":"                    port.id, {\u0027port\u0027: {\u0027network_id\u0027: network.id,"},{"line_number":1366,"context_line":"                                       \u0027device_id\u0027: device_id}})"},{"line_number":1367,"context_line":"                if port:"},{"line_number":1368,"context_line":"                    return port"},{"line_number":1369,"context_line":""},{"line_number":1370,"context_line":"    def _setup_new_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1371,"context_line":"        \"\"\"Create and set up new DHCP port for the specified network.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_f68ee12c","line":1368,"range":{"start_line":1356,"start_character":0,"end_line":1368,"end_character":31},"in_reply_to":"7faddb67_efe378a3","updated":"2019-07-08 01:31:43.000000000","message":"This method is setup dhcp port when adding a network into a dhcp agent. I think it unrelated to the topic of \u0027scale down dhcp agents\u0027.","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c4053466f7f5bd01cb02b274016b579b67f3c4a3","unresolved":false,"context_lines":[{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"        return port"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def _setup_reserved_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1357,"context_line":"        \"\"\"Setup the reserved DHCP port, if there is one.\"\"\""},{"line_number":1358,"context_line":"        LOG.debug(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":1359,"context_line":"                  \u0027 does not yet exist. Checking for a reserved port.\u0027,"},{"line_number":1360,"context_line":"                  {\u0027device_id\u0027: device_id, \u0027network_id\u0027: network.id})"},{"line_number":1361,"context_line":"        for port in network.ports:"},{"line_number":1362,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":1363,"context_line":"            if port_device_id \u003d\u003d constants.DEVICE_ID_RESERVED_DHCP_PORT:"},{"line_number":1364,"context_line":"                port \u003d self.plugin.update_dhcp_port("},{"line_number":1365,"context_line":"                    port.id, {\u0027port\u0027: {\u0027network_id\u0027: network.id,"},{"line_number":1366,"context_line":"                                       \u0027device_id\u0027: device_id}})"},{"line_number":1367,"context_line":"                if port:"},{"line_number":1368,"context_line":"                    return port"},{"line_number":1369,"context_line":""},{"line_number":1370,"context_line":"    def _setup_new_dhcp_port(self, network, device_id, dhcp_subnets):"},{"line_number":1371,"context_line":"        \"\"\"Create and set up new DHCP port for the specified network.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_0714a2f4","line":1368,"range":{"start_line":1356,"start_character":0,"end_line":1368,"end_character":31},"in_reply_to":"7faddb67_f68ee12c","updated":"2019-07-08 11:23:10.000000000","message":"This method hunts for ports with device_id\u003dDEVICE_ID_RESERVED_DHCP_PORT, so I suppose this should be changed, but perhaps I am wrong","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"}],"neutron/db/agentschedulers_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cd104d0ed6d1582cfe90d2b897ca1281ca1caf61","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        removed_dhcp_port \u003d self._removed_dhcp_port(context, network_id)"},{"line_number":421,"context_line":"        for port in ports:"},{"line_number":422,"context_line":"            if removed_dhcp_port \u003c\u003d 0:"},{"line_number":423,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":424,"context_line":"                try:"},{"line_number":425,"context_line":"                    self.update_port(context, port[\u0027id\u0027], dict(port\u003dport))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_0757005a","line":422,"updated":"2019-07-02 02:25:01.000000000","message":"This can be outside the for loop","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"eb0eb3c7d29df675de7f734994615cb324e147e2","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        removed_dhcp_port \u003d self._removed_dhcp_port(context, network_id)"},{"line_number":421,"context_line":"        for port in ports:"},{"line_number":422,"context_line":"            if removed_dhcp_port \u003c\u003d 0:"},{"line_number":423,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":424,"context_line":"                try:"},{"line_number":425,"context_line":"                    self.update_port(context, port[\u0027id\u0027], dict(port\u003dport))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_27000434","line":422,"in_reply_to":"9fb8cfa7_0757005a","updated":"2019-07-02 03:01:37.000000000","message":"Done","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cd104d0ed6d1582cfe90d2b897ca1281ca1caf61","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                context, network_id, agent.host)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def _removed_dhcp_port(self, context, network_id):"},{"line_number":439,"context_line":"        \"\"\"Count the number of removed ports"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":442,"context_line":"        removed from the agent. However, the dhcp port still remain"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_e76e6c2a","line":439,"updated":"2019-07-02 02:25:01.000000000","message":"The name of this method is misleading, it\u0027s basically telling the caller that the port should be removed.  I would make it return True/False and call it _should_remove_dhcp_port()","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"eb0eb3c7d29df675de7f734994615cb324e147e2","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                context, network_id, agent.host)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def _removed_dhcp_port(self, context, network_id):"},{"line_number":439,"context_line":"        \"\"\"Count the number of removed ports"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":442,"context_line":"        removed from the agent. However, the dhcp port still remain"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_67b83c74","line":439,"in_reply_to":"9fb8cfa7_e76e6c2a","updated":"2019-07-02 03:01:37.000000000","message":"you\u0027re right.","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cd104d0ed6d1582cfe90d2b897ca1281ca1caf61","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        \"\"\""},{"line_number":447,"context_line":"        dhcp_ports_filters \u003d \\"},{"line_number":448,"context_line":"            dict(network_id\u003d[network_id],"},{"line_number":449,"context_line":"                 device_owner\u003d[constants.DEVICE_OWNER_DHCP])"},{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_8763f041","line":447,"range":{"start_line":447,"start_character":29,"end_line":447,"end_character":30},"updated":"2019-07-02 02:25:01.000000000","message":"please no backslashes, can use () and maybe just call it \u0027filters\u0027 so it\u0027s not so long","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"eb0eb3c7d29df675de7f734994615cb324e147e2","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        \"\"\""},{"line_number":447,"context_line":"        dhcp_ports_filters \u003d \\"},{"line_number":448,"context_line":"            dict(network_id\u003d[network_id],"},{"line_number":449,"context_line":"                 device_owner\u003d[constants.DEVICE_OWNER_DHCP])"},{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_07614005","line":447,"range":{"start_line":447,"start_character":29,"end_line":447,"end_character":30},"in_reply_to":"9fb8cfa7_8763f041","updated":"2019-07-02 03:01:37.000000000","message":"Done","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cd104d0ed6d1582cfe90d2b897ca1281ca1caf61","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        return dhcp_ports_num - cfg.CONF.dhcp_agents_per_network"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def list_networks_on_dhcp_agent(self, context, id):"},{"line_number":456,"context_line":"        objs \u003d network.NetworkDhcpAgentBinding.get_objects(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_27524468","line":453,"updated":"2019-07-02 02:25:01.000000000","message":"Is there the possibility for a race where we could remove too many ports?","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"eb0eb3c7d29df675de7f734994615cb324e147e2","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        return dhcp_ports_num - cfg.CONF.dhcp_agents_per_network"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def list_networks_on_dhcp_agent(self, context, id):"},{"line_number":456,"context_line":"        objs \u003d network.NetworkDhcpAgentBinding.get_objects(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_4743b86c","line":453,"in_reply_to":"9fb8cfa7_27524468","updated":"2019-07-02 03:01:37.000000000","message":"It make available for \u0027dhcp agent scale down\u0027 senario, those surplus ports must be deleted, so I think it won\u0027t affect normal dhcp ports.","commit_id":"25d5efc55a3aedfa7b22e11624cded580aeb37a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00b6ff60f889464dad32e4296faa9e9a0888844e","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"},{"line_number":426,"context_line":"                    self.update_port(context, port[\u0027id\u0027], dict(port\u003dport))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_2cb5447e","line":423,"updated":"2019-07-02 09:04:55.000000000","message":"Sorry but I don\u0027t understand this logic implemented. The base code was executing this loop always. Why now we need to update the ports only when a DHCP port should be removed?\n\nWhy are we not finding the deleted network DHCP port and deleting it? IMO, this should be the logic here: identify the deleted network (network_id), find the correspoding DHCP port and delete it.","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"4d4981d7a3288b9711704aa763bb687530e30a0e","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"},{"line_number":426,"context_line":"                    self.update_port(context, port[\u0027id\u0027], dict(port\u003dport))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_e994ec8e","line":423,"in_reply_to":"9fb8cfa7_2cb5447e","updated":"2019-07-03 02:21:08.000000000","message":"This \u0027if-condition\u0027 used in senario of dhcp agents have scaled down. \nWhen surplus dhcp port is here, we shouldn\u0027t update it as \u0027reserved_dhcp_port\u0027, so it will be deleted as network removed from dhcp agent.","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00b6ff60f889464dad32e4296faa9e9a0888844e","unresolved":false,"context_lines":[{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d (dict(network_id\u003d[network_id],"},{"line_number":449,"context_line":"                              device_owner\u003d[constants.DEVICE_OWNER_DHCP]))"},{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_ec25ecc2","line":448,"updated":"2019-07-02 09:04:55.000000000","message":"I know this is the way \"remove_network_from_dhcp_agent\" creates dictionaries, but literal syntax is faster then the constructor and widely used in this project (and many others):\n\ndhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],\n                      \u0027device_owner\u0027: [constants.DEVICE_OWNER_DHCP]}","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"4d4981d7a3288b9711704aa763bb687530e30a0e","unresolved":false,"context_lines":[{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d (dict(network_id\u003d[network_id],"},{"line_number":449,"context_line":"                              device_owner\u003d[constants.DEVICE_OWNER_DHCP]))"},{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_e9ab8cd4","line":448,"in_reply_to":"9fb8cfa7_ec25ecc2","updated":"2019-07-03 02:21:08.000000000","message":"Done","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00b6ff60f889464dad32e4296faa9e9a0888844e","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        return (dhcp_ports_num - cfg.CONF.dhcp_agents_per_network \u003c\u003d 0)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def list_networks_on_dhcp_agent(self, context, id):"},{"line_number":456,"context_line":"        objs \u003d network.NetworkDhcpAgentBinding.get_objects(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_0cae402d","line":453,"range":{"start_line":453,"start_character":15,"end_line":453,"end_character":16},"updated":"2019-07-02 09:04:55.000000000","message":"redundant parentheses","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"4d4981d7a3288b9711704aa763bb687530e30a0e","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        return (dhcp_ports_num - cfg.CONF.dhcp_agents_per_network \u003c\u003d 0)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def list_networks_on_dhcp_agent(self, context, id):"},{"line_number":456,"context_line":"        objs \u003d network.NetworkDhcpAgentBinding.get_objects(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_09a940dc","line":453,"range":{"start_line":453,"start_character":15,"end_line":453,"end_character":16},"in_reply_to":"9fb8cfa7_0cae402d","updated":"2019-07-03 02:21:08.000000000","message":"Done","commit_id":"1cae89016ff398c3254da670aba527b7aed40f31"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2a4e74b46ee675bc4d9d3d219a852fc52b78e148","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_8ae19201","line":422,"range":{"start_line":422,"start_character":7,"end_line":422,"end_character":35},"updated":"2019-07-05 08:38:09.000000000","message":"If I understand well this extra condition is useless.\nThe loop originally iterated over all the ports related to the dhcp-agent.","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c4053466f7f5bd01cb02b274016b579b67f3c4a3","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_87741237","line":422,"range":{"start_line":422,"start_character":7,"end_line":422,"end_character":35},"in_reply_to":"7faddb67_56949544","updated":"2019-07-08 11:23:10.000000000","message":"The original logic iterated over all the ports, your condition narrows this logic","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"378fadd7b81f644562af5c0026b9c6ea46be8d05","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_b77cd2eb","line":422,"range":{"start_line":422,"start_character":7,"end_line":422,"end_character":35},"in_reply_to":"7faddb67_87741237","updated":"2019-07-09 01:25:52.000000000","message":"It means that those \u0027ports\u0027 related to device_id which may more than 1?","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"39ac714bc5634f6b91e9549c9e72f943d9314878","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_56949544","line":422,"range":{"start_line":422,"start_character":7,"end_line":422,"end_character":35},"in_reply_to":"7faddb67_8ae19201","updated":"2019-07-08 01:31:43.000000000","message":"Why? I don\u0027t know your mean exactly.","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_7a2fc53e","line":422,"updated":"2019-07-15 08:59:06.000000000","message":"I don\u0027t understand this, if should_remove_dhcp_port will be True, You will just update ports to be reserved dhcp ports? So when You will really remove them?\n\nAnd why should_remove_dhcp_port is set to True if there is less dhcp_ports currently than dhcp_agents_per_network (see L453)?","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c8f6f23d689cda914349c663d1e6b2093ecb53b6","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"},{"line_number":424,"context_line":"                port[\u0027device_id\u0027] \u003d constants.DEVICE_ID_RESERVED_DHCP_PORT"},{"line_number":425,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_5a6f69fb","line":422,"in_reply_to":"7faddb67_7a2fc53e","updated":"2019-07-15 09:28:01.000000000","message":"Sorry for misleading, I think the logic of my code should be changed.","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Count the number of removed ports"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_5a5c49ec","line":440,"updated":"2019-07-15 08:59:06.000000000","message":"What this method is doing actually? Here You say that it count number of ports but later in L453 it returns bool value so it\u0027s not counting anything IMHO.","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c8f6f23d689cda914349c663d1e6b2093ecb53b6","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Count the number of removed ports"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_1a87b1b7","line":440,"in_reply_to":"7faddb67_5a5c49ec","updated":"2019-07-15 09:28:01.000000000","message":"I will modify it.\nIt\u0027s just a bool value.","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        dhcp_ports_num \u003d self.get_ports_count(context,"},{"line_number":451,"context_line":"                                              filters\u003ddhcp_ports_filters)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        return dhcp_ports_num - cfg.CONF.dhcp_agents_per_network \u003c\u003d 0"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def list_networks_on_dhcp_agent(self, context, id):"},{"line_number":456,"context_line":"        objs \u003d network.NetworkDhcpAgentBinding.get_objects(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_da67d9b6","line":453,"range":{"start_line":453,"start_character":15,"end_line":453,"end_character":64},"updated":"2019-07-15 08:59:06.000000000","message":"why not:\n\n    return dhcp_ports_num \u003c\u003d cfg.CONF.dhcp_agents_per_network\n\n?","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        # Note(jetlee): if scale down the DHCP agents or"},{"line_number":418,"context_line":"        # dhcp_agents_per_network, we should delete surplus"},{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if not should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_6fa7fd0c","line":420,"range":{"start_line":420,"start_character":34,"end_line":420,"end_character":35},"updated":"2019-07-15 15:37:19.000000000","message":"nit: can you use () around this whole thing to avoid the backslash?  they\u0027re frowned-upon in the style guidelines","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        # Note(jetlee): if scale down the DHCP agents or"},{"line_number":418,"context_line":"        # dhcp_agents_per_network, we should delete surplus"},{"line_number":419,"context_line":"        # \u0027reserved_dhcp_port\u0027"},{"line_number":420,"context_line":"        should_remove_dhcp_port \u003d \\"},{"line_number":421,"context_line":"            self._it_should_remove_dhcp_port(context, network_id)"},{"line_number":422,"context_line":"        if not should_remove_dhcp_port:"},{"line_number":423,"context_line":"            for port in ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_a66af77d","line":420,"range":{"start_line":420,"start_character":34,"end_line":420,"end_character":35},"in_reply_to":"7faddb67_6fa7fd0c","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            dhcp_notifier.network_removed_from_agent("},{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_af7c1583","line":439,"range":{"start_line":439,"start_character":8,"end_line":439,"end_character":35},"updated":"2019-07-15 15:37:19.000000000","message":"s/_should_remove_dhcp_port - \u0027it\u0027 doesn\u0027t really fit here\n\nActually, why don\u0027t you make this a \u0027positive\u0027 return and name it _should_keep_dhcp_port() ?  That way the caller doesn\u0027t have to use \u0027not\u0027,\n\nif should_keep_dhcp_port:\n    ....","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            dhcp_notifier.network_removed_from_agent("},{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_66063fd1","line":439,"range":{"start_line":439,"start_character":8,"end_line":439,"end_character":35},"in_reply_to":"7faddb67_af7c1583","updated":"2019-07-16 01:10:15.000000000","message":"Thx. I will modify it.","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_4ff001fe","line":442,"range":{"start_line":442,"start_character":14,"end_line":442,"end_character":19},"updated":"2019-07-15 15:37:19.000000000","message":"s/scale down","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":439,"context_line":"    def _it_should_remove_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_860b3bd4","line":442,"range":{"start_line":442,"start_character":14,"end_line":442,"end_character":19},"in_reply_to":"7faddb67_4ff001fe","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_2f490530","line":443,"range":{"start_line":443,"start_character":55,"end_line":443,"end_character":60},"updated":"2019-07-15 15:37:19.000000000","message":"s/will still","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should remove"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_86d9fb57","line":443,"range":{"start_line":443,"start_character":55,"end_line":443,"end_character":60},"in_reply_to":"7faddb67_2f490530","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_8f6119ac","line":444,"range":{"start_line":444,"start_character":8,"end_line":444,"end_character":10},"updated":"2019-07-15 15:37:19.000000000","message":"s/in the","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_26da874a","line":444,"range":{"start_line":444,"start_character":8,"end_line":444,"end_character":10},"in_reply_to":"7faddb67_8f6119ac","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_4f25615b","line":445,"range":{"start_line":445,"start_character":31,"end_line":445,"end_character":63},"updated":"2019-07-15 15:37:19.000000000","message":"s/number of DHCP ports in the DB, and return True if the port should be kept","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        If we scale the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_46df8339","line":445,"range":{"start_line":445,"start_character":31,"end_line":445,"end_character":63},"in_reply_to":"7faddb67_4f25615b","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4312e79f69b5c41184c298ac36ee6fefe007c9bd","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"},{"line_number":449,"context_line":"                              \u0027device_owner\u0027: [constants.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_afd8957a","line":446,"updated":"2019-07-15 15:37:19.000000000","message":"extra blank line","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"722138a2b2e2696a1cad4a9092330c31f70d7a1e","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port still remain"},{"line_number":444,"context_line":"        in DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of useless ports from DB."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        \"\"\""},{"line_number":448,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"},{"line_number":449,"context_line":"                              \u0027device_owner\u0027: [constants.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_e6e78f11","line":446,"in_reply_to":"7faddb67_afd8957a","updated":"2019-07-16 01:10:15.000000000","message":"Done","commit_id":"8d07814d6de670092d6e123910aa94f7a1635063"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"523d6226521dd5569570aa6be6b22cdf0780b927","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            dhcp_notifier.network_removed_from_agent("},{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_keep_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should keep or not"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale down the number of DHCP agents, the network should be"}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_a80ba521","line":439,"range":{"start_line":439,"start_character":9,"end_line":439,"end_character":11},"updated":"2019-07-16 02:55:44.000000000","message":"I would still get rid of the word \u0027it\u0027","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c706b2ce6690cf3ac1688fef17f6a7b76957804e","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            dhcp_notifier.network_removed_from_agent("},{"line_number":437,"context_line":"                context, network_id, agent.host)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _it_should_keep_dhcp_port(self, context, network_id):"},{"line_number":440,"context_line":"        \"\"\"Determine dhcp port should keep or not"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        If we scale down the number of DHCP agents, the network should be"}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_e87c3d84","line":439,"range":{"start_line":439,"start_character":9,"end_line":439,"end_character":11},"in_reply_to":"7faddb67_a80ba521","updated":"2019-07-16 03:19:52.000000000","message":"Done","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"523d6226521dd5569570aa6be6b22cdf0780b927","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        If we scale down the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port will still remain"},{"line_number":444,"context_line":"        in the DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of port in the DB, and return True"},{"line_number":446,"context_line":"        if the port should be kept."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_c829418a","line":445,"range":{"start_line":445,"start_character":42,"end_line":445,"end_character":46},"updated":"2019-07-16 02:55:44.000000000","message":"/ports","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c706b2ce6690cf3ac1688fef17f6a7b76957804e","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        If we scale down the number of DHCP agents, the network should be"},{"line_number":443,"context_line":"        removed from the agent. However, the dhcp port will still remain"},{"line_number":444,"context_line":"        in the DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of port in the DB, and return True"},{"line_number":446,"context_line":"        if the port should be kept."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_886d89cd","line":445,"range":{"start_line":445,"start_character":42,"end_line":445,"end_character":46},"in_reply_to":"7faddb67_c829418a","updated":"2019-07-16 03:19:52.000000000","message":"Done","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"523d6226521dd5569570aa6be6b22cdf0780b927","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        in the DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of port in the DB, and return True"},{"line_number":446,"context_line":"        if the port should be kept."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        \"\"\""},{"line_number":449,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"},{"line_number":450,"context_line":"                              \u0027device_owner\u0027: [constants.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_68112d52","line":447,"updated":"2019-07-16 02:55:44.000000000","message":"extra blank line","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c706b2ce6690cf3ac1688fef17f6a7b76957804e","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        in the DB, and the device_id set to \u0027reserved_dhcp_port\u0027."},{"line_number":445,"context_line":"        So we should count the numbers of port in the DB, and return True"},{"line_number":446,"context_line":"        if the port should be kept."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        \"\"\""},{"line_number":449,"context_line":"        dhcp_ports_filters \u003d {\u0027network_id\u0027: [network_id],"},{"line_number":450,"context_line":"                              \u0027device_owner\u0027: [constants.DEVICE_OWNER_DHCP]}"}],"source_content_type":"text/x-python","patch_set":8,"id":"7faddb67_a872c5ab","line":447,"in_reply_to":"7faddb67_68112d52","updated":"2019-07-16 03:19:52.000000000","message":"Done","commit_id":"d0882aec3df595395a9f6e1f09ab137131da6807"}],"neutron/tests/unit/db/test_agentschedulers_db.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2a4e74b46ee675bc4d9d3d219a852fc52b78e148","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        helpers.register_dhcp_agent(DHCP_HOSTA)"},{"line_number":646,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":647,"context_line":"                                      DHCP_HOSTA)"},{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_2fb19090","line":649,"range":{"start_line":648,"start_character":8,"end_line":649,"end_character":68},"updated":"2019-07-05 08:38:09.000000000","message":"This is useless, at least the test passes without it...","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"39ac714bc5634f6b91e9549c9e72f943d9314878","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        helpers.register_dhcp_agent(DHCP_HOSTA)"},{"line_number":646,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":647,"context_line":"                                      DHCP_HOSTA)"},{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_56cfb57e","line":649,"range":{"start_line":648,"start_character":8,"end_line":649,"end_character":68},"in_reply_to":"7faddb67_2fb19090","updated":"2019-07-08 01:31:43.000000000","message":"Done","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2a4e74b46ee675bc4d9d3d219a852fc52b78e148","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"},{"line_number":653,"context_line":"            remove_dhcp_port.return_value \u003d True"},{"line_number":654,"context_line":"            self._remove_network_from_dhcp_agent(hosta_id,"},{"line_number":655,"context_line":"                                                 port1[\u0027port\u0027][\u0027network_id\u0027])"},{"line_number":656,"context_line":"            port_res \u003d self._list_ports("}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_0fa8541d","line":653,"range":{"start_line":651,"start_character":48,"end_line":653,"end_character":48},"updated":"2019-07-05 08:38:09.000000000","message":"ditto","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"39ac714bc5634f6b91e9549c9e72f943d9314878","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"},{"line_number":653,"context_line":"            remove_dhcp_port.return_value \u003d True"},{"line_number":654,"context_line":"            self._remove_network_from_dhcp_agent(hosta_id,"},{"line_number":655,"context_line":"                                                 port1[\u0027port\u0027][\u0027network_id\u0027])"},{"line_number":656,"context_line":"            port_res \u003d self._list_ports("}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_b6baa9db","line":653,"range":{"start_line":651,"start_character":48,"end_line":653,"end_character":48},"in_reply_to":"7faddb67_0fa8541d","updated":"2019-07-08 01:31:43.000000000","message":"You\u0027re right, I have added this func just in accordance with the added new UT, and have made this param(\u0027it_should_remove_dhcp_port\u0027) more clear.","commit_id":"2ed3df9c2ce0112341e919faa9a305bd8e0cb4bb"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        helpers.register_dhcp_agent(DHCP_HOSTA)"},{"line_number":646,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":647,"context_line":"                                      DHCP_HOSTA)"},{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_fa22d551","line":649,"range":{"start_line":648,"start_character":38,"end_line":649,"end_character":67},"updated":"2019-07-15 08:59:06.000000000","message":"nit: why You just not move this to L652?","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c8f6f23d689cda914349c663d1e6b2093ecb53b6","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        helpers.register_dhcp_agent(DHCP_HOSTA)"},{"line_number":646,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":647,"context_line":"                                      DHCP_HOSTA)"},{"line_number":648,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":649,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":650,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":651,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":652,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_1a7571cb","line":649,"range":{"start_line":648,"start_character":38,"end_line":649,"end_character":67},"in_reply_to":"7faddb67_fa22d551","updated":"2019-07-15 09:28:01.000000000","message":"Done","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":666,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":667,"context_line":"                                      DHCP_HOSTA)"},{"line_number":668,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":669,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":670,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":671,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":672,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_1a201148","line":669,"updated":"2019-07-15 08:59:06.000000000","message":"same here","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c8f6f23d689cda914349c663d1e6b2093ecb53b6","unresolved":false,"context_lines":[{"line_number":666,"context_line":"        hosta_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":667,"context_line":"                                      DHCP_HOSTA)"},{"line_number":668,"context_line":"        it_should_remove_dhcp_port \u003d (\u0027neutron.db.agentschedulers_db.\u0027"},{"line_number":669,"context_line":"            \u0027DhcpAgentSchedulerDbMixin._it_should_remove_dhcp_port\u0027)"},{"line_number":670,"context_line":"        with self.port(device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":671,"context_line":"                       host\u003dDHCP_HOSTA) as port1, \\"},{"line_number":672,"context_line":"                mock.patch(it_should_remove_dhcp_port) as remove_dhcp_port:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_ba7d3db3","line":669,"in_reply_to":"7faddb67_1a201148","updated":"2019-07-15 09:28:01.000000000","message":"Done","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0dbf22fdddd1f9de81a6251ce5711b9dc41f102","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                network_id\u003dport1[\u0027port\u0027][\u0027network_id\u0027])"},{"line_number":680,"context_line":"            port_list \u003d self.deserialize(\u0027json\u0027, port_res)"},{"line_number":681,"context_line":"            self.assertNotEqual(port_list[\u0027ports\u0027][0][\u0027device_id\u0027],"},{"line_number":682,"context_line":"                             constants.DEVICE_ID_RESERVED_DHCP_PORT)"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    def _test_get_active_networks_from_admin_state_down_agent(self,"},{"line_number":685,"context_line":"                                                              keep_services):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_ba18dd1d","line":682,"updated":"2019-07-15 08:59:06.000000000","message":"please align indentation of this line to the line above","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"},{"author":{"_account_id":27295,"name":"Li Zhouzhou","email":"lizhouzhou_yewu@cmss.chinamobile.com","username":"LiZhouzhou"},"change_message_id":"c8f6f23d689cda914349c663d1e6b2093ecb53b6","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                network_id\u003dport1[\u0027port\u0027][\u0027network_id\u0027])"},{"line_number":680,"context_line":"            port_list \u003d self.deserialize(\u0027json\u0027, port_res)"},{"line_number":681,"context_line":"            self.assertNotEqual(port_list[\u0027ports\u0027][0][\u0027device_id\u0027],"},{"line_number":682,"context_line":"                             constants.DEVICE_ID_RESERVED_DHCP_PORT)"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    def _test_get_active_networks_from_admin_state_down_agent(self,"},{"line_number":685,"context_line":"                                                              keep_services):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_7a4d8598","line":682,"in_reply_to":"7faddb67_ba18dd1d","updated":"2019-07-15 09:28:01.000000000","message":"Done","commit_id":"b48282761d258ec86fa35c2d0ab8e26ca1fc510f"}]}
