)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"abbdb19627eaa8dbf4ffc609b0556f5a0b19621e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Setting of /etc/neutron/neutron.conf"},{"line_number":13,"context_line":"  -----"},{"line_number":14,"context_line":"  # Number of DHCP agents scheduled to host a network. This enables redundant"},{"line_number":15,"context_line":"  # DHCP agents for configured networks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a961159_2a02730b","line":12,"updated":"2014-12-09 12:03:19.000000000","message":"i think it\u0027s enough having issue description in the bug and not necessary to have it in the commit message.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"5bc2046c291271583aebb9dc59b8a674ac89ba47","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Setting of /etc/neutron/neutron.conf"},{"line_number":13,"context_line":"  -----"},{"line_number":14,"context_line":"  # Number of DHCP agents scheduled to host a network. This enables redundant"},{"line_number":15,"context_line":"  # DHCP agents for configured networks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a961159_51d75923","line":12,"in_reply_to":"3a961159_2a02730b","updated":"2014-12-10 00:17:57.000000000","message":"Hello, enikanorov. Thank you for your comment. Because the wiki(https://wiki.openstack.org/wiki/GitCommitMessages) told me [Do not assume the reviewer understands what the original problem was.] and [Do not assume the reviewer has access to external web services/site.], so I moved the key information here. If it is ok, I would like to leave the message as it is.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     watanabe.isao \u003czou.yun@jp.fujitsu.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-11 18:14:31 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_71a500a1","line":7,"updated":"2014-12-11 09:33:46.000000000","message":"Bug-Fix for rescheduling to redundant DHCP agent when hosting DHCP agent is down?","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     watanabe.isao \u003czou.yun@jp.fujitsu.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-11 18:14:31 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_1822ff51","line":7,"in_reply_to":"3a961159_71a500a1","updated":"2014-12-12 02:26:52.000000000","message":"Actually it is, not to reschedule a network to another DHCP agent when hosting agent is down, if the redundant setting has not been set. But this is longer than 50 characters, so I\u0027m using the title above.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Setting of /etc/neutron/neutron.conf"},{"line_number":13,"context_line":"  -----"},{"line_number":14,"context_line":"  # Number of DHCP agents scheduled to host a network. This enables redundant"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_917b4c27","line":11,"updated":"2014-12-11 09:33:46.000000000","message":"May be it\u0027s not necessary to include all this in the commit message, as long as the referenced bug number contains all this information.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A bug is fixed here for even DHCP agent redundant has not been turned on,"},{"line_number":10,"context_line":"but network is hosted by multiple dhcp-agents."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Setting of /etc/neutron/neutron.conf"},{"line_number":13,"context_line":"  -----"},{"line_number":14,"context_line":"  # Number of DHCP agents scheduled to host a network. This enables redundant"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_78c30357","line":11,"in_reply_to":"3a961159_917b4c27","updated":"2014-12-12 02:26:52.000000000","message":"enikanorov also asked me the same question in patch set 3. But I prefer to leave the message as detail as possible here. so that people may do not need to look at the lanchpad.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  -----"},{"line_number":19,"context_line":"Conditions:"},{"line_number":20,"context_line":"  A) multiple network nodes."},{"line_number":21,"context_line":"  B) dhcp-agents are alives in each network nodes."},{"line_number":22,"context_line":"  C) one network is hosted by one dhcp-agent."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  ex:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_d1a87479","line":21,"updated":"2014-12-11 09:33:46.000000000","message":"alives-\u003ealive","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  -----"},{"line_number":19,"context_line":"Conditions:"},{"line_number":20,"context_line":"  A) multiple network nodes."},{"line_number":21,"context_line":"  B) dhcp-agents are alives in each network nodes."},{"line_number":22,"context_line":"  C) one network is hosted by one dhcp-agent."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  ex:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_18975f49","line":21,"in_reply_to":"3a961159_d1a87479","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    network node1: dhcp-agent1 hosts network1 and network2."},{"line_number":26,"context_line":"    network node2: dhcp-agent2 hosts no network."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"procedures:"},{"line_number":29,"context_line":"  1) stop dhcp-agent1 and dhcp-agent2."},{"line_number":30,"context_line":"  2) start dhcp-agent2."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_31aff87e","line":28,"updated":"2014-12-11 09:33:46.000000000","message":"procedures-\u003eprocedure (or may be still beter: \"How to reproduce\")","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    network node1: dhcp-agent1 hosts network1 and network2."},{"line_number":26,"context_line":"    network node2: dhcp-agent2 hosts no network."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"procedures:"},{"line_number":29,"context_line":"  1) stop dhcp-agent1 and dhcp-agent2."},{"line_number":30,"context_line":"  2) start dhcp-agent2."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_b88f2b29","line":28,"in_reply_to":"3a961159_31aff87e","updated":"2014-12-12 02:26:52.000000000","message":"Thaks, \"How to reproduce\" is good and clear, I\u0027ll fix this.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  network node2: dhcp-agent2 hosts network1 and network2."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"cause:"},{"line_number":37,"context_line":"  When restarting network node, dhcp_agent_scheduleris is only looking at"},{"line_number":38,"context_line":"  the alive DHCP agents. Because of this, if the parameter of"},{"line_number":39,"context_line":"  dhcp_agents_per_network has not been turn on (default \u003d 1), and one"},{"line_number":40,"context_line":"  network node which its dhcp-agent hosts a network died, then another"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_51b484d0","line":37,"updated":"2014-12-11 09:33:46.000000000","message":"scheduleris-\u003escheduler","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  network node2: dhcp-agent2 hosts network1 and network2."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"cause:"},{"line_number":37,"context_line":"  When restarting network node, dhcp_agent_scheduleris is only looking at"},{"line_number":38,"context_line":"  the alive DHCP agents. Because of this, if the parameter of"},{"line_number":39,"context_line":"  dhcp_agents_per_network has not been turn on (default \u003d 1), and one"},{"line_number":40,"context_line":"  network node which its dhcp-agent hosts a network died, then another"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_d88077f9","line":37,"in_reply_to":"3a961159_51b484d0","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"ab696e601768c54fd80a041cd9545abf670cd752","unresolved":false,"context_lines":[{"line_number":15,"context_line":"first) remove network from dead agents,"},{"line_number":16,"context_line":"second) bind the network to a new agent as usual."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For more information, see the bug report, please."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"},{"line_number":21,"context_line":"Closes-Bug: 1388698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3a961159_2ae00525","line":18,"updated":"2014-12-24 05:09:43.000000000","message":"This line is not need.","commit_id":"0e98c411213443d78691d0f6012e95c29ffb7047"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e57e3c98b46efcb452211a427a1618b1086e6e0b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"(or reboot), another agent (agent2) may have a chance to bind with"},{"line_number":11,"context_line":"net1, if there is a trigger like the situation in bug report."},{"line_number":12,"context_line":"After agent1 back on line, we will find net1 is bind to two agents"},{"line_number":13,"context_line":"(both dnsmasq are fonctional), whereas the policy of"},{"line_number":14,"context_line":"dhcp_agents_per_network is set to 1."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"If the down agent does not weak up after a long time, it will be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa81d914_f21567e5","line":13,"updated":"2015-01-30 16:14:39.000000000","message":"functional","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdf08363c54ce295c50240f856c2aa813eda8021","unresolved":false,"context_lines":[{"line_number":10,"context_line":"(or reboot), another agent (agent2) may have a chance to bind with"},{"line_number":11,"context_line":"net1, if there is a trigger like the situation in bug report."},{"line_number":12,"context_line":"After agent1 back on line, we will find net1 is bind to two agents"},{"line_number":13,"context_line":"(both dnsmasq are fonctional), whereas the policy of"},{"line_number":14,"context_line":"dhcp_agents_per_network is set to 1."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"If the down agent does not weak up after a long time, it will be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"da86d52c_4fd8c61d","line":13,"in_reply_to":"fa81d914_f21567e5","updated":"2015-02-02 01:01:15.000000000","message":"Thank you for the correction. My correction tool did not found this. (^^;)","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c2a4f8c51525e5a67275bb9595226466d4a4c16a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"been executed, and if the restarted agent been recovered at this"},{"line_number":12,"context_line":"timing, we will have a chance to bind two active agents to the network."},{"line_number":13,"context_line":"In that case IP can be allocated from either of the DHCP agents,"},{"line_number":14,"context_line":"and simply cause a IP conflict."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"},{"line_number":17,"context_line":"Closes-Bug: 1388698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"9abe1de1_00940735","line":14,"updated":"2015-04-27 11:41:28.000000000","message":"Can you please explain how there will be an IP conflict? Does the VM not get the IP address or are there configurations on more than one DHCP service?","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cc1c3710c3e020b38b6859856d7939ccba4c964b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"been executed, and if the restarted agent been recovered at this"},{"line_number":12,"context_line":"timing, we will have a chance to bind two active agents to the network."},{"line_number":13,"context_line":"In that case IP can be allocated from either of the DHCP agents,"},{"line_number":14,"context_line":"and simply cause a IP conflict."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"},{"line_number":17,"context_line":"Closes-Bug: 1388698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"1aca2d91_4e09b730","line":14,"in_reply_to":"9abe1de1_00940735","updated":"2015-05-08 02:27:24.000000000","message":"Hello, @garyk.\n\nSorry sir. This description is not good. Please let me remove this two lines(13-14).\n\nThe fixed ip of old dhcp agent, will be changed to a new one (if there is a free IP), and new allocation will not conflict with the old ip of the old DHCP agent (, which I suspected it will).\n\nBTW, if there is not a free IP when the old agent alive again, the hosting of the network to the old agent will be deleted, but the dhcp port will be still there. Which is kind of confuse.","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"68495a9049047134f261a436ae900b94c5f64955","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"DHCP scheduler is only looking at active agents."},{"line_number":10,"context_line":"If an agent is restarting, but some operations like port create has"},{"line_number":11,"context_line":"been executed right after the status of agent turns to xxxx, we will"},{"line_number":12,"context_line":"have a chance to bind two active agents to the network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1aca2d91_ba9cf7c0","line":9,"updated":"2015-05-08 12:46:55.000000000","message":"The DHCP agent scheduler","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bed76b6e76c5431be3dc9748274aa54e77323452","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"DHCP scheduler is only looking at active agents."},{"line_number":10,"context_line":"If an agent is restarting, but some operations like port create has"},{"line_number":11,"context_line":"been executed right after the status of agent turns to xxxx, we will"},{"line_number":12,"context_line":"have a chance to bind two active agents to the network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"9af37de9_9bce2e82","line":9,"in_reply_to":"1aca2d91_ba9cf7c0","updated":"2015-05-10 23:45:01.000000000","message":"Done","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"68495a9049047134f261a436ae900b94c5f64955","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"DHCP scheduler is only looking at active agents."},{"line_number":10,"context_line":"If an agent is restarting, but some operations like port create has"},{"line_number":11,"context_line":"been executed right after the status of agent turns to xxxx, we will"},{"line_number":12,"context_line":"have a chance to bind two active agents to the network."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1aca2d91_1aac0bec","line":10,"updated":"2015-05-08 12:46:55.000000000","message":"like port create have","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bed76b6e76c5431be3dc9748274aa54e77323452","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Bug-Fix for unexpected DHCP agent redundant"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"DHCP scheduler is only looking at active agents."},{"line_number":10,"context_line":"If an agent is restarting, but some operations like port create has"},{"line_number":11,"context_line":"been executed right after the status of agent turns to xxxx, we will"},{"line_number":12,"context_line":"have a chance to bind two active agents to the network."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"9af37de9_7bcb8a73","line":10,"in_reply_to":"1aca2d91_1aac0bec","updated":"2015-05-10 23:45:01.000000000","message":"Done","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"68495a9049047134f261a436ae900b94c5f64955","unresolved":false,"context_lines":[{"line_number":12,"context_line":"have a chance to bind two active agents to the network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"P.S."},{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1aca2d91_fa914f9a","line":15,"updated":"2015-05-08 12:46:55.000000000","message":"If you don\u0027t want the number of DHCP agents bound to a network to exceed the dhcp agents_per_network value","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bed76b6e76c5431be3dc9748274aa54e77323452","unresolved":false,"context_lines":[{"line_number":12,"context_line":"have a chance to bind two active agents to the network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"P.S."},{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"9af37de9_3bc5025b","line":15,"in_reply_to":"1aca2d91_fa914f9a","updated":"2015-05-10 23:45:01.000000000","message":"Done","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"68495a9049047134f261a436ae900b94c5f64955","unresolved":false,"context_lines":[{"line_number":14,"context_line":"P.S."},{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1aca2d91_7acbffa5","line":17,"updated":"2015-05-08 12:46:55.000000000","message":"\"before the old DHCP agent restarts\" ? Little unsure.","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bed76b6e76c5431be3dc9748274aa54e77323452","unresolved":false,"context_lines":[{"line_number":14,"context_line":"P.S."},{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"9af37de9_1b88fe21","line":17,"in_reply_to":"1aca2d91_7acbffa5","updated":"2015-05-10 23:45:01.000000000","message":"Yes, you are correct.","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"68495a9049047134f261a436ae900b94c5f64955","unresolved":false,"context_lines":[{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"},{"line_number":21,"context_line":"Closes-Bug: 1388698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1aca2d91_fabf0ff9","line":18,"updated":"2015-05-08 12:46:55.000000000","message":"and you will find a","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bed76b6e76c5431be3dc9748274aa54e77323452","unresolved":false,"context_lines":[{"line_number":15,"context_line":"If you don\u0027t want the number of DHCP agents bind to a network excess"},{"line_number":16,"context_line":"the dhcp_agents_per_network, you can exhaust the IP pool before the"},{"line_number":17,"context_line":"old DHCP agent alive again, and you will found a not-in-use dhcp port"},{"line_number":18,"context_line":"left in the port list."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I8534ddfae299724c05641183c2fe4c1c98c614e8"},{"line_number":21,"context_line":"Closes-Bug: 1388698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"9af37de9_fb8c1a37","line":18,"in_reply_to":"1aca2d91_fabf0ff9","updated":"2015-05-10 23:45:01.000000000","message":"Done","commit_id":"355c760c9fa76f970d59e420dbaff256cd015d40"}],"neutron/scheduler/dhcp_agent_scheduler.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                for net_id in net_ids:"},{"line_number":123,"context_line":"                    agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":124,"context_line":"                        context, [net_id])"},{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is hosted already\u0027, [net_id])"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_0546617c","line":125,"updated":"2014-12-10 12:16:02.000000000","message":"Nit 1: \"Network %s is already hosted.\"\n\nNit 2: There\u0027s no need to build a list out of net_id, you can just print it directly.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                for net_id in net_ids:"},{"line_number":123,"context_line":"                    agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":124,"context_line":"                        context, [net_id])"},{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is hosted already\u0027, [net_id])"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_0b5bb92e","line":125,"in_reply_to":"3a961159_0546617c","updated":"2014-12-11 01:15:04.000000000","message":"To Nit 1: Right, I\u0027ll fix Line 71 in this same time.\nTo Nit 2: Yes, you are right. I\u0027ll fix this.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                for net_id in net_ids:"},{"line_number":123,"context_line":"                    agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":124,"context_line":"                        context, [net_id])"},{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is already hosted\u0027, net_id)"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_318298c8","line":125,"updated":"2014-12-11 09:33:46.000000000","message":"Question: Dont you need to check here that the scheduled agents are still up?","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":12683,"name":"KaiLin","email":"linkai3@huawei.com","username":"LinKai"},"change_message_id":"fbad3e6607e76b4fc187fca094b041dfb5a710a0","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                for net_id in net_ids:"},{"line_number":123,"context_line":"                    agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":124,"context_line":"                        context, [net_id])"},{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is already hosted\u0027, net_id)"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_a3faba40","line":125,"in_reply_to":"3a961159_318298c8","updated":"2014-12-11 12:35:52.000000000","message":"Miguel,In my opinion,I don\u0027t think we need to check that the scheduled agents are still up here,because it has check in agents_db.AgentDbMixin.is_agent_down.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                for net_id in net_ids:"},{"line_number":123,"context_line":"                    agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":124,"context_line":"                        context, [net_id])"},{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is already hosted\u0027, net_id)"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_18a59fa1","line":125,"in_reply_to":"3a961159_a3faba40","updated":"2014-12-12 02:26:52.000000000","message":"Thank you very much, KaiLin. That is what I suppose to answer  Miguel Angel Ajo.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is already hosted\u0027, net_id)"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":129,"context_line":"                        continue"},{"line_number":130,"context_line":"                    bindings_to_add.append((dhcp_agent, net_id))"},{"line_number":131,"context_line":"        # do it outside transaction so particular scheduling results don\u0027t"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_310b787e","line":128,"updated":"2014-12-11 09:33:46.000000000","message":"Question: Dont you need to check here that the scheduled agent is still up?","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":126,"context_line":"                        LOG.debug(\u0027Network %s is already hosted\u0027, net_id)"},{"line_number":127,"context_line":"                        continue"},{"line_number":128,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":129,"context_line":"                        continue"},{"line_number":130,"context_line":"                    bindings_to_add.append((dhcp_agent, net_id))"},{"line_number":131,"context_line":"        # do it outside transaction so particular scheduling results don\u0027t"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f801b36a","line":128,"in_reply_to":"3a961159_310b787e","updated":"2014-12-12 02:26:52.000000000","message":"I think codes from line 118 to line 121 has already done this check. So I\u0027m not add a chec here.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"106cccf7f68b18c1e4412c4a5b32fcbcf86770c9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":60,"context_line":"            context, network_id, active\u003dTrue)"},{"line_number":61,"context_line":"        all_dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":62,"context_line":"            context, network_id)"},{"line_number":63,"context_line":"        dead_dhcp_agents \u003d list(set(all_dhcp_agents) - set(dhcp_agents))"},{"line_number":64,"context_line":"        for remove_agent in dead_dhcp_agents:"},{"line_number":65,"context_line":"            context.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_07a45aa4","line":62,"updated":"2014-12-22 07:04:37.000000000","message":"This method requires network_id as a list like [network_id].","commit_id":"45a8b42c32589484ac53594da870933682caf3f0"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"3d736ba36d07dc6cb37ac78f1919f986dbfda1af","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":60,"context_line":"            context, network_id, active\u003dTrue)"},{"line_number":61,"context_line":"        all_dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":62,"context_line":"            context, network_id)"},{"line_number":63,"context_line":"        dead_dhcp_agents \u003d list(set(all_dhcp_agents) - set(dhcp_agents))"},{"line_number":64,"context_line":"        for remove_agent in dead_dhcp_agents:"},{"line_number":65,"context_line":"            context.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_c7e5f2a4","line":62,"in_reply_to":"3a961159_07a45aa4","updated":"2014-12-22 07:22:47.000000000","message":"Yes, you are right. Thank you for your quick review.","commit_id":"45a8b42c32589484ac53594da870933682caf3f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"54c2d4d1ee5ef746fa060abb268d5b8364eed5eb","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        #TODO(gongysh) don\u0027t schedule the networks with only"},{"line_number":82,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":83,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":84,"context_line":"            self._remove_network_from_dead_agents(plugin, context,"},{"line_number":85,"context_line":"                                                  network[\u0027id\u0027])"},{"line_number":86,"context_line":"            dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":87,"context_line":"                context, [network[\u0027id\u0027]], active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_4d148b9f","line":84,"updated":"2014-12-24 06:40:01.000000000","message":"A scheduler is supposed to schedule, not to recover from faulty agents. This is not the right place where to add this logic.\n\nEugene has been working on a similar fix [1]. Have you come to an agreement on which path forward? I am afraid this is not right, in multi-server environments and a high rate of requests, this change will cause havoc.\n\n[1] https://review.openstack.org/#/c/131150/","commit_id":"b81472c3f8643f341a814c345a1cb15ad9a302b1"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"8d81c51d1344103bf7433c2c7981db517956a427","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        #TODO(gongysh) don\u0027t schedule the networks with only"},{"line_number":82,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":83,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":84,"context_line":"            self._remove_network_from_dead_agents(plugin, context,"},{"line_number":85,"context_line":"                                                  network[\u0027id\u0027])"},{"line_number":86,"context_line":"            dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":87,"context_line":"                context, [network[\u0027id\u0027]], active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_9db3e4e8","line":84,"in_reply_to":"3a961159_10fa9642","updated":"2014-12-26 00:38:31.000000000","message":"I rechecked the review history. Maybe it is better to return this fix back to patch set 9. So that agents\u0027 number will not over the dhcp_agents_per_network threshold, and enikanorov(Eugene)\u0027s work [1] will kill the dead agent instead of this delete logic.\n\nWhat do you see, Armando Migliaccio?\n\n[1] https://review.openstack.org/#/c/131150/","commit_id":"b81472c3f8643f341a814c345a1cb15ad9a302b1"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"3190533ff486ac46bacbdfba568ed751ab5ccc18","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        #TODO(gongysh) don\u0027t schedule the networks with only"},{"line_number":82,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":83,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":84,"context_line":"            self._remove_network_from_dead_agents(plugin, context,"},{"line_number":85,"context_line":"                                                  network[\u0027id\u0027])"},{"line_number":86,"context_line":"            dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":87,"context_line":"                context, [network[\u0027id\u0027]], active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_10fa9642","line":84,"in_reply_to":"3a961159_4d148b9f","updated":"2014-12-24 07:37:09.000000000","message":"I believe this fix is not conflict with fix [1].\nI\u0027ve already had a conversation with enikanorov(which is your speaking Eugene) in this fix.\nI think the scheduler need this logic to remove dead agent from a network, otherwise, the policy of the dhcp_agent_per_network will crash, that is, even the dhcp_agent_per_network is set to 1, and two agents (one is alive, one is dead and restarting) will bind to the network.\nWill you please recheck my message?\n\nAlso, I\u0027m not very sure why enikanorov(Eugene) put a -1 to his workflow of fix [1].\n\n[1] https://review.openstack.org/#/c/131150/","commit_id":"b81472c3f8643f341a814c345a1cb15ad9a302b1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4f85ee8e899cf2586bd1065c6a6ec9398b90a27d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":67,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":68,"context_line":"            dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":69,"context_line":"                context, [network[\u0027id\u0027]])"},{"line_number":70,"context_line":"            if len(dhcp_agents) \u003e\u003d agents_per_network:"},{"line_number":71,"context_line":"                LOG.debug(\u0027Network %s is hosted already\u0027,"},{"line_number":72,"context_line":"                          network[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_6a79f8fb","line":69,"updated":"2015-02-02 02:18:13.000000000","message":"it\u0027s better to fix the underlying implementation before flipping the usage.\nsee https://review.openstack.org/#/c/150284/","commit_id":"e95c99130cb06ba350a5eec76090457d636368df"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"3672ed4247392a8694cb925b6c2d0a4f3a62f1d3","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":132,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":133,"context_line":"            network_hosted_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":134,"context_line":"                context, [network[\u0027id\u0027]])"},{"line_number":135,"context_line":"            if len(network_hosted_agents) \u003e\u003d agents_per_network:"},{"line_number":136,"context_line":"                LOG.debug(\u0027Network %s is already hosted by enough agents.\u0027,"},{"line_number":137,"context_line":"                          network[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"7aaa499b_ab32670e","line":134,"updated":"2015-04-15 02:38:59.000000000","message":"if the dhcp-agent hosting the given network is always stoped, how does new port creation work?","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"c7211ef2f2758db85f259bde05bf4618414dd733","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # subnets whose enable_dhcp is false"},{"line_number":132,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":133,"context_line":"            network_hosted_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":134,"context_line":"                context, [network[\u0027id\u0027]])"},{"line_number":135,"context_line":"            if len(network_hosted_agents) \u003e\u003d agents_per_network:"},{"line_number":136,"context_line":"                LOG.debug(\u0027Network %s is already hosted by enough agents.\u0027,"},{"line_number":137,"context_line":"                          network[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"7aaa499b_6eb10de1","line":134,"in_reply_to":"7aaa499b_ab32670e","updated":"2015-04-15 03:17:11.000000000","message":"the heart beat mechanism isn\u0027t 100% reliable, perhaps the port_create response went out right before he died.","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"}],"neutron/tests/unit/scheduler/test_dhcp_agent_scheduler.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6b728644fd7978843ed83f6b526cab53dd0eb28f","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            )"},{"line_number":137,"context_line":"        )"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def _get_agent_from_db(self, agent):"},{"line_number":140,"context_line":"        return self.ctx.session.query("},{"line_number":141,"context_line":"            sched_db.NetworkDhcpAgentBinding"},{"line_number":142,"context_line":"        ).filter_by(dhcp_agent_id\u003dagent[0].id).all()"}],"source_content_type":"text/x-python","patch_set":21,"id":"dac4157f_c2ddc115","line":139,"range":{"start_line":139,"start_character":8,"end_line":139,"end_character":26},"updated":"2015-04-21 02:09:40.000000000","message":"this method name seems confusing.\nhow about _get_agent_binding_from_db?","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cc1c3710c3e020b38b6859856d7939ccba4c964b","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            )"},{"line_number":137,"context_line":"        )"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def _get_agent_from_db(self, agent):"},{"line_number":140,"context_line":"        return self.ctx.session.query("},{"line_number":141,"context_line":"            sched_db.NetworkDhcpAgentBinding"},{"line_number":142,"context_line":"        ).filter_by(dhcp_agent_id\u003dagent[0].id).all()"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_b9589333","line":139,"in_reply_to":"dac4157f_c2ddc115","updated":"2015-05-08 02:27:24.000000000","message":"Done","commit_id":"735d8c997df2bafffa8a2edd5585b79cbcabce59"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a84e3d37a2aca4a9290ae95a9cb31f606f5fea0a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        plugin \u003d mock.Mock()"},{"line_number":105,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":106,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":107,"context_line":"        plugin.get_dhcp_agents_hosting_networks.return_value \u003d dead_agent"},{"line_number":108,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":109,"context_line":"        self.assertFalse("},{"line_number":110,"context_line":"            scheduler.schedule("}],"source_content_type":"text/x-python","patch_set":28,"id":"3afb71cf_99dabd77","line":107,"updated":"2015-06-05 06:21:52.000000000","message":"as both of these new test cases mock get_dhcp_agents_hosting_networks,\ni think they passes even without the fix.\nit\u0027s better to have test cases which would fail without the fix.","commit_id":"cb50c289885f92d1880725b53ba538ecef797c82"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b69fbdf2f87f46387e4c09b87127f202cbe6b0aa","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        plugin \u003d mock.Mock()"},{"line_number":105,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":106,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":107,"context_line":"        plugin.get_dhcp_agents_hosting_networks.return_value \u003d dead_agent"},{"line_number":108,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":109,"context_line":"        self.assertFalse("},{"line_number":110,"context_line":"            scheduler.schedule("}],"source_content_type":"text/x-python","patch_set":28,"id":"3afb71cf_aadbd9ec","line":107,"in_reply_to":"3afb71cf_99dabd77","updated":"2015-06-05 08:39:46.000000000","message":"Hello, @YAMAMOTO Takashi\t. I\u0027ve confirmed this. UT goes OK without the fix. Even it does failed before. Thank you for your comment.\n\nIf you know which fix caused this, would you tell me about this, please?\n\nBTW, in my work space, the following new UT doesn\u0027t work. All of them are using get_dhcp_agents_hosting_networks. I just commented out them and did not looking into them yet.\n- test_scheduler_one_agents_per_network\n- test_scheduler_two_agents_per_network\n- test_scheduler_no_active_agents\n- test_scheduler_equal_distribution","commit_id":"cb50c289885f92d1880725b53ba538ecef797c82"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a84d3444257b734f030e3f5ec441aa0c6dd94b4e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                scheduler.schedule("},{"line_number":118,"context_line":"                    plugin, self.ctx, network))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def test_network_on_dead_agent_rescheduled_before_fix(self):"},{"line_number":121,"context_line":"        self._test_reschedule_vs_network_on_dead_agent(True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_network_on_dead_agent_not_rescheduled_after_fix(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa32b979_46cc02bb","line":120,"updated":"2015-06-23 13:40:30.000000000","message":"before/after_fix is too confusing.\nOnce this fix is merged, nobody can understand what is \"fix\".\n\nDo we really need a test for \"before\" fix?\n\nIf it is required, please consider changing the test name to more meaningful name.","commit_id":"90c6403c64b382c1be26150c6c9e39523ce0af7c"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"5edcd3fd15cd8120fd6cfba4580c15c621e2ac65","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                scheduler.schedule("},{"line_number":118,"context_line":"                    plugin, self.ctx, network))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def test_network_on_dead_agent_rescheduled_before_fix(self):"},{"line_number":121,"context_line":"        self._test_reschedule_vs_network_on_dead_agent(True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_network_on_dead_agent_not_rescheduled_after_fix(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa32b979_89dbd67b","line":120,"in_reply_to":"fa32b979_46cc02bb","updated":"2015-06-24 08:53:31.000000000","message":"Done","commit_id":"90c6403c64b382c1be26150c6c9e39523ce0af7c"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"e0f7b2acf10d47c7450f69abe522dd324d8b38e8","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                    plugin, self.ctx, network))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def test_network_on_dead_agent_rescheduled_before_fix(self):"},{"line_number":121,"context_line":"        self._test_reschedule_vs_network_on_dead_agent(True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_network_on_dead_agent_not_rescheduled_after_fix(self):"},{"line_number":124,"context_line":"        self._test_reschedule_vs_network_on_dead_agent(False)"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa32b979_617a50f3","line":121,"updated":"2015-06-23 14:07:51.000000000","message":"+1","commit_id":"90c6403c64b382c1be26150c6c9e39523ce0af7c"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e409ba8c815fae142b3eb59f655421be5b07eedd","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return dead_agent, alive_agent, scheduler"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _test_reschedule_vs_network_on_dead_agent(self,"},{"line_number":101,"context_line":"                                                  before_fix_is_approved):"},{"line_number":102,"context_line":"        dead_agent, alive_agent, scheduler \u003d ("},{"line_number":103,"context_line":"            self._test_get_agents_and_scheduler_for_dead_agent())"},{"line_number":104,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a50d1a3_740485bf","line":101,"range":{"start_line":101,"start_character":50,"end_line":101,"end_character":72},"updated":"2015-07-21 04:25:51.000000000","message":"can you rename \"before_fix_is_approved\" to a more appropriate name?","commit_id":"bfeed51b413def421a7066588044ae0f06dfb11b"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"0488b5d84be49f86b9a5c7208248f76ac5503e25","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return dead_agent, alive_agent, scheduler"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _test_reschedule_vs_network_on_dead_agent(self,"},{"line_number":101,"context_line":"                                                  before_fix_is_approved):"},{"line_number":102,"context_line":"        dead_agent, alive_agent, scheduler \u003d ("},{"line_number":103,"context_line":"            self._test_get_agents_and_scheduler_for_dead_agent())"},{"line_number":104,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a50d1a3_74c5653a","line":101,"in_reply_to":"3a50d1a3_740485bf","updated":"2015-07-21 04:28:55.000000000","message":"Done","commit_id":"bfeed51b413def421a7066588044ae0f06dfb11b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e409ba8c815fae142b3eb59f655421be5b07eedd","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        ).filter_by(dhcp_agent_id\u003dagent[0].id).all()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _test_auto_reschedule_vs_network_on_dead_agent(self,"},{"line_number":132,"context_line":"                                                       before_fix_is_approved):"},{"line_number":133,"context_line":"        dead_agent, alive_agent, scheduler \u003d ("},{"line_number":134,"context_line":"            self._test_get_agents_and_scheduler_for_dead_agent())"},{"line_number":135,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a50d1a3_74c9e577","line":132,"range":{"start_line":132,"start_character":55,"end_line":132,"end_character":77},"updated":"2015-07-21 04:25:51.000000000","message":"ditto","commit_id":"bfeed51b413def421a7066588044ae0f06dfb11b"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"0488b5d84be49f86b9a5c7208248f76ac5503e25","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        ).filter_by(dhcp_agent_id\u003dagent[0].id).all()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _test_auto_reschedule_vs_network_on_dead_agent(self,"},{"line_number":132,"context_line":"                                                       before_fix_is_approved):"},{"line_number":133,"context_line":"        dead_agent, alive_agent, scheduler \u003d ("},{"line_number":134,"context_line":"            self._test_get_agents_and_scheduler_for_dead_agent())"},{"line_number":135,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a50d1a3_94c0312c","line":132,"in_reply_to":"3a50d1a3_74c9e577","updated":"2015-07-21 04:28:55.000000000","message":"Done","commit_id":"bfeed51b413def421a7066588044ae0f06dfb11b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4a67dd418a535bbd17c5c0912b7903d26d7147fb","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_89bd3eb9","line":164,"updated":"2015-07-22 03:20:20.000000000","message":"i don\u0027t understand what cases these tests are trying to cover.\n\nas the plugin, including get_dhcp_agents_hosting_networks,\nis mocked, these tests would succeed regardless of your change, right?","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":17500,"name":"Fujitsu C-Fabric CI","email":"fj-lsoft-cfabricci@dl.jp.fujitsu.com","username":"Fujitsu_C-Fabric_CI","tags":["SERVICE_USER"]},"change_message_id":"61dfc7bead6331b4fa960f64a851c6e65573e895","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_9231935c","line":164,"in_reply_to":"1a4dcd0f_723ac79a","updated":"2015-08-07 04:29:55.000000000","message":"Yes, and I thought that is what you have requested me to do--to cover the test case if this fix never existed.\n\nYou have said in Patch Set 28: [it\u0027s better to have test cases which would fail without the fix.]\n\nIf I have any misunderstand about your comment, please let me know.","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"259e7f2eda699f05a91cacf6ea147dda6c75cfdf","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_723ac79a","line":164,"in_reply_to":"1a4dcd0f_8eee078a","updated":"2015-08-07 03:46:43.000000000","message":"my understanding is:\n\n* these test cases do not cover the fix itself\n* active_hosts_only\u003dFalse case examines the situation which can never happen in the actual code\n\nright?","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7deb808c790f144e6bd277cf572e5fdc3ece7fa1","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_5b0b1fd6","line":164,"in_reply_to":"1a4dcd0f_9231935c","updated":"2015-08-07 08:33:01.000000000","message":"my comment was meant a test which would:\n\n* fail without the fix\n* success with the fix","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"406ee06f8392521c1d6113a26d8960174db8407a","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_cc1914d3","line":164,"in_reply_to":"3a50d1a3_25a67f53","updated":"2015-08-03 03:33:33.000000000","message":"i don\u0027t get it.  i confirmed that these tests succeed with or without the fix.","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"e2968789ca977119f70db0b47af1eba73705a989","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_25a67f53","line":164,"in_reply_to":"3a50d1a3_89bd3eb9","updated":"2015-07-22 09:42:46.000000000","message":"Hello, @YAMAMOTO Takashi\t, these test are covering your comment in Patch Set 28, they are the test cases which fail without the fix.","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"61190ad625b1f49bde136cf871f2e3e0cf721400","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def test_network_not_auto_rescheduled_when_db_returns_all_hosts(self):"},{"line_number":162,"context_line":"        self._test_auto_reschedule_vs_network_on_dead_agent(False)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAutoScheduleNetworks(TestDhcpSchedulerBaseTestCase):"},{"line_number":166,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1a4dcd0f_8eee078a","line":164,"in_reply_to":"3a50d1a3_cc1914d3","updated":"2015-08-04 06:52:14.000000000","message":"Sorry, here fail means, without the fix, the dead host will be returned, which will fail the case, that dispirited in the bug report.","commit_id":"b095fa11a4df221a5d539d142bd3c0340935ad9d"}],"neutron/tests/unit/test_dhcp_scheduler.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"765b5e68c93a7799106a054280ab80d5d14577e2","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network(\u0027host-a\u0027, self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents(\u0027host-a\u0027)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2f458a6e","line":136,"updated":"2014-12-04 05:48:59.000000000","message":"This function expects an iterable of agents but you are just passing it a single agent as a string so what it\u0027s testing doesn\u0027t make any sense.","commit_id":"413adc8141ee2cd8929d661c19d10569646f7dfb"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"ff74cd187cb1f2e53fd693490d82ae7617a2cb29","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network(\u0027host-a\u0027, self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents(\u0027host-a\u0027)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_820015ac","line":136,"in_reply_to":"5a890539_2f458a6e","updated":"2014-12-04 06:22:13.000000000","message":"Hello, Kevin Benton. Thank you for your comment.\nYou are right. It should be  iterable.\nI was thinking about a two agents system, and made this simple mistake.\nI\u0027ll be careful next time, and fix this ASAP.\n-----\n -  self._test_schedule_bind_network(\u0027host-a\u0027, self.network_id)\n +  self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)\n-----","commit_id":"413adc8141ee2cd8929d661c19d10569646f7dfb"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"765b5e68c93a7799106a054280ab80d5d14577e2","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network(\u0027host-a\u0027, self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents(\u0027host-a\u0027)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"},{"line_number":140,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_4f5f3641","line":137,"updated":"2014-12-04 05:48:59.000000000","message":"the _kill_agents function also expects an iterable, does passing it a string make any sense?","commit_id":"413adc8141ee2cd8929d661c19d10569646f7dfb"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"ff74cd187cb1f2e53fd693490d82ae7617a2cb29","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network(\u0027host-a\u0027, self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents(\u0027host-a\u0027)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"},{"line_number":140,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_42e8ede1","line":137,"in_reply_to":"5a890539_4f5f3641","updated":"2014-12-04 06:22:13.000000000","message":"Same as above. I\u0027ll fix it, too.","commit_id":"413adc8141ee2cd8929d661c19d10569646f7dfb"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"abbdb19627eaa8dbf4ffc609b0556f5a0b19621e","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"                self.ctx.session.add(agent)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _kill_agents(self, agents):"},{"line_number":58,"context_line":"        for agent in agents:"},{"line_number":59,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":60,"context_line":"                self.ctx.session.delete(agent)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_8d0aa11f","line":57,"updated":"2014-12-09 12:03:19.000000000","message":"i think you really need to make agents inactive, not really delete entries from the DB.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"e58e6857887ab99079ed2ada27841475e8f76ae3","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"                self.ctx.session.add(agent)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _kill_agents(self, agents):"},{"line_number":58,"context_line":"        for agent in agents:"},{"line_number":59,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":60,"context_line":"                self.ctx.session.delete(agent)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_27d44f1f","line":57,"in_reply_to":"3a961159_8d0aa11f","updated":"2014-12-10 02:10:46.000000000","message":"Hello, enikanorov. Thank you for your comment. Yes, you are right. I\u0027ll remove this _kill_agents","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ac4a0dcaf0565d9818ec8a4c0340d3305ac1df60","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":129,"context_line":"            .all())"},{"line_number":130,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _test_ChanceScheduler_should_not_bind_network(self, agents,"},{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_2c7f266b","line":131,"updated":"2014-12-05 09:30:07.000000000","message":"Leading the function name with an underscore means that this test doesn\u0027t run by default.\n\nI suggest:\n\"test_scheduled_network_on_dead_agent_is_not_rescheduled\"","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"9ebd895f5d9e6a01315efafe12c91fd8b57b8bb4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":129,"context_line":"            .all())"},{"line_number":130,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _test_ChanceScheduler_should_not_bind_network(self, agents,"},{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_b8aeeee5","line":131,"in_reply_to":"5a890539_2c7f266b","updated":"2014-12-08 04:27:17.000000000","message":"Hello, Assaf Muller. Thank you for your comment\n\"test_scheduled_network_on_dead_agent_is_not_rescheduled\" is a good name, I\u0027ll use it.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ac4a0dcaf0565d9818ec8a4c0340d3305ac1df60","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents([\u0027host-a\u0027])"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_8c43ba12","line":136,"updated":"2014-12-05 09:30:07.000000000","message":"_kill_agents won\u0027t actually do anything here. I\u0027m not on my work laptop so I can\u0027t run this code locally right now, however, you need to pass [agents[0]] here instead. I\u0027d be surprised and worried if this test actually passes. If it does it\u0027s for the wrong reasons. Please make sure that you rename the test name so that it runs at the gate.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"8a901e455af7564bcd5b5bf2fa3c1384cea321d3","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents([\u0027host-a\u0027])"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_c7770b3a","line":136,"in_reply_to":"3a961159_98aa12d3","updated":"2014-12-10 02:14:12.000000000","message":"Hello, Assaf Muller. I made a mistake on this point. [agents[0]] works, and [\u0027host-a\u0027] doesn\u0027t work. Thank you for your correction.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"9ebd895f5d9e6a01315efafe12c91fd8b57b8bb4","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                                     network_id):"},{"line_number":134,"context_line":"        agents \u003d self._get_agents([\u0027host-a\u0027, \u0027host-b\u0027])"},{"line_number":135,"context_line":"        self._save_agents(agents)"},{"line_number":136,"context_line":"        self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents([\u0027host-a\u0027])"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_98aa12d3","line":136,"in_reply_to":"5a890539_8c43ba12","updated":"2014-12-08 04:27:17.000000000","message":"About [\u0027host-a\u0027], I believe it will work, just as the existing codes.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d26c438279dcd67590ac84fe0df717f05eca474c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents([\u0027host-a\u0027])"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"},{"line_number":140,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"},{"line_number":141,"context_line":"                                             self.ctx, \u0027host-b\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_27be5a00","line":139,"range":{"start_line":139,"start_character":44,"end_line":139,"end_character":50},"updated":"2014-12-08 08:50:04.000000000","message":"\"plugin\"?\nseems like a missing mock.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdc73a6bac3a7fc58e332261dc172dfa22bb3905","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self._test_schedule_bind_network([\u0027host-a\u0027], self.network_id)"},{"line_number":137,"context_line":"        self._kill_agents([\u0027host-a\u0027])"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, self.network_id))"},{"line_number":140,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"},{"line_number":141,"context_line":"                                             self.ctx, \u0027host-b\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_e5526edc","line":139,"in_reply_to":"3a961159_27be5a00","updated":"2014-12-08 23:34:39.000000000","message":"Hello, YAMAMOTO-san. Thank you for your comment. You are correct. re-runing run_test.sh hit this as an error. I\u0027m working on it.","commit_id":"fd031226454b047ee2aeea85c5cd3e5c90f7a49a"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(DhcpSchedulerTestCase, self).setUp()"},{"line_number":35,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":36,"context_line":"        self.network_info \u003d []"},{"line_number":37,"context_line":"        self.network_id \u003d \u0027foo_network_id\u0027"},{"line_number":38,"context_line":"        self.network_name \u003d \u0027foo_network_name\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_08b2f8e5","line":35,"updated":"2014-12-10 12:16:02.000000000","message":"There\u0027s no need to save network_info as a class member. Aside from there being no need (It\u0027s completely local to the setUp method), we should really avoid saving state at the TestCase level whenever we can.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(DhcpSchedulerTestCase, self).setUp()"},{"line_number":35,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":36,"context_line":"        self.network_info \u003d []"},{"line_number":37,"context_line":"        self.network_id \u003d \u0027foo_network_id\u0027"},{"line_number":38,"context_line":"        self.network_name \u003d \u0027foo_network_name\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b633e812","line":35,"in_reply_to":"3a961159_08b2f8e5","updated":"2014-12-11 01:15:04.000000000","message":"Right, I\u0027ll write it in simple way.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        self.network_name \u003d \u0027foo_network_name\u0027"},{"line_number":39,"context_line":"        self.network_info.append((self.network_id, self.network_name))"},{"line_number":40,"context_line":"        self._save_networks(self.network_info)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _get_agents(self, hosts):"},{"line_number":43,"context_line":"        return ["},{"line_number":44,"context_line":"            agents_db.Agent("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_48f9607f","line":41,"updated":"2014-12-10 12:16:02.000000000","message":"There\u0027s no need to duplicate code between this method and _get_shutdown_agents. You can add admin_state_up as an argument to the _get_agents method, or if you want, define a third method that does that, and _get_agents \u0026 _get_shutdown_agents call that method with different arguments.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        self.network_name \u003d \u0027foo_network_name\u0027"},{"line_number":39,"context_line":"        self.network_info.append((self.network_id, self.network_name))"},{"line_number":40,"context_line":"        self._save_networks(self.network_info)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _get_agents(self, hosts):"},{"line_number":43,"context_line":"        return ["},{"line_number":44,"context_line":"            agents_db.Agent("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_117206ad","line":41,"in_reply_to":"3a961159_48f9607f","updated":"2014-12-11 01:15:04.000000000","message":"You are right. I would like to chose the first way, to add admin_state_up as an argument to the _get_agents method.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":148,"context_line":"        #setup"},{"line_number":149,"context_line":"        agentA \u003d self._get_shutdown_agents([\u0027host-a\u0027])"},{"line_number":150,"context_line":"        agentB \u003d self._get_agents([\u0027host-b\u0027])"},{"line_number":151,"context_line":"        self._save_agents(agentA)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_68d7fcbf","line":148,"updated":"2014-12-10 12:16:02.000000000","message":"It\u0027ll help if you rename agentA to dead_agent, and agentB to alive_agent.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":148,"context_line":"        #setup"},{"line_number":149,"context_line":"        agentA \u003d self._get_shutdown_agents([\u0027host-a\u0027])"},{"line_number":150,"context_line":"        agentB \u003d self._get_agents([\u0027host-b\u0027])"},{"line_number":151,"context_line":"        self._save_agents(agentA)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_ab39c5a5","line":148,"in_reply_to":"3a961159_68d7fcbf","updated":"2014-12-11 01:15:04.000000000","message":"Yes, that is clearer names.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        agentB \u003d self._get_agents([\u0027host-b\u0027])"},{"line_number":151,"context_line":"        self._save_agents(agentA)"},{"line_number":152,"context_line":"        self._save_agents(agentB)"},{"line_number":153,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":154,"context_line":"        dbpluginv2 \u003d db_base_plugin_v2.NeutronDbPluginV2()"},{"line_number":155,"context_line":"        self._test_schedule_bind_network([agentA[0]], self.network_id)"},{"line_number":156,"context_line":"        #mock the plugin"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_884fc8bc","line":153,"updated":"2014-12-10 12:16:02.000000000","message":"It\u0027s confusing that you have a mocked plugin, and a non-mocked plugin. Since dbpluginv2 is only used to get the network info you can just do something like:\n\nnetwork \u003d db_base_plugin_v2.NeutronDbPluginV2()._get_network(self.ctx, self.network_id)\n\nSo you don\u0027t save the unmocked plugin to a variable.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        agentB \u003d self._get_agents([\u0027host-b\u0027])"},{"line_number":151,"context_line":"        self._save_agents(agentA)"},{"line_number":152,"context_line":"        self._save_agents(agentB)"},{"line_number":153,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":154,"context_line":"        dbpluginv2 \u003d db_base_plugin_v2.NeutronDbPluginV2()"},{"line_number":155,"context_line":"        self._test_schedule_bind_network([agentA[0]], self.network_id)"},{"line_number":156,"context_line":"        #mock the plugin"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_cb8ff128","line":153,"in_reply_to":"3a961159_884fc8bc","updated":"2014-12-11 01:15:04.000000000","message":"I see. I was trying to avoid a too long line. However, since this non-mocked plugin has only been called once, so I\u0027ll fix it as you advised.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"3d02fc3e4df6f0b163d7f0251ceb750bf6e605ae","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":159,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":160,"context_line":"        plugin.get_dhcp_agents_hosting_networks.return_value \u003d [{"},{"line_number":161,"context_line":"                  \"network_ids\": self.network_id, \"active\": None}]"},{"line_number":162,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_46fbf3c0","line":161,"updated":"2014-12-11 02:43:10.000000000","message":"With this mock, the length of the result of the method is always 1, so that this test passes without the patch. It could not verify the fix.\n\nI suggest the following mock.\n----------------------------------------------------\n        def fake_get_dhcp_agents_hosting_networks(*args, **kargs):\n            if kargs.get(\u0027active\u0027):\n                return  []\n            else:\n                return agentA\n        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\\n            fake_get_dhcp_agents_hosting_networks\n----------------------------------------------------","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"a64645691faffdad3dfc4d10eccd589c07a34db1","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":159,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":160,"context_line":"        plugin.get_dhcp_agents_hosting_networks.return_value \u003d [{"},{"line_number":161,"context_line":"                  \"network_ids\": self.network_id, \"active\": None}]"},{"line_number":162,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d18b1466","line":161,"in_reply_to":"3a961159_46fbf3c0","updated":"2014-12-11 09:13:57.000000000","message":"This module worked, and helps a lot. Thank you.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                  \"network_ids\": self.network_id, \"active\": None}]"},{"line_number":162,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"},{"line_number":165,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":166,"context_line":"        #to another agent."},{"line_number":167,"context_line":"        results \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e8f20c6e","line":164,"updated":"2014-12-10 12:16:02.000000000","message":"I think it makes sense to test auto_schedule_networks in a separate test. What do you think?","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                  \"network_ids\": self.network_id, \"active\": None}]"},{"line_number":162,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"},{"line_number":165,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":166,"context_line":"        #to another agent."},{"line_number":167,"context_line":"        results \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b1b852c9","line":164,"in_reply_to":"3a961159_e8f20c6e","updated":"2014-12-11 01:15:04.000000000","message":"Right, that is clearer code.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3aaf864ce79b80b3c54817a05fc5627d69b89cd2","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"},{"line_number":165,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":166,"context_line":"        #to another agent."},{"line_number":167,"context_line":"        results \u003d ("},{"line_number":168,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":169,"context_line":"            .all())"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_88826892","line":166,"updated":"2014-12-10 12:16:02.000000000","message":"Hrmm, why not use len(get_dhcp_agents_hosting_networks)?","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"acb12ec8eab929b731e1d320fa940e4ff532a611","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx,"},{"line_number":164,"context_line":"             dbpluginv2._get_network(self.ctx, self.network_id)))"},{"line_number":165,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":166,"context_line":"        #to another agent."},{"line_number":167,"context_line":"        results \u003d ("},{"line_number":168,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":169,"context_line":"            .all())"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_31a542a2","line":166,"in_reply_to":"3a961159_88826892","updated":"2014-12-11 01:15:04.000000000","message":"Because I\u0027m a new face here. ^^; I\u0027m learning from the existing codes. By the way, do you mean len([plugin.get_dhcp_agents_hosting_networks]), because, this works in the unit test.","commit_id":"4794a2f4d800002e4815b66b628809bcd51e59be"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent.append(alive_agent)"},{"line_number":153,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":154,"context_line":"        #When active\u003d\u003dTure: export \"is not false\" error"},{"line_number":155,"context_line":"        #When active!\u003dTure: export OK result "},{"line_number":156,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_auto_rescheduled(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_b175a8fb","line":155,"updated":"2014-12-11 09:33:46.000000000","message":"nit: blank space at end","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent.append(alive_agent)"},{"line_number":153,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":154,"context_line":"        #When active\u003d\u003dTure: export \"is not false\" error"},{"line_number":155,"context_line":"        #When active!\u003dTure: export OK result "},{"line_number":156,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_auto_rescheduled(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f838d33e","line":155,"in_reply_to":"3a961159_b175a8fb","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this ASAP.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":178,"context_line":"        #to another agent."},{"line_number":179,"context_line":"        #When active\u003d\u003dTure: export \"1!\u003d2\" error"},{"line_number":180,"context_line":"        #When active!\u003dTure: export OK result "},{"line_number":181,"context_line":"        results \u003d (                                                                         self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":182,"context_line":"                .all())"},{"line_number":183,"context_line":"        self.assertEqual(1, len(results))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f162d03c","line":180,"updated":"2014-12-11 09:33:46.000000000","message":"nit: blank space at end","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":178,"context_line":"        #to another agent."},{"line_number":179,"context_line":"        #When active\u003d\u003dTure: export \"1!\u003d2\" error"},{"line_number":180,"context_line":"        #When active!\u003dTure: export OK result "},{"line_number":181,"context_line":"        results \u003d (                                                                         self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":182,"context_line":"                .all())"},{"line_number":183,"context_line":"        self.assertEqual(1, len(results))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_383edb28","line":180,"in_reply_to":"3a961159_f162d03c","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this ASAP.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":184,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin, self.ctx,"},{"line_number":185,"context_line":"                                                             \"alive-host\"))"},{"line_number":186,"context_line":"        results \u003d ( "},{"line_number":187,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":188,"context_line":"                .all())"},{"line_number":189,"context_line":"        self.assertEqual(1, len(results)) "}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_11683c1c","line":186,"updated":"2014-12-11 09:33:46.000000000","message":"nit: blank space at end","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":184,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin, self.ctx,"},{"line_number":185,"context_line":"                                                             \"alive-host\"))"},{"line_number":186,"context_line":"        results \u003d ( "},{"line_number":187,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":188,"context_line":"                .all())"},{"line_number":189,"context_line":"        self.assertEqual(1, len(results)) "}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_7844e3b6","line":186,"in_reply_to":"3a961159_11683c1c","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this ASAP.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"63f9f2bb0cdb8309426e40a05f19d7a8a42e9cb4","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        results \u003d ( "},{"line_number":187,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":188,"context_line":"                .all())"},{"line_number":189,"context_line":"        self.assertEqual(1, len(results)) "}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_3159b88e","line":189,"updated":"2014-12-11 09:33:46.000000000","message":"nit: blank space at end","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"081d49919cdc8e02ff297fed5963861fbae7e56b","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        results \u003d ( "},{"line_number":187,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":188,"context_line":"                .all())"},{"line_number":189,"context_line":"        self.assertEqual(1, len(results)) "}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_98142fa1","line":189,"in_reply_to":"3a961159_3159b88e","updated":"2014-12-12 02:26:52.000000000","message":"Thanks, I\u0027ll fix this ASAP.","commit_id":"022eae2ce1495c1de9b401583773d8d92a73d241"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"46de65a31f391f2cf950868498897cf1eb1ae8f0","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        network \u003d db_base_plugin_v2.NeutronDbPluginV2()._get_network("},{"line_number":140,"context_line":"                                           self.ctx, self.network_id)"},{"line_number":141,"context_line":"        #mock the plugin"},{"line_number":142,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_79286286","line":140,"updated":"2014-12-12 07:59:05.000000000","message":"It is not necessary to call the method. You can prepare network more simply like this:\n\nnetwork \u003d {\u0027id\u0027: self.network_id}","commit_id":"2e62329ba73e6ed76d4002b81993c7ee7489f8ab"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"533fcebd0d43e5cbdfda0ceaf4e307c8aa5e4e16","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":138,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":139,"context_line":"        network \u003d db_base_plugin_v2.NeutronDbPluginV2()._get_network("},{"line_number":140,"context_line":"                                           self.ctx, self.network_id)"},{"line_number":141,"context_line":"        #mock the plugin"},{"line_number":142,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_bc5558fb","line":140,"in_reply_to":"3a961159_79286286","updated":"2014-12-12 08:34:22.000000000","message":"Right, mock the network is more simply. I\u0027ll fix this ASAP.","commit_id":"2e62329ba73e6ed76d4002b81993c7ee7489f8ab"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"46de65a31f391f2cf950868498897cf1eb1ae8f0","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                return dead_agent"},{"line_number":151,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":152,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":153,"context_line":"        #plugin.get_agents_db.return_value \u003d dead_agent.append(alive_agent)"},{"line_number":154,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":155,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":156,"context_line":"        #When active\u003d\u003dTure: export \"is not false\" error"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d97156a9","line":153,"updated":"2014-12-12 07:59:05.000000000","message":"comment out remains.","commit_id":"2e62329ba73e6ed76d4002b81993c7ee7489f8ab"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"533fcebd0d43e5cbdfda0ceaf4e307c8aa5e4e16","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                return dead_agent"},{"line_number":151,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":152,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":153,"context_line":"        #plugin.get_agents_db.return_value \u003d dead_agent.append(alive_agent)"},{"line_number":154,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":155,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":156,"context_line":"        #When active\u003d\u003dTure: export \"is not false\" error"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_99518e38","line":153,"in_reply_to":"3a961159_d97156a9","updated":"2014-12-12 08:34:22.000000000","message":"Thanks, I\u0027ll fix this","commit_id":"2e62329ba73e6ed76d4002b81993c7ee7489f8ab"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"ede9b1ce1bf6a2daddf2532bc7ef4dde632cf38b","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding).all())"},{"line_number":193,"context_line":"        self.assertEqual(expected_hosted_agents, len(hosted_agents))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":196,"context_line":"        #setup"},{"line_number":197,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027], False)"},{"line_number":198,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_6d474e4c","line":195,"updated":"2014-12-16 18:19:37.000000000","message":"For each scenario this test case runs,so totally it would run 6 times.\nSo either add a scenario to cover this or move this and the below function to the DhcpSchedulerTestCase class.","commit_id":"cdc5e0c136c885eaa9c7ab1b0f9ccf31f29b6fca"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"15163b0d97d131052b215f123c93b5b0a2f0f555","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding).all())"},{"line_number":193,"context_line":"        self.assertEqual(expected_hosted_agents, len(hosted_agents))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":196,"context_line":"        #setup"},{"line_number":197,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027], False)"},{"line_number":198,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_054a1a83","line":195,"in_reply_to":"3a961159_6d474e4c","updated":"2014-12-16 21:53:46.000000000","message":"I see. Let\u0027s simply move this part to another class.","commit_id":"cdc5e0c136c885eaa9c7ab1b0f9ccf31f29b6fca"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":129,"context_line":"        #setup"},{"line_number":130,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027], False)"},{"line_number":131,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":132,"context_line":"        self._save_agents(dead_agent)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_3d21b79f","line":129,"updated":"2014-12-18 07:49:32.000000000","message":"remove this line","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":135,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":136,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"},{"line_number":137,"context_line":"        #mock the plugin"},{"line_number":138,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":139,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":140,"context_line":"                                            \"enable_dhcp\": True}]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_5d24c3ae","line":137,"updated":"2014-12-18 07:49:32.000000000","message":"remove this comment as well. it\u0027s pretty self-explanatory","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":148,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":149,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":150,"context_line":"        #Test \"schedule\" not to bind the already hosted network."},{"line_number":151,"context_line":"        #When active\u003d\u003dTure: export \"is not false\" error"},{"line_number":152,"context_line":"        #When active!\u003dTure: export OK result"},{"line_number":153,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_7d3a5fce","line":150,"updated":"2014-12-18 07:49:32.000000000","message":"these comments probably aren\u0027t necessary either. assertFalse hints that we expect the scheduling not to happen for the network","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_auto_rescheduled(self):"},{"line_number":156,"context_line":"        #setup"},{"line_number":157,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027], False)"},{"line_number":158,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":159,"context_line":"        self._save_agents(dead_agent)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_9d354bdd","line":156,"updated":"2014-12-18 07:49:32.000000000","message":"same","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self._save_agents(alive_agent)"},{"line_number":161,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":162,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":163,"context_line":"        #mock the plugin"},{"line_number":164,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":165,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":166,"context_line":"                                            \"enable_dhcp\": True}]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_bd34c7de","line":163,"updated":"2014-12-18 07:49:32.000000000","message":"same","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                return dead_agent"},{"line_number":173,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":174,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":175,"context_line":"        #Test \"auto_schedule\" not to bind the already hosted network"},{"line_number":176,"context_line":"        #to another agent."},{"line_number":177,"context_line":"        #When active\u003d\u003dTure: export \"1!\u003d2\" error"},{"line_number":178,"context_line":"        #When active!\u003dTure: export OK result"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_dd2fd386","line":175,"updated":"2014-12-18 07:49:32.000000000","message":"remove these as well. the test name indicates what is happening","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc34022f079fc4bb4b99f25567a2d5557791d117","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        results \u003d ("},{"line_number":180,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":181,"context_line":"            .all())"},{"line_number":182,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":183,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":184,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":185,"context_line":"        results \u003d ("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_fd4d6f73","line":182,"updated":"2014-12-18 07:49:32.000000000","message":"These particular queries aren\u0027t very specific so it makes the code a little harder to follow. Can you query for the specific agent host you are looking for rather than doing it based on totals across all agents?","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"663da0a050773f6492a7dbcf2faf47243158b06b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        results \u003d ("},{"line_number":180,"context_line":"            self.ctx.session.query(agentschedulers_db.NetworkDhcpAgentBinding)"},{"line_number":181,"context_line":"            .all())"},{"line_number":182,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":183,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":184,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":185,"context_line":"        results \u003d ("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_c619a389","line":182,"in_reply_to":"3a961159_fd4d6f73","updated":"2014-12-19 02:32:39.000000000","message":"Hello, Kevin Benton. Thank you for your comments. I will fix them all.","commit_id":"7af7eab57c19e83e4cdc5cad061bbf8212afc990"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":128,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":129,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":130,"context_line":"        self._save_agents(dead_agent)"},{"line_number":131,"context_line":"        self._save_agents(alive_agent)"},{"line_number":132,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_40cc6c61","line":129,"updated":"2015-01-16 13:31:27.000000000","message":"nit: Instead of 2 calls to _get_agents(), I think you can have just one call like below\ndead_agent, alive_agent \u003d self._get_agents([\u0027dead_host\u0027, \u0027alive_host\u0027])","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_rescheduled(self):"},{"line_number":128,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":129,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":130,"context_line":"        self._save_agents(dead_agent)"},{"line_number":131,"context_line":"        self._save_agents(alive_agent)"},{"line_number":132,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_274d9372","line":129,"in_reply_to":"3a961159_40cc6c61","updated":"2015-01-19 08:45:55.000000000","message":"The following error occurred after the fix.\n\nUnmappedInstanceError: Class \u0027__builtin__.tuple\u0027 is not mapped\n\nAlso, because of the new code excess 80 characters, the number of lines did not reduced. So I would like to leave it as it is.","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":129,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":130,"context_line":"        self._save_agents(dead_agent)"},{"line_number":131,"context_line":"        self._save_agents(alive_agent)"},{"line_number":132,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":133,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":134,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_a01270b1","line":131,"updated":"2015-01-16 13:31:27.000000000","message":"nit: Same here.\nYou can have just one call like\nself._save_agents([dead_agent, alive_agent])","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":129,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":130,"context_line":"        self._save_agents(dead_agent)"},{"line_number":131,"context_line":"        self._save_agents(alive_agent)"},{"line_number":132,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":133,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":134,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_2774b39a","line":131,"in_reply_to":"3a961159_a01270b1","updated":"2015-01-19 08:45:55.000000000","message":"The following error occurred after the fix.\n\nUnmappedInstanceError: Class \u0027__builtin__.list\u0027 is not mapped\n\nBut the following fix worked: self._save_agents(dead_agent + alive_agent)","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":137,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        def _fake_get_dhcp_agents_hosting_networks(*args, **kargs):"},{"line_number":140,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":141,"context_line":"                return []"},{"line_number":142,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_60a6c855","line":139,"updated":"2015-01-16 13:31:27.000000000","message":"suggestion: Since both the functions have code in common, can you have a helper function with the common code ?","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":137,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        def _fake_get_dhcp_agents_hosting_networks(*args, **kargs):"},{"line_number":140,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":141,"context_line":"                return []"},{"line_number":142,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_aa94ea43","line":139,"in_reply_to":"3a961159_60a6c855","updated":"2015-01-19 08:45:55.000000000","message":"I tried. But the helper does not work out side the method. Because I need to return an agent which is not created in the helper.","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":141,"context_line":"                return []"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                return dead_agent"},{"line_number":144,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":145,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":146,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_4021ccfa","line":143,"updated":"2015-01-16 13:31:27.000000000","message":"nit: new line would be better here","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":141,"context_line":"                return []"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                return dead_agent"},{"line_number":144,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":145,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":146,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_ca8f762c","line":143,"in_reply_to":"3a961159_4021ccfa","updated":"2015-01-19 08:45:55.000000000","message":"Done","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_auto_rescheduled(self):"},{"line_number":150,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":151,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":152,"context_line":"        self._save_agents(dead_agent)"},{"line_number":153,"context_line":"        self._save_agents(alive_agent)"},{"line_number":154,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_a07990fd","line":151,"updated":"2015-01-16 13:31:27.000000000","message":"Same comment as in the above function","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_scheduled_network_on_dead_agent_is_not_auto_rescheduled(self):"},{"line_number":150,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":151,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":152,"context_line":"        self._save_agents(dead_agent)"},{"line_number":153,"context_line":"        self._save_agents(alive_agent)"},{"line_number":154,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_ea9a726d","line":151,"in_reply_to":"3a961159_a07990fd","updated":"2015-01-19 08:45:55.000000000","message":"same as above.","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":151,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":152,"context_line":"        self._save_agents(dead_agent)"},{"line_number":153,"context_line":"        self._save_agents(alive_agent)"},{"line_number":154,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":155,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":156,"context_line":"        plugin \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_008344cb","line":153,"updated":"2015-01-16 13:31:27.000000000","message":"Same here as well","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":151,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":152,"context_line":"        self._save_agents(dead_agent)"},{"line_number":153,"context_line":"        self._save_agents(alive_agent)"},{"line_number":154,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":155,"context_line":"        self._test_schedule_bind_network(dead_agent, self.network_id)"},{"line_number":156,"context_line":"        plugin \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_2a88fa20","line":153,"in_reply_to":"3a961159_008344cb","updated":"2015-01-19 08:45:55.000000000","message":"same as above.","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":162,"context_line":"                return []"},{"line_number":163,"context_line":"            else:"},{"line_number":164,"context_line":"                return dead_agent"},{"line_number":165,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":166,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":167,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_60732816","line":164,"updated":"2015-01-16 13:31:27.000000000","message":"nit: New line here would be better","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":162,"context_line":"                return []"},{"line_number":163,"context_line":"            else:"},{"line_number":164,"context_line":"                return dead_agent"},{"line_number":165,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":166,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":167,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_dba8267a","line":164,"in_reply_to":"3a961159_60732816","updated":"2015-01-19 08:45:55.000000000","message":"Done","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                return dead_agent"},{"line_number":165,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":166,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":167,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":168,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_60f8884a","line":167,"updated":"2015-01-16 13:31:27.000000000","message":"It would be easier to read if you could separate the query call and the assertEqual","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                return dead_agent"},{"line_number":165,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":166,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":167,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":168,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_7baad284","line":167,"in_reply_to":"3a961159_60f8884a","updated":"2015-01-19 08:45:55.000000000","message":"Done","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":171,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":172,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":173,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":174,"context_line":"            id).all()))"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_009fc402","line":171,"updated":"2015-01-16 13:31:27.000000000","message":"nit: please align to the above line","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":171,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":172,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":173,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":174,"context_line":"            id).all()))"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_8a980e6a","line":171,"in_reply_to":"3a961159_009fc402","updated":"2015-01-19 08:45:55.000000000","message":"Done","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6de3398e5d950b64e3abb978ebf734ce99e421ac","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":171,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":172,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":173,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":174,"context_line":"            id).all()))"},{"line_number":175,"context_line":"        self.assertEqual(0, len(self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_a0bc306d","line":172,"updated":"2015-01-16 13:31:27.000000000","message":"same as above","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"b3cc8e96b37cde665c2b7bc84a6b0c66b10f9a64","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            id).all()))"},{"line_number":170,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":171,"context_line":"                                                      self.ctx, \"alive_host\"))"},{"line_number":172,"context_line":"        self.assertEqual(1, len(self.ctx.session.query(agentschedulers_db."},{"line_number":173,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":174,"context_line":"            id).all()))"},{"line_number":175,"context_line":"        self.assertEqual(0, len(self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_9b94de44","line":172,"in_reply_to":"3a961159_a0bc306d","updated":"2015-01-19 08:45:55.000000000","message":"Done","commit_id":"5cb577a3464b8dfa37e1a0c5f214fc704c3afaec"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c26833ee2d9a4277bbdc9e42bf268d557edea055","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            else:"},{"line_number":122,"context_line":"                return dead_agent"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":125,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":126,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":127,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_56444a49","line":124,"updated":"2015-01-26 22:13:55.000000000","message":"Our hacking rules do not allow line continuations [1].  You should wrap\n\nplugin.get_dhcp_agents_hosting_networks.side_effect \u003d (\n    _fake_get_dhcp_agents_hosting_networks\n)\n\n[1] http://docs.openstack.org/developer/hacking/","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"d5069e3d158e7dfcfea6394777b0ba630319c409","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            else:"},{"line_number":122,"context_line":"                return dead_agent"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":125,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":126,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":127,"context_line":"        self.assertFalse(scheduler.schedule(plugin, self.ctx, network))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_ff4d029b","line":124,"in_reply_to":"1a930d6b_56444a49","updated":"2015-01-27 02:50:52.000000000","message":"Done","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c26833ee2d9a4277bbdc9e42bf268d557edea055","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                return dead_agent"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":146,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":147,"context_line":"        result \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":148,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_56e0ca28","line":145,"updated":"2015-01-26 22:13:55.000000000","message":"same as above","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"d5069e3d158e7dfcfea6394777b0ba630319c409","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                return dead_agent"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d \\"},{"line_number":146,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":147,"context_line":"        result \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":148,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_1f51ee35","line":145,"in_reply_to":"1a930d6b_56e0ca28","updated":"2015-01-27 02:50:52.000000000","message":"Done","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c26833ee2d9a4277bbdc9e42bf268d557edea055","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":149,"context_line":"            id).all()"},{"line_number":150,"context_line":"        self.assertEqual(1, len(result))"},{"line_number":151,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":152,"context_line":"            self.ctx, \"alive_host\"))"},{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_76e5c607","line":151,"updated":"2015-01-26 22:13:55.000000000","message":"This needs to reformatted better:\n\nself.assertTrue(\n    scheduler.auto_schedule_networks(\n        plugin,\n        self.ctx,\n        \"alive_host\"\n    )\n)","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"d5069e3d158e7dfcfea6394777b0ba630319c409","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":149,"context_line":"            id).all()"},{"line_number":150,"context_line":"        self.assertEqual(1, len(result))"},{"line_number":151,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":152,"context_line":"            self.ctx, \"alive_host\"))"},{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_5f47f676","line":151,"in_reply_to":"1a930d6b_76e5c607","updated":"2015-01-27 02:50:52.000000000","message":"Done","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c26833ee2d9a4277bbdc9e42bf268d557edea055","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.assertEqual(1, len(result))"},{"line_number":151,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":152,"context_line":"            self.ctx, \"alive_host\"))"},{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":155,"context_line":"            id).all()"},{"line_number":156,"context_line":"        result_alive_agent \u003d self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_d6bd9ad9","line":153,"updated":"2015-01-26 22:13:55.000000000","message":"This needs to be reformatted better see example in line 156.","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"d5069e3d158e7dfcfea6394777b0ba630319c409","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.assertEqual(1, len(result))"},{"line_number":151,"context_line":"        self.assertTrue(scheduler.auto_schedule_networks(plugin,"},{"line_number":152,"context_line":"            self.ctx, \"alive_host\"))"},{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":155,"context_line":"            id).all()"},{"line_number":156,"context_line":"        result_alive_agent \u003d self.ctx.session.query(agentschedulers_db."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_9f5cfe4c","line":153,"in_reply_to":"1a930d6b_d6bd9ad9","updated":"2015-01-27 02:50:52.000000000","message":"Done","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c26833ee2d9a4277bbdc9e42bf268d557edea055","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":155,"context_line":"            id).all()"},{"line_number":156,"context_line":"        result_alive_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":157,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003dalive_agent[0]."},{"line_number":158,"context_line":"            id).all()"},{"line_number":159,"context_line":"        self.assertEqual(1, len(result_dead_agent))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_f63d3690","line":156,"updated":"2015-01-26 22:13:55.000000000","message":"This needs to be formatted better:\n\nresult_dead_agent \u003d self.ctx.session.query(\n    agentschedulers_db.NetworkDhcpAgentBinding\n).filter_by(dhcp_agent_id\u003ddead_agent[0].id).all()","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"d5069e3d158e7dfcfea6394777b0ba630319c409","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        result_dead_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":154,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":155,"context_line":"            id).all()"},{"line_number":156,"context_line":"        result_alive_agent \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":157,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003dalive_agent[0]."},{"line_number":158,"context_line":"            id).all()"},{"line_number":159,"context_line":"        self.assertEqual(1, len(result_dead_agent))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a930d6b_bf57fa24","line":156,"in_reply_to":"1a930d6b_f63d3690","updated":"2015-01-27 02:50:52.000000000","message":"Done","commit_id":"f308923c74e6e74dd9707d59dbb5557c0b0f6a9f"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"584659e181c2f1ded8fe85b2df704e7d4dafdd01","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":116,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        def _fake_get_dhcp_agents_hosting_networks(*args, **kargs):"},{"line_number":119,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":120,"context_line":"                return []"},{"line_number":121,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_498876e7","line":118,"updated":"2015-01-29 15:59:49.000000000","message":"no need to redefine this method here and at line 140","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"935cbf42fde654a2e6adbd127c56a42a942551a4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":116,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        def _fake_get_dhcp_agents_hosting_networks(*args, **kargs):"},{"line_number":119,"context_line":"            if kargs.get(\u0027active\u0027):"},{"line_number":120,"context_line":"                return []"},{"line_number":121,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_4ea2239a","line":118,"in_reply_to":"fa81d914_498876e7","updated":"2015-01-30 04:08:20.000000000","message":"I tried once. Maybe there is a way to put this method outside, which I do not know yet.","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"584659e181c2f1ded8fe85b2df704e7d4dafdd01","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":147,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":148,"context_line":"        )"},{"line_number":149,"context_line":"        result \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":150,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":151,"context_line":"            id).all()"},{"line_number":152,"context_line":"        self.assertEqual(1, len(result))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_64c55f8d","line":149,"updated":"2015-01-29 15:59:49.000000000","message":"consider renaming result -\u003e network_assigned_to_dead_agent","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"935cbf42fde654a2e6adbd127c56a42a942551a4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":147,"context_line":"            _fake_get_dhcp_agents_hosting_networks"},{"line_number":148,"context_line":"        )"},{"line_number":149,"context_line":"        result \u003d self.ctx.session.query(agentschedulers_db."},{"line_number":150,"context_line":"            NetworkDhcpAgentBinding).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":151,"context_line":"            id).all()"},{"line_number":152,"context_line":"        self.assertEqual(1, len(result))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_4f1f7d08","line":149,"in_reply_to":"fa81d914_64c55f8d","updated":"2015-01-30 04:08:20.000000000","message":"Done","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"584659e181c2f1ded8fe85b2df704e7d4dafdd01","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                \"alive_host\""},{"line_number":158,"context_line":"            )"},{"line_number":159,"context_line":"        )"},{"line_number":160,"context_line":"        result_dead_agent \u003d self.ctx.session.query("},{"line_number":161,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":162,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":163,"context_line":"            id).all()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_e44eaf6e","line":160,"updated":"2015-01-29 15:59:49.000000000","message":"consider renaming  result_dead_agent -\u003e network_assigned_dead_agent","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"935cbf42fde654a2e6adbd127c56a42a942551a4","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                \"alive_host\""},{"line_number":158,"context_line":"            )"},{"line_number":159,"context_line":"        )"},{"line_number":160,"context_line":"        result_dead_agent \u003d self.ctx.session.query("},{"line_number":161,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":162,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":163,"context_line":"            id).all()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_2f224952","line":160,"in_reply_to":"fa81d914_e44eaf6e","updated":"2015-01-30 04:08:20.000000000","message":"Will fix this to network_assigned_to_dead_agent. If I get you mean wrong, please correct me.","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"584659e181c2f1ded8fe85b2df704e7d4dafdd01","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":162,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":163,"context_line":"            id).all()"},{"line_number":164,"context_line":"        result_alive_agent \u003d self.ctx.session.query("},{"line_number":165,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":166,"context_line":"        ).filter_by(dhcp_agent_id\u003dalive_agent[0].id).all()"},{"line_number":167,"context_line":"        self.assertEqual(1, len(result_dead_agent))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_a463d7da","line":164,"updated":"2015-01-29 15:59:49.000000000","message":"consider renaming result_alive_agent -\u003e network_assigned_alive_agent","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"935cbf42fde654a2e6adbd127c56a42a942551a4","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":162,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0]."},{"line_number":163,"context_line":"            id).all()"},{"line_number":164,"context_line":"        result_alive_agent \u003d self.ctx.session.query("},{"line_number":165,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":166,"context_line":"        ).filter_by(dhcp_agent_id\u003dalive_agent[0].id).all()"},{"line_number":167,"context_line":"        self.assertEqual(1, len(result_dead_agent))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa81d914_6f18c11e","line":164,"in_reply_to":"fa81d914_a463d7da","updated":"2015-01-30 04:08:20.000000000","message":"Same as above.","commit_id":"dbe9179b72350991d43ac4d2f8dd6e1a5bd28095"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"204c763f93e62f2fdb5e3b76f099c562c7b68ac5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            self.assertEqual(1, fake_log.call_count)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _fake_get_dhcp_agents_hosting_networks(self, dead_agent, *args,"},{"line_number":108,"context_line":"                                               **kargs):"},{"line_number":109,"context_line":"        if kargs.get(\u0027active\u0027):"},{"line_number":110,"context_line":"            return []"},{"line_number":111,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_e433f3a8","line":108,"range":{"start_line":108,"start_character":49,"end_line":108,"end_character":54},"updated":"2015-01-30 06:16:49.000000000","message":"kwargs is a more usual name","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"5e148c705f74cfdc09592fb51248046559d702f4","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            self.assertEqual(1, fake_log.call_count)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _fake_get_dhcp_agents_hosting_networks(self, dead_agent, *args,"},{"line_number":108,"context_line":"                                               **kargs):"},{"line_number":109,"context_line":"        if kargs.get(\u0027active\u0027):"},{"line_number":110,"context_line":"            return []"},{"line_number":111,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_f76ba7ee","line":108,"in_reply_to":"fa81d914_e433f3a8","updated":"2015-01-30 07:04:09.000000000","message":"I will follow by the comment of Henry Gessau. And there will not be a kargs in the new patch set. However, thank you for telling this.","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"605dc0f24cc1ec89eb7af695a9274a2f572a65a1","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":124,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":125,"context_line":"            self._fake_get_dhcp_agents_hosting_networks(dead_agent)"},{"line_number":126,"context_line":"        )"},{"line_number":127,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":128,"context_line":"        self.assertFalse("},{"line_number":129,"context_line":"            scheduler.schedule("}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_9750abd5","line":126,"updated":"2015-01-30 06:32:23.000000000","message":"Since you are calling the fake here and not providing args or kargs, this is the same as:\n\n  plugin.get_dhcp_agents_hosting_networks.side_effect \u003d dead_agent\n\nNow dead_agent is a list, but when you provide a list as a side_effect, mock returns the elements of the list one at a time for each call to the side_effect.\n\nInstead you want the side effect to be a function that is called by the code under test. Replace the method at line 107 with:\n\n    @staticmethod\n    def fake_get_dead_agents_function(dead_agents):\n        def fake_get_dhcp_agents_hosting_networks(ctx, net_ids, active\u003dNone):\n            return [] if active else dead_agents\n        return fake_get_dhcp_agents_hosting_networks","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"5e148c705f74cfdc09592fb51248046559d702f4","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":124,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":125,"context_line":"            self._fake_get_dhcp_agents_hosting_networks(dead_agent)"},{"line_number":126,"context_line":"        )"},{"line_number":127,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"},{"line_number":128,"context_line":"        self.assertFalse("},{"line_number":129,"context_line":"            scheduler.schedule("}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_977c2bb7","line":126,"in_reply_to":"fa81d914_9750abd5","updated":"2015-01-30 07:04:09.000000000","message":"Thank you very much for your help.","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"d4585f291ffc602b34bc2b6f2c82b87cecf8acff","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":144,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":145,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":146,"context_line":"            self._fake_get_dhcp_agents_hosting_networks(dead_agent)"},{"line_number":147,"context_line":"        )"},{"line_number":148,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_ba84b65e","line":145,"updated":"2015-01-30 07:29:14.000000000","message":"Since both the test cases have the common code (the first 9 statements), I think the code can be re-factored and moved to a common helper function.","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"204c763f93e62f2fdb5e3b76f099c562c7b68ac5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":144,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":145,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":146,"context_line":"            self._fake_get_dhcp_agents_hosting_networks(dead_agent)"},{"line_number":147,"context_line":"        )"},{"line_number":148,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":149,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_a4ed7bb9","line":146,"updated":"2015-01-30 06:16:49.000000000","message":"_fake_get_dhcp_agents_hosting_networks is evaluated at this point.\nis it what you intended?","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"5e148c705f74cfdc09592fb51248046559d702f4","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":144,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":145,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":146,"context_line":"            self._fake_get_dhcp_agents_hosting_networks(dead_agent)"},{"line_number":147,"context_line":"        )"},{"line_number":148,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":149,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa81d914_3727ffcb","line":146,"in_reply_to":"fa81d914_a4ed7bb9","updated":"2015-01-30 07:04:09.000000000","message":"Yes, I tried to move _fake_get_dhcp_agents_hosting_networks outside the method, but failed.","commit_id":"0cc9e98d20ef6eef57c72899bf0362d8953177e1"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"63b220ed1d08a759995288bb0b2733b79ff77705","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            self.fake_get_dead_agents_function(dead_agent)"},{"line_number":142,"context_line":"        )"},{"line_number":143,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":144,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":145,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0].id).all()"},{"line_number":146,"context_line":"        self.assertEqual(1, len(network_assigned_to_dead_agent))"},{"line_number":147,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":18,"id":"fa81d914_3afb66c2","line":144,"updated":"2015-01-30 07:23:31.000000000","message":"agentschedulers_db -\u003e sched_db\n155, 158 too.\n\nthis is why jenkins pep8 and UT failed.\n\nmaybe you should rebase your working set.","commit_id":"7d7f5aa9912577030d315b2d0f140bb39ad4d2a8"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"bb5b1ffe24d6cd420748da89544e764a75029fa4","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            self.fake_get_dead_agents_function(dead_agent)"},{"line_number":142,"context_line":"        )"},{"line_number":143,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":144,"context_line":"            agentschedulers_db.NetworkDhcpAgentBinding"},{"line_number":145,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0].id).all()"},{"line_number":146,"context_line":"        self.assertEqual(1, len(network_assigned_to_dead_agent))"},{"line_number":147,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":18,"id":"fa81d914_daa88a8f","line":144,"in_reply_to":"fa81d914_3afb66c2","updated":"2015-01-30 07:32:40.000000000","message":"I did a rebase, but did not notice that. Thanks a lot.","commit_id":"7d7f5aa9912577030d315b2d0f140bb39ad4d2a8"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"ed377de50ec13a33bcb8a0404bf76fdd66103307","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            self._test_schedule_bind_network(agents, self.network_id)"},{"line_number":107,"context_line":"            self.assertEqual(1, fake_log.call_count)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _commen_call_for_on_dead_agent_tests(self):"},{"line_number":110,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":111,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":112,"context_line":"        self._save_agents(dead_agent + alive_agent)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa81d914_8bc6c266","line":109,"updated":"2015-01-30 09:28:24.000000000","message":"nit: suggestion - consider renaming the function to \"_get_agents_and_scheduler_for_dead_agent_tests\" or something more clearer, If you happen to upload another patch.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdf08363c54ce295c50240f856c2aa813eda8021","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            self._test_schedule_bind_network(agents, self.network_id)"},{"line_number":107,"context_line":"            self.assertEqual(1, fake_log.call_count)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _commen_call_for_on_dead_agent_tests(self):"},{"line_number":110,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":111,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":112,"context_line":"        self._save_agents(dead_agent + alive_agent)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_8f871e61","line":109,"in_reply_to":"fa81d914_45dcab46","updated":"2015-02-02 01:01:15.000000000","message":"Hello, Numan Siddique.\ncc: Akihiro Motoki\n\nYour naming sense is great. I would like to take this advice and upload another patch.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e57e3c98b46efcb452211a427a1618b1086e6e0b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            self._test_schedule_bind_network(agents, self.network_id)"},{"line_number":107,"context_line":"            self.assertEqual(1, fake_log.call_count)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _commen_call_for_on_dead_agent_tests(self):"},{"line_number":110,"context_line":"        dead_agent \u003d self._get_agents([\u0027dead_host\u0027])"},{"line_number":111,"context_line":"        alive_agent \u003d self._get_agents([\u0027alive_host\u0027])"},{"line_number":112,"context_line":"        self._save_agents(dead_agent + alive_agent)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa81d914_45dcab46","line":109,"in_reply_to":"fa81d914_8bc6c266","updated":"2015-01-30 16:14:39.000000000","message":"+1\n\nAt least there is a type: commen -\u003e common","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e57e3c98b46efcb452211a427a1618b1086e6e0b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            self._commen_call_for_on_dead_agent_tests()"},{"line_number":120,"context_line":"        )"},{"line_number":121,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"},{"line_number":122,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":123,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":124,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":125,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("}],"source_content_type":"text/x-python","patch_set":19,"id":"fa81d914_c5e5fb38","line":122,"updated":"2015-01-30 16:14:39.000000000","message":"Is MagicMock() required? Mock() is not sufficient?","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdf08363c54ce295c50240f856c2aa813eda8021","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            self._commen_call_for_on_dead_agent_tests()"},{"line_number":120,"context_line":"        )"},{"line_number":121,"context_line":"        network \u003d {\u0027id\u0027: self.network_id}"},{"line_number":122,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":123,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":124,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":125,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_8ff39e72","line":122,"in_reply_to":"fa81d914_c5e5fb38","updated":"2015-02-02 01:01:15.000000000","message":"Hello, Akihiro Motoki.\n\nI used MagicMock just because other tests in the same module used it. But Mock works and is light. So I would like to take your advice.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c701c5228173240fdeb146405a1bc7d083acd5d6","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":123,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":124,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":125,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":126,"context_line":"            self.fake_get_dead_agents_function(dead_agent)"},{"line_number":127,"context_line":"        )"},{"line_number":128,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa81d914_4fe76cac","line":125,"updated":"2015-01-30 15:43:09.000000000","message":"why not simply:\n\nplugin.get_dhcp_agents_hosting_networks.return_value \u003d [dead_agent]\n\nsame for the other occurrences. \n\nside_effect is used when you want to change the return value for subsequent calls or when you want the mock method to throw an exception. It seems you use the method fake_get_dead_agents_function only to return the dead agent, I think you don\u0027t need it.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdf08363c54ce295c50240f856c2aa813eda8021","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":123,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":124,"context_line":"                                            \"enable_dhcp\": True}]"},{"line_number":125,"context_line":"        plugin.get_dhcp_agents_hosting_networks.side_effect \u003d ("},{"line_number":126,"context_line":"            self.fake_get_dead_agents_function(dead_agent)"},{"line_number":127,"context_line":"        )"},{"line_number":128,"context_line":"        plugin.get_agents_db.return_value \u003d dead_agent + alive_agent"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_2f20f2f6","line":125,"in_reply_to":"fa81d914_4fe76cac","updated":"2015-02-02 01:01:15.000000000","message":"Hello, Rossella Sblendido. \n\nI tried not to use any mock in the test which I know now it is impossible and lack of common sense. Since you and more than one another reviewer suggested me about this. I would like to take this. Thanks for your advice.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e57e3c98b46efcb452211a427a1618b1086e6e0b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":148,"context_line":"            sched_db.NetworkDhcpAgentBinding"},{"line_number":149,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0].id).all()"},{"line_number":150,"context_line":"        self.assertEqual(1, len(network_assigned_to_dead_agent))"},{"line_number":151,"context_line":"        self.assertTrue("},{"line_number":152,"context_line":"            scheduler.auto_schedule_networks("}],"source_content_type":"text/x-python","patch_set":19,"id":"fa81d914_8574e368","line":149,"updated":"2015-01-30 16:14:39.000000000","message":"This kind of query is used several time. It is better to make it a common method.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"cdf08363c54ce295c50240f856c2aa813eda8021","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":"        network_assigned_to_dead_agent \u003d self.ctx.session.query("},{"line_number":148,"context_line":"            sched_db.NetworkDhcpAgentBinding"},{"line_number":149,"context_line":"        ).filter_by(dhcp_agent_id\u003ddead_agent[0].id).all()"},{"line_number":150,"context_line":"        self.assertEqual(1, len(network_assigned_to_dead_agent))"},{"line_number":151,"context_line":"        self.assertTrue("},{"line_number":152,"context_line":"            scheduler.auto_schedule_networks("}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_4f7446fd","line":149,"in_reply_to":"fa81d914_8574e368","updated":"2015-02-02 01:01:15.000000000","message":"Thanks for this advice, Akihiro Motoki.\n\nComming in the next patch set.","commit_id":"3af48f19aef75b87272eb712ff9f30a6afed76b6"}]}
