)]}'
{"neutron/tests/functional/agent/test_dhcp_agent_scheduler.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class DHCPSchedulerTestScheduleNetwork("},{"line_number":36,"context_line":"    test_dhcp_scheduler.DHCPSchedulerBaseTestCase,"},{"line_number":37,"context_line":"        agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"        agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"        common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_708ee87a","line":37,"updated":"2014-12-10 23:18:34.000000000","message":"These base classes should line up.","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class DHCPSchedulerTestScheduleNetwork("},{"line_number":36,"context_line":"    test_dhcp_scheduler.DHCPSchedulerBaseTestCase,"},{"line_number":37,"context_line":"        agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"        agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"        common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_5c7662d8","line":37,"in_reply_to":"3a961159_708ee87a","updated":"2014-12-11 05:21:00.000000000","message":"Done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                             len(returned_scheduled_agents),"},{"line_number":125,"context_line":"                             len(hosted_agents[\u0027agents\u0027]))"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            self.assertIsNone(returned_scheduled_agents)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks("}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_f03f3885","line":127,"updated":"2014-12-10 23:18:34.000000000","message":"I still don\u0027t understand the purpose of this assertion.  The only value for scheduled_agents that will reach here is \u0027None\u0027.","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                             len(returned_scheduled_agents),"},{"line_number":125,"context_line":"                             len(hosted_agents[\u0027agents\u0027]))"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            self.assertIsNone(returned_scheduled_agents)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks("}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_3c27d6cb","line":127,"in_reply_to":"3a961159_f03f3885","updated":"2014-12-11 05:21:00.000000000","message":"scheduler.schedule can return two possible values\n 1. list of scheduled agents\n 2. None if the network was not scheduled to any agents.\n\nI am trying to test (2)","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                       network"},{"line_number":149,"context_line":"        expected_return  --\u003e Expected return value of \u0027auto_schedule_networks\u0027"},{"line_number":150,"context_line":"        expected_scheduled --\u003e This stores the list of expected networks"},{"line_number":151,"context_line":"                               (as a boolean) for each dhcp agent should have"},{"line_number":152,"context_line":"                               scheduled (or it could have already scheduled)"},{"line_number":153,"context_line":"                               after the \u0027auto_schedule_networks\u0027 function is"},{"line_number":154,"context_line":"                               called."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_705348e2","line":151,"updated":"2014-12-10 23:18:34.000000000","message":"should have scheduled -\u003e should have been scheduled","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                       network"},{"line_number":149,"context_line":"        expected_return  --\u003e Expected return value of \u0027auto_schedule_networks\u0027"},{"line_number":150,"context_line":"        expected_scheduled --\u003e This stores the list of expected networks"},{"line_number":151,"context_line":"                               (as a boolean) for each dhcp agent should have"},{"line_number":152,"context_line":"                               scheduled (or it could have already scheduled)"},{"line_number":153,"context_line":"                               after the \u0027auto_schedule_networks\u0027 function is"},{"line_number":154,"context_line":"                               called."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_1c713ae0","line":151,"in_reply_to":"3a961159_705348e2","updated":"2014-12-11 05:21:00.000000000","message":"Done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        # pre schedule the networks to the agents defined in"},{"line_number":246,"context_line":"        # self.networks_already_scheduled before calling auto_schedule_network"},{"line_number":247,"context_line":"        for i, net_agents in enumerate(self.networks_already_scheduled):"},{"line_number":248,"context_line":"            if net_agents:"},{"line_number":249,"context_line":"                agents \u003d [dhcp_agents[agent_no] for agent_no in net_agents]"},{"line_number":250,"context_line":"                scheduler._schedule_bind_network(self.ctx, agents,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_1013e40d","line":247,"updated":"2014-12-10 23:18:34.000000000","message":"(No action required) This could be simplified by pre-filtering the list, e.g.\n\nvalid_agents \u003d (x for x in self.networks_already_scheduled if x)\nfor i, net_agents in enumerate(valid_agents):\n  ...","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        # pre schedule the networks to the agents defined in"},{"line_number":246,"context_line":"        # self.networks_already_scheduled before calling auto_schedule_network"},{"line_number":247,"context_line":"        for i, net_agents in enumerate(self.networks_already_scheduled):"},{"line_number":248,"context_line":"            if net_agents:"},{"line_number":249,"context_line":"                agents \u003d [dhcp_agents[agent_no] for agent_no in net_agents]"},{"line_number":250,"context_line":"                scheduler._schedule_bind_network(self.ctx, agents,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_7c56be2b","line":247,"in_reply_to":"3a961159_1013e40d","updated":"2014-12-11 05:21:00.000000000","message":"done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"dd2504ae3eef3eeb6be169f892790588f5bb388c","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                             len(returned_scheduled_agents),"},{"line_number":124,"context_line":"                             len(hosted_agents[\u0027agents\u0027]))"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            self.assertIsNone(returned_scheduled_agents)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class DhcpSchedulerTestAutoSchedule(test_dhcp_sch.DhcpSchedulerBaseTestCase,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_6cdb4c4f","line":126,"updated":"2014-12-12 00:16:24.000000000","message":"(No action required) I guess you\u0027re trying to ensure that an empty list is never returned from schedule(), which doesn\u0027t seem very important to me, but I\u0027ll stop bugging you about it.","commit_id":"40e58f9c4b7afa4f153349f0ceeb2528400f0dfd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"dd2504ae3eef3eeb6be169f892790588f5bb388c","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                       network"},{"line_number":147,"context_line":"        expected_return  --\u003e Expected return value of \u0027auto_schedule_networks\u0027"},{"line_number":148,"context_line":"        expected_scheduled --\u003e This stores the list of expected networks"},{"line_number":149,"context_line":"                               (as a boolean) for each dhcp agent should have"},{"line_number":150,"context_line":"                               been scheduled (or it could have already"},{"line_number":151,"context_line":"                               scheduled) after the \u0027auto_schedule_networks\u0027"},{"line_number":152,"context_line":"                               function is called."}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_ec001cad","line":149,"updated":"2014-12-12 00:16:24.000000000","message":"Sorry for missing this the first time:\n\nagent should -\u003e agent that should","commit_id":"40e58f9c4b7afa4f153349f0ceeb2528400f0dfd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"dd2504ae3eef3eeb6be169f892790588f5bb388c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        expected_return  --\u003e Expected return value of \u0027auto_schedule_networks\u0027"},{"line_number":148,"context_line":"        expected_scheduled --\u003e This stores the list of expected networks"},{"line_number":149,"context_line":"                               (as a boolean) for each dhcp agent should have"},{"line_number":150,"context_line":"                               been scheduled (or it could have already"},{"line_number":151,"context_line":"                               scheduled) after the \u0027auto_schedule_networks\u0027"},{"line_number":152,"context_line":"                               function is called."},{"line_number":153,"context_line":"                               Each item in the list corresponds to a dhcp"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_0cfe48ae","line":150,"updated":"2014-12-12 00:16:24.000000000","message":"or it -\u003e or that","commit_id":"40e58f9c4b7afa4f153349f0ceeb2528400f0dfd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"dd2504ae3eef3eeb6be169f892790588f5bb388c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        expected_scheduled --\u003e This stores the list of expected networks"},{"line_number":149,"context_line":"                               (as a boolean) for each dhcp agent should have"},{"line_number":150,"context_line":"                               been scheduled (or it could have already"},{"line_number":151,"context_line":"                               scheduled) after the \u0027auto_schedule_networks\u0027"},{"line_number":152,"context_line":"                               function is called."},{"line_number":153,"context_line":"                               Each item in the list corresponds to a dhcp"},{"line_number":154,"context_line":"                               agent."}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_2c2ea443","line":151,"updated":"2014-12-12 00:16:24.000000000","message":"scheduled -\u003e been scheduled","commit_id":"40e58f9c4b7afa4f153349f0ceeb2528400f0dfd"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"f35fb4fcc22882fa86f81aa5c38c2963ddb8d615","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # create dhcp agents"},{"line_number":102,"context_line":"        hosts \u003d [\u0027host-%s\u0027 % i for i in range(self.dhcp_agents)]"},{"line_number":103,"context_line":"        dhcp_agents \u003d self._create_and_set_agents_down("},{"line_number":104,"context_line":"            hosts, down_agent_count\u003dself.agents_down)"},{"line_number":105,"context_line":"        active_agents \u003d list(dhcp_agents[self.agents_down:])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # schedule some agents before calling schedule"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_95aaff82","line":104,"updated":"2014-12-15 05:08:37.000000000","message":"newline to make method call more readable.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"93659ded3dc1a05f5f602c7be322954f9e1b1f1d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # create dhcp agents"},{"line_number":102,"context_line":"        hosts \u003d [\u0027host-%s\u0027 % i for i in range(self.dhcp_agents)]"},{"line_number":103,"context_line":"        dhcp_agents \u003d self._create_and_set_agents_down("},{"line_number":104,"context_line":"            hosts, down_agent_count\u003dself.agents_down)"},{"line_number":105,"context_line":"        active_agents \u003d list(dhcp_agents[self.agents_down:])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # schedule some agents before calling schedule"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_6e34e4fb","line":104,"in_reply_to":"3a961159_95aaff82","updated":"2014-12-15 08:32:19.000000000","message":"done","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"f35fb4fcc22882fa86f81aa5c38c2963ddb8d615","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        hosts \u003d [\u0027host-%s\u0027 % i for i in range(self.dhcp_agents)]"},{"line_number":103,"context_line":"        dhcp_agents \u003d self._create_and_set_agents_down("},{"line_number":104,"context_line":"            hosts, down_agent_count\u003dself.agents_down)"},{"line_number":105,"context_line":"        active_agents \u003d list(dhcp_agents[self.agents_down:])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # schedule some agents before calling schedule"},{"line_number":108,"context_line":"        if self.agents_already_scheduled:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_b5ad3b9d","line":105,"updated":"2014-12-15 05:08:37.000000000","message":"slice operator produces a list.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"93659ded3dc1a05f5f602c7be322954f9e1b1f1d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        hosts \u003d [\u0027host-%s\u0027 % i for i in range(self.dhcp_agents)]"},{"line_number":103,"context_line":"        dhcp_agents \u003d self._create_and_set_agents_down("},{"line_number":104,"context_line":"            hosts, down_agent_count\u003dself.agents_down)"},{"line_number":105,"context_line":"        active_agents \u003d list(dhcp_agents[self.agents_down:])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # schedule some agents before calling schedule"},{"line_number":108,"context_line":"        if self.agents_already_scheduled:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_8e3750fe","line":105,"in_reply_to":"3a961159_b5ad3b9d","updated":"2014-12-15 08:32:19.000000000","message":"done","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"f35fb4fcc22882fa86f81aa5c38c2963ddb8d615","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        # schedule some agents before calling schedule"},{"line_number":108,"context_line":"        if self.agents_already_scheduled:"},{"line_number":109,"context_line":"            # schedule the network"},{"line_number":110,"context_line":"            schedule_agents \u003d list("},{"line_number":111,"context_line":"                active_agents[:self.agents_already_scheduled])"},{"line_number":112,"context_line":"            scheduler._schedule_bind_network(self.ctx, schedule_agents,"},{"line_number":113,"context_line":"                                             self.network_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_d5972746","line":110,"updated":"2014-12-15 05:08:37.000000000","message":"active agents is already a list, so not need to wrap the slice.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"93659ded3dc1a05f5f602c7be322954f9e1b1f1d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        # schedule some agents before calling schedule"},{"line_number":108,"context_line":"        if self.agents_already_scheduled:"},{"line_number":109,"context_line":"            # schedule the network"},{"line_number":110,"context_line":"            schedule_agents \u003d list("},{"line_number":111,"context_line":"                active_agents[:self.agents_already_scheduled])"},{"line_number":112,"context_line":"            scheduler._schedule_bind_network(self.ctx, schedule_agents,"},{"line_number":113,"context_line":"                                             self.network_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_ae3a4ce4","line":110,"in_reply_to":"3a961159_d5972746","updated":"2014-12-15 08:32:19.000000000","message":"done","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"f35fb4fcc22882fa86f81aa5c38c2963ddb8d615","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                            networks\u003d2,"},{"line_number":174,"context_line":"                            networks_already_scheduled\u003d[[0], [1]],"},{"line_number":175,"context_line":"                            expected_return\u003dTrue,"},{"line_number":176,"context_line":"                            expected_scheduled\u003d[[True, False],"},{"line_number":177,"context_line":"                                                [False, True]])),"},{"line_number":178,"context_line":"        (\u0027scenario_4\u0027, dict(dhcp_agents\u003d2,"},{"line_number":179,"context_line":"                            agents_per_network\u003d3,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_d5a567a2","line":176,"updated":"2014-12-15 05:08:37.000000000","message":"what is this scenario supposed be to testing?  Almost impossible to determine.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"93659ded3dc1a05f5f602c7be322954f9e1b1f1d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                            networks\u003d2,"},{"line_number":174,"context_line":"                            networks_already_scheduled\u003d[[0], [1]],"},{"line_number":175,"context_line":"                            expected_return\u003dTrue,"},{"line_number":176,"context_line":"                            expected_scheduled\u003d[[True, False],"},{"line_number":177,"context_line":"                                                [False, True]])),"},{"line_number":178,"context_line":"        (\u0027scenario_4\u0027, dict(dhcp_agents\u003d2,"},{"line_number":179,"context_line":"                            agents_per_network\u003d3,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_ee60d402","line":176,"in_reply_to":"3a961159_d5a567a2","updated":"2014-12-15 08:32:19.000000000","message":"I have added comments for each scenario. Please look in the next patch.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c36588be8cfd55deca311d904b74cce31b4124ff","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    scenarios \u003d ["},{"line_number":159,"context_line":"        # In this scenario, network 0 is not scheduled on agent 0."},{"line_number":160,"context_line":"        # when auto_schedule_networks(agent 0) is called, it should"},{"line_number":161,"context_line":"        # schedule network 0."},{"line_number":162,"context_line":"        (\u0027scenario_1\u0027, dict(dhcp_agents\u003d1,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_1d7d34b2","line":159,"updated":"2014-12-16 01:28:24.000000000","message":"While I appreciate the effort you\u0027ve put into exhaustively commenting as to what is going on in each scenario, it would be preferable to concisely document your intent rather than providing so much detail.  I suspect that would be more in keeping with what Mark was asking for, but he\u0027ll have to confirm.\n\nAnother option would be to find a way to make the scenario as definitions self-documenting as possible (\u0027code + comments\u0027 \u003c \u0027self-documenting code\u0027, from the perspective of maintainability).","commit_id":"d5a2679f650ce55c7324ab7b68eaa52917445376"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"d233608eb9edd706007fed0e131246a447bf9e8b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    scenarios \u003d ["},{"line_number":159,"context_line":"        # In this scenario, network 0 is not scheduled on agent 0."},{"line_number":160,"context_line":"        # when auto_schedule_networks(agent 0) is called, it should"},{"line_number":161,"context_line":"        # schedule network 0."},{"line_number":162,"context_line":"        (\u0027scenario_1\u0027, dict(dhcp_agents\u003d1,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_7e354ff6","line":159,"in_reply_to":"3a961159_1d7d34b2","updated":"2014-12-16 03:27:12.000000000","message":"I agree with you and the philosophy of self documenting code.\nI couldn\u0027t find a way to name the scenarios with self explaining names.\nI will upload another patch with little or no comments after hearing from Mark about his thoughts.","commit_id":"d5a2679f650ce55c7324ab7b68eaa52917445376"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8db18907de629f9f2f56bfb047e396607398a98c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                               Each item is a list of len(num_networks)"},{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    scenarios \u003d ["},{"line_number":159,"context_line":"        (\u0027scenario_1\u0027, dict(dhcp_agents\u003d1,"},{"line_number":160,"context_line":"                            agents_per_network\u003d1,"},{"line_number":161,"context_line":"                            networks\u003d1,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_ee123857","line":158,"updated":"2014-12-17 13:31:33.000000000","message":"Could documentation be as simple as briefly indicating the test objective in the first tuple member, instead of scenario_1,2,3,...?\n\nor...\n\n    def ensure_net0_scheduled_on_agent():\n        return dict(dhcp_agents\u003d1,\n                    agents_per_network\u003d1,\n                    ...)\n\n    scenarios \u003d [\n        (\u0027scenario_1\u0027, ensure_net0_scheduled_on_agent()),\n        ...]\n\nA docstring on the method could describe complex scenarios.","commit_id":"e897948bb969a03c5caf98085c38c7edc37e2f99"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"01ab9556006102329d327df02079cac4d6623daa","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_23fbfc7b","line":1,"updated":"2015-01-16 00:39:09.000000000","message":"Please update the year to 2015.\n\nAlso, the path for this change is more properly functional/scheduler/.  The agent path is for code that interacts directly with the system.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_44b54717","line":1,"in_reply_to":"3a961159_23fbfc7b","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":24,"context_line":"from neutron.tests.unit import test_dhcp_scheduler as test_dhcp_sch"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# the below code is required for the following reason"},{"line_number":27,"context_line":"# (as documented in testscenarios)"},{"line_number":28,"context_line":"\"\"\"Multiply tests depending on their \u0027scenarios\u0027 attribute."},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_88776f3a","line":26,"updated":"2015-01-16 00:15:21.000000000","message":"Please replace this commentary and docstring with this simple boilerplate: \n\n# Required to generate tests from scenarios.  Not compatible with nose.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":24,"context_line":"from neutron.tests.unit import test_dhcp_scheduler as test_dhcp_sch"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# the below code is required for the following reason"},{"line_number":27,"context_line":"# (as documented in testscenarios)"},{"line_number":28,"context_line":"\"\"\"Multiply tests depending on their \u0027scenarios\u0027 attribute."},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c911525d","line":26,"in_reply_to":"3a961159_88776f3a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":33,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class DhcpSchedulerTestScheduleNetwork(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_686de331","line":36,"updated":"2015-01-16 00:15:21.000000000","message":"DhcpSchedulerTestScheduleNetwork -\u003e TestScheduleNetwork\n\nThe names of test classes should always begin with Test.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class DhcpSchedulerTestScheduleNetwork(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_0907da1d","line":36,"in_reply_to":"3a961159_686de331","updated":"2015-01-17 09:58:18.000000000","message":"done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":36,"context_line":"class DhcpSchedulerTestScheduleNetwork(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_ddee978a","line":39,"updated":"2015-01-16 00:15:21.000000000","message":"This is hard to read.  I\u0027d suggest either aligning all the explanation blocks or putting them on separate lines, e.g.\n\n dhcp_agents              ...\n agents_per_network       ...\n\nor \n \n dhcp_agents\n   ...\n   \n agents_per_network\n   ...\n\nThe same comment applies to all class docstrings added in this patch.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"class DhcpSchedulerTestScheduleNetwork(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_2902d60b","line":39,"in_reply_to":"3a961159_ddee978a","updated":"2015-01-17 09:58:18.000000000","message":"Done. Followed the 2 approach","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_fdf1936a","line":40,"updated":"2015-01-16 00:15:21.000000000","message":"dhcp_agents -\u003e agent_count\n\nwhich is also... -\u003e (also...)","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":38,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_64ffa301","line":40,"in_reply_to":"3a961159_fdf1936a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_4809072a","line":42,"updated":"2015-01-16 00:15:21.000000000","message":"agents_per_network -\u003e max_agents_per_network","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                       common_db_mixin.CommonDbMixin):"},{"line_number":40,"context_line":"    \"\"\"Test various scenarios for ChanceScheduler.schedule."},{"line_number":41,"context_line":"        dhcp_agents  --\u003e number of dhcp agents which is also number of"},{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_8402cf06","line":42,"in_reply_to":"3a961159_4809072a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_fd98b31c","line":45,"updated":"2015-01-16 00:15:21.000000000","message":"agents_already_scheduled -\u003e scheduled_agent_count\n\nnetwork is -\u003e network has previously","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                             hosts"},{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a4050b11","line":45,"in_reply_to":"3a961159_fd98b31c","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_1d9c9f0d","line":46,"updated":"2015-01-16 00:15:21.000000000","message":"before.... -\u003e (remove)","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":44,"context_line":"                               a network."},{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c4085729","line":46,"in_reply_to":"3a961159_1d9c9f0d","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"},{"line_number":50,"context_line":"                             should return"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c8141743","line":48,"updated":"2015-01-16 00:15:21.000000000","message":"agents_down -\u003e down_agent_count","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        agents_already_scheduled --\u003e number of agents the network is"},{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"},{"line_number":50,"context_line":"                             should return"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e412b356","line":48,"in_reply_to":"3a961159_c8141743","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"},{"line_number":50,"context_line":"                             should return"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_4820279a","line":49,"updated":"2015-01-16 00:15:21.000000000","message":"expected_scheduled_agent_count\n\nMake sure to document what a value of \u0027None\u0027 means.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                                     scheduled before calling the schedule"},{"line_number":47,"context_line":"                                     function."},{"line_number":48,"context_line":"        agents_down  --\u003e Number of dhcp agents which are down"},{"line_number":49,"context_line":"        scheduled_agents --\u003e number of scheduled agents the \u0027schedule\u0027 function"},{"line_number":50,"context_line":"                             should return"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_040edf31","line":49,"in_reply_to":"3a961159_4820279a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    scenarios \u003d ["},{"line_number":55,"context_line":"        (\u0027No dhcp agents\u0027, dict(dhcp_agents\u003d0,"},{"line_number":56,"context_line":"                                agents_per_network\u003d1,"},{"line_number":57,"context_line":"                                agents_already_scheduled\u003d0,"},{"line_number":58,"context_line":"                                agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_bd170b9c","line":55,"updated":"2015-01-16 00:15:21.000000000","message":"(No action required) Consider putting the dict on a new line for all the scenarios (for consistency).","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    scenarios \u003d ["},{"line_number":55,"context_line":"        (\u0027No dhcp agents\u0027, dict(dhcp_agents\u003d0,"},{"line_number":56,"context_line":"                                agents_per_network\u003d1,"},{"line_number":57,"context_line":"                                agents_already_scheduled\u003d0,"},{"line_number":58,"context_line":"                                agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_24191b7a","line":55,"in_reply_to":"3a961159_bd170b9c","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                 scheduled_agents\u003dNone)),"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        (\u0027Single agent - network not yet scheduled\u0027,"},{"line_number":74,"context_line":"            dict(dhcp_agents\u003d1,"},{"line_number":75,"context_line":"                 agents_per_network\u003d1,"},{"line_number":76,"context_line":"                 agents_already_scheduled\u003d0,"},{"line_number":77,"context_line":"                 agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_dd2bf7e8","line":74,"updated":"2015-01-16 00:15:21.000000000","message":"PEP8 - if the line of an opening parenthesis is not otherwise empty, align subsequent lines to the opening parenthesis.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                 scheduled_agents\u003dNone)),"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        (\u0027Single agent - network not yet scheduled\u0027,"},{"line_number":74,"context_line":"            dict(dhcp_agents\u003d1,"},{"line_number":75,"context_line":"                 agents_per_network\u003d1,"},{"line_number":76,"context_line":"                 agents_already_scheduled\u003d0,"},{"line_number":77,"context_line":"                 agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_44146740","line":74,"in_reply_to":"3a961159_dd2bf7e8","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                 agents_down\u003d0,"},{"line_number":85,"context_line":"                 scheduled_agents\u003d2)),"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        (\u0027Multiple agents per network with 2 agents already scheduled\u0027,"},{"line_number":88,"context_line":"            dict(dhcp_agents\u003d3,"},{"line_number":89,"context_line":"                 agents_per_network\u003d3,"},{"line_number":90,"context_line":"                 agents_already_scheduled\u003d2,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e8ee338a","line":87,"updated":"2015-01-16 00:15:21.000000000","message":"This scenario doesn\u0027t add value over the one above - please remove.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                 scheduled_agents\u003d2)),"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        (\u0027Multiple agents per network with 2 agents already scheduled\u0027,"},{"line_number":88,"context_line":"            dict(dhcp_agents\u003d3,"},{"line_number":89,"context_line":"                 agents_per_network\u003d3,"},{"line_number":90,"context_line":"                 agents_already_scheduled\u003d2,"},{"line_number":91,"context_line":"                 agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_6426c3bb","line":88,"updated":"2015-01-17 09:58:18.000000000","message":"Done. removed","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                 scheduled_agents\u003d1)),"},{"line_number":100,"context_line":"    ]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def setUp(self):"},{"line_number":103,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":104,"context_line":"        if not hasattr(self, \u0027dhcp_agents\u0027):"},{"line_number":105,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a8a98b7d","line":102,"updated":"2015-01-16 00:15:21.000000000","message":"You can remove this this manual fixup for nosetests.  I\u0027ve updated TESTING.rst to point to nose2 as I didn\u0027t think it was wise to have to add code everywhere in support of nose.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                 scheduled_agents\u003d1)),"},{"line_number":100,"context_line":"    ]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def setUp(self):"},{"line_number":103,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":104,"context_line":"        if not hasattr(self, \u0027dhcp_agents\u0027):"},{"line_number":105,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a41c2b67","line":102,"in_reply_to":"3a961159_a8a98b7d","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            self.assertIsNone(returned_scheduled_agents)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class DhcpSchedulerTestAutoSchedule(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":141,"context_line":"                                    agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":142,"context_line":"                                    agents_db.AgentDbMixin,"},{"line_number":143,"context_line":"                                    common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c88a57bb","line":140,"updated":"2015-01-16 00:15:21.000000000","message":"DhcpSchedulerTestAutoSchedule -\u003e  TestAutoScheduleNetwork","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            self.assertIsNone(returned_scheduled_agents)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class DhcpSchedulerTestAutoSchedule(test_dhcp_sch.DhcpSchedulerBaseTestCase,"},{"line_number":141,"context_line":"                                    agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":142,"context_line":"                                    agents_db.AgentDbMixin,"},{"line_number":143,"context_line":"                                    common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_24303be8","line":140,"in_reply_to":"3a961159_c88a57bb","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        --------------------------------------------------------"},{"line_number":148,"context_line":"        dhcp_agents  --\u003e number of DHCP agents (which is also number of"},{"line_number":149,"context_line":"                             hosts)."},{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_bd262bc9","line":150,"updated":"2015-01-16 00:15:21.000000000","message":"agents_per_network -\u003e max_agents_per_network","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        --------------------------------------------------------"},{"line_number":148,"context_line":"        dhcp_agents  --\u003e number of DHCP agents (which is also number of"},{"line_number":149,"context_line":"                             hosts)."},{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_442b877b","line":150,"in_reply_to":"3a961159_bd262bc9","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                             hosts)."},{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_bd8aabb9","line":152,"updated":"2015-01-16 00:15:21.000000000","message":"networks -\u003e network_count","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                             hosts)."},{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_644de371","line":152,"in_reply_to":"3a961159_bd8aabb9","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_5d0c6742","line":153,"updated":"2015-01-16 00:15:21.000000000","message":"dhcp_disabled_networks -\u003e networks_with_dhcp_disabled","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        agents_per_network --\u003e Maximum  DHCP Agents that can be scheduled for"},{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_84500f0b","line":153,"in_reply_to":"3a961159_5d0c6742","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"},{"line_number":157,"context_line":"                                                \u0027auto_schedule_networks\u0027."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_fd4d139a","line":154,"updated":"2015-01-16 00:15:21.000000000","message":"agents_pre_hosting_networks -\u003e hosted_networks\n\nThis stores the -\u003e A mapping of agent id to the ids of the networks that they should be initially hosting.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                               a network."},{"line_number":152,"context_line":"        networks    --\u003e Number of networks."},{"line_number":153,"context_line":"        dhcp_disabled_networks --\u003e List of networks with dhcp disabled"},{"line_number":154,"context_line":"        agents_pre_hosting_networks --\u003e This stores the pre hosted networks by"},{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"},{"line_number":157,"context_line":"                                                \u0027auto_schedule_networks\u0027."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a4534b14","line":154,"in_reply_to":"3a961159_fd4d139a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"},{"line_number":157,"context_line":"                                                \u0027auto_schedule_networks\u0027."},{"line_number":158,"context_line":"        expected_agents_hosting_networks --\u003e This stores the expected networks"},{"line_number":159,"context_line":"                                             that should have been scheduled"},{"line_number":160,"context_line":"                                             (or that could have already"},{"line_number":161,"context_line":"                                             been scheduled) for each agent"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a85eeb10","line":158,"updated":"2015-01-16 00:15:21.000000000","message":"expected_agents_hosting_networks -\u003e expected_hosted_networks","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                                        each agent if any."},{"line_number":156,"context_line":"        expected_auto_schedule_return_value  --\u003e Expected return value of"},{"line_number":157,"context_line":"                                                \u0027auto_schedule_networks\u0027."},{"line_number":158,"context_line":"        expected_agents_hosting_networks --\u003e This stores the expected networks"},{"line_number":159,"context_line":"                                             that should have been scheduled"},{"line_number":160,"context_line":"                                             (or that could have already"},{"line_number":161,"context_line":"                                             been scheduled) for each agent"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e440f336","line":158,"in_reply_to":"3a961159_a85eeb10","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                                   \u0027agent-1\u0027: []})),"},{"line_number":274,"context_line":"    ]"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def setUp(self):"},{"line_number":277,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":278,"context_line":"        if not hasattr(self, \u0027dhcp_agents\u0027):"},{"line_number":279,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e8b633db","line":276,"updated":"2015-01-16 00:15:21.000000000","message":"Please remove","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                                   \u0027agent-1\u0027: []})),"},{"line_number":274,"context_line":"    ]"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def setUp(self):"},{"line_number":277,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":278,"context_line":"        if not hasattr(self, \u0027dhcp_agents\u0027):"},{"line_number":279,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_043c1fbe","line":276,"in_reply_to":"3a961159_e8b633db","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":297,"context_line":"        subnets \u003d []"},{"line_number":298,"context_line":"        for net_id in self._networks:"},{"line_number":299,"context_line":"            if self._strip_host_index(net_id) in self.dhcp_disabled_networks:"},{"line_number":300,"context_line":"                enable_dhcp \u003d False"},{"line_number":301,"context_line":"            else:"},{"line_number":302,"context_line":"                enable_dhcp \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_88c5af3e","line":299,"updated":"2015-01-16 00:15:21.000000000","message":"(No action required) \n\nenable_dhcp \u003d self._strip_host_index(net_id) in self.dhcp_disabled_networks","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":297,"context_line":"        subnets \u003d []"},{"line_number":298,"context_line":"        for net_id in self._networks:"},{"line_number":299,"context_line":"            if self._strip_host_index(net_id) in self.dhcp_disabled_networks:"},{"line_number":300,"context_line":"                enable_dhcp \u003d False"},{"line_number":301,"context_line":"            else:"},{"line_number":302,"context_line":"                enable_dhcp \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_24475b4d","line":299,"in_reply_to":"3a961159_88c5af3e","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"}],"neutron/tests/functional/scheduler/test_dhcp_agent_scheduler.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"243881af4a9a32040c42cd2d6777422c3842dc38","unresolved":false,"context_lines":[{"line_number":97,"context_line":"              expected_scheduled_agent_count\u003d1)),"},{"line_number":98,"context_line":"    ]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def setUp(self):"},{"line_number":101,"context_line":"        super(TestScheduleNetwork, self).setUp()"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_schedule_network(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_2a1616f3","line":100,"updated":"2015-01-20 05:26:41.000000000","message":"This method should be removed.","commit_id":"3097c9797a14413e00b75b319b22d90482cc7c97"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"243881af4a9a32040c42cd2d6777422c3842dc38","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            scheduler._schedule_bind_network(self.ctx, schedule_agents,"},{"line_number":119,"context_line":"                                             self.network_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        returned_scheduled_agents \u003d scheduler.schedule(self, self.ctx,"},{"line_number":122,"context_line":"                                                       self.network)"},{"line_number":123,"context_line":"        if self.expected_scheduled_agent_count:"},{"line_number":124,"context_line":"            self.assertEqual(self.expected_scheduled_agent_count,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_4a136201","line":121,"updated":"2015-01-20 05:26:41.000000000","message":"(No action required) returned_scheduled_agents -\u003e actual_scheduled_agents","commit_id":"3097c9797a14413e00b75b319b22d90482cc7c97"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"243881af4a9a32040c42cd2d6777422c3842dc38","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        \u0027agent-1\u0027: []})),"},{"line_number":274,"context_line":"    ]"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def setUp(self):"},{"line_number":277,"context_line":"        super(TestAutoSchedule, self).setUp()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def _strip_host_index(self, name):"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_6acf3e8c","line":276,"updated":"2015-01-20 05:26:41.000000000","message":"This method should be removed.","commit_id":"3097c9797a14413e00b75b319b22d90482cc7c97"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"6b4a8aba83bdffe97a1e75a437f11fcde8b14230","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        agent_count"},{"line_number":141,"context_line":"            number of DHCP agents (also number of hosts)."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"         max_agents_per_network"},{"line_number":144,"context_line":"             Maximum  DHCP Agents that can be scheduled for a network."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        network_count"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a961159_1f28b332","line":143,"updated":"2015-01-20 09:51:23.000000000","message":"Remove, please, one space before max_agents_per_network and on the next line too.","commit_id":"2ed06e07da6dd385e4b82ee04c88723a1555cc6b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fb4ea13ecdb183c92b9716533f17d5f6bf5af851","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        agent_count"},{"line_number":141,"context_line":"            number of DHCP agents (also number of hosts)."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"         max_agents_per_network"},{"line_number":144,"context_line":"             Maximum  DHCP Agents that can be scheduled for a network."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        network_count"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a961159_3fcd6f5f","line":143,"in_reply_to":"3a961159_1f28b332","updated":"2015-01-20 09:55:16.000000000","message":"Done","commit_id":"2ed06e07da6dd385e4b82ee04c88723a1555cc6b"}],"neutron/tests/unit/test_dhcp_scheduler.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":31,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class _DHCPSchedulerTestCase(testlib_api.SqlTestCase):"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def setUp(self):"},{"line_number":37,"context_line":"        super(_DHCPSchedulerTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_06440ab6","line":34,"updated":"2014-09-16 13:11:06.000000000","message":"DhcpSchedulerBaseTestCase?","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        scheduled_agents \u003d scheduler.schedule(self, self.ctx,"},{"line_number":260,"context_line":"                                              self.network)"},{"line_number":261,"context_line":"        if self.scheduled_agents:"},{"line_number":262,"context_line":"            self.assertEqual(len(scheduled_agents), self.scheduled_agents)"},{"line_number":263,"context_line":"            results \u003d ("},{"line_number":264,"context_line":"                self.ctx.session.query("},{"line_number":265,"context_line":"                    agentschedulers_db.NetworkDhcpAgentBinding)."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_4698d21b","line":262,"updated":"2014-09-16 13:11:06.000000000","message":"nit: arg ordering (expected, actual)","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                self.ctx.session.query("},{"line_number":265,"context_line":"                    agentschedulers_db.NetworkDhcpAgentBinding)."},{"line_number":266,"context_line":"                filter_by(network_id\u003dself.network_id).all())"},{"line_number":267,"context_line":"            self.assertEqual(len(results), len(scheduled_agents) +"},{"line_number":268,"context_line":"                             self.agents_already_scheduled)"},{"line_number":269,"context_line":"        else:"},{"line_number":270,"context_line":"            self.assertIsNone(scheduled_agents)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_669dd60a","line":267,"updated":"2014-09-16 13:11:06.000000000","message":"ditto","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        retval \u003d scheduler.auto_schedule_networks(self, self.ctx,"},{"line_number":397,"context_line":"                                                  hosts[host_index])"},{"line_number":398,"context_line":"        self.assertEqual(retval, self.expected_return)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        net_index \u003d 0"},{"line_number":401,"context_line":"        _agent_id \u003d dhcp_agents[host_index].id"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_26610e12","line":398,"updated":"2014-09-16 13:11:06.000000000","message":"ditto","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            else:"},{"line_number":411,"context_line":"                agent_found \u003d False"},{"line_number":412,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":413,"context_line":"            self.assertEqual(agent_found, expected_result)"},{"line_number":414,"context_line":"            net_index +\u003d 1"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_auto_schedule(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_8670fadd","line":413,"updated":"2014-09-16 13:11:06.000000000","message":"ditto","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"425fad2a8e505870eaeb1659447e4419d45d027d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"class DhcpSchedulerTestCase(_DHCPSchedulerBaseTestCase):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def setUp(self):"},{"line_number":71,"context_line":"        super(DhcpSchedulerTestCase, self).setUp()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _test_schedule_bind_network(self, agents, network_id):"},{"line_number":74,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_9b3afe96","line":71,"updated":"2014-09-17 05:13:28.000000000","message":"is this setUp method necessary?","commit_id":"636bb83eb0f23f4b8d58f1f121a100e3a6b3899d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e3b8f3317951401be297fc6915d819dad99baedb","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                                                [False, False, False, True]])),"},{"line_number":356,"context_line":"    ]"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":359,"context_line":"            subnets \u003d []"},{"line_number":360,"context_line":"            for net_id in self._networks:"},{"line_number":361,"context_line":"                subnets.append({\u0027network_id\u0027: net_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_96bf3360","line":358,"updated":"2014-09-17 06:33:43.000000000","message":"who uses this?","commit_id":"38bb729004c34807c3037df43d50f80b0272c979"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"c1052f247fc87879d0f4d3cbbea14e0570b41343","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                                                [False, False, False, True]])),"},{"line_number":356,"context_line":"    ]"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":359,"context_line":"            subnets \u003d []"},{"line_number":360,"context_line":"            for net_id in self._networks:"},{"line_number":361,"context_line":"                subnets.append({\u0027network_id\u0027: net_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_51c31557","line":358,"in_reply_to":"fa98f980_5146b550","updated":"2014-09-17 06:54:37.000000000","message":"i see.  thank you explanation.","commit_id":"38bb729004c34807c3037df43d50f80b0272c979"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8042a574f0aa0a665304cc5fd7814e9357ea672e","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                                                [False, False, False, True]])),"},{"line_number":356,"context_line":"    ]"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":359,"context_line":"            subnets \u003d []"},{"line_number":360,"context_line":"            for net_id in self._networks:"},{"line_number":361,"context_line":"                subnets.append({\u0027network_id\u0027: net_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_5146b550","line":358,"in_reply_to":"fa98f980_96bf3360","updated":"2014-09-17 06:41:51.000000000","message":"Please see this https://github.com/openstack/neutron/blob/master/neutron/scheduler/dhcp_agent_scheduler.py#L104\n\n\u0027auto_schedule_networks\u0027 function calls the plugin.get_subnets. In this test case, DHCPSchedulerTestAutoScheduleNetworks mocks the plugin class and hence mocking the get_subnets() function.","commit_id":"38bb729004c34807c3037df43d50f80b0272c979"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e3b8f3317951401be297fc6915d819dad99baedb","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            for net_id in self._networks:"},{"line_number":361,"context_line":"                subnets.append({\u0027network_id\u0027: net_id,"},{"line_number":362,"context_line":"                                \u0027enable_dhcp\u0027: True})"},{"line_number":363,"context_line":"            return subnets"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def _test_auto_schedule(self, host_index):"},{"line_number":366,"context_line":"        self.config(dhcp_agents_per_network\u003dself.agents_per_network)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_765e4f7b","line":363,"updated":"2014-09-17 06:33:43.000000000","message":"broken indentation?","commit_id":"38bb729004c34807c3037df43d50f80b0272c979"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8042a574f0aa0a665304cc5fd7814e9357ea672e","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            for net_id in self._networks:"},{"line_number":361,"context_line":"                subnets.append({\u0027network_id\u0027: net_id,"},{"line_number":362,"context_line":"                                \u0027enable_dhcp\u0027: True})"},{"line_number":363,"context_line":"            return subnets"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def _test_auto_schedule(self, host_index):"},{"line_number":366,"context_line":"        self.config(dhcp_agents_per_network\u003dself.agents_per_network)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_b17a8175","line":363,"in_reply_to":"fa98f980_765e4f7b","updated":"2014-09-17 06:41:51.000000000","message":"Oops. I dont know why flake8/pep8 didn\u0027t detect it.\nI will upload another patch a bit later after incorporating review comments if any","commit_id":"38bb729004c34807c3037df43d50f80b0272c979"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"83d1aa826385285e18c6a9d78a471283b043d30a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"import testscenarios"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_3494bc8b","line":16,"updated":"2014-09-17 09:17:02.000000000","message":"nit: insert line here to separate stdlib from 3rd party","commit_id":"e6f4e72c3d832ca54411132e8d9f02ade15a9df9"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6423ff39abe393356e6120c741c41cba1ef651f4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"import testscenarios"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_147178e0","line":16,"in_reply_to":"fa98f980_3494bc8b","updated":"2014-09-17 09:39:25.000000000","message":"Thanks for the review.\nI will upload another patch addressing your comment later today (also incorporating any other comments)","commit_id":"e6f4e72c3d832ca54411132e8d9f02ade15a9df9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9d96c0831c1f42a18820cb05f3bfc0cd05e07964","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import testscenarios"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.common import constants"},{"line_number":22,"context_line":"from neutron.common import topics"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_3df73fd6","line":19,"updated":"2014-09-17 11:21:29.000000000","message":"from testscenarios import load_tests_apply_scenarios as load_tests\n\nwouldn\u0027t be just enough?","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a5fd1f659afb803e199434a0731cce3c3d1c66f2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import testscenarios"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.common import constants"},{"line_number":22,"context_line":"from neutron.common import topics"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_53dcd618","line":19,"in_reply_to":"fa98f980_3caf377f","updated":"2014-09-18 11:00:15.000000000","message":"you can use \"# noqa\" comment to suppress the flake8 warning.\n(i have no preference either ways.  just FYI)","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"913b680949c0d46cda5e3368b3b17b02b51b50b2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import testscenarios"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.common import constants"},{"line_number":22,"context_line":"from neutron.common import topics"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_3caf377f","line":19,"in_reply_to":"fa98f980_3df73fd6","updated":"2014-09-17 18:09:34.000000000","message":"It works, but I get the below flake8 error\n F401 \u0027load_tests\u0027 imported but unused\n\nHence I prefer to keep \u0027import testscenarios\u0027\nPlease let me know if you have any suggestion to resolve this fake8 error","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9d96c0831c1f42a18820cb05f3bfc0cd05e07964","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":30,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_7d01c7ae","line":32,"updated":"2014-09-17 11:21:29.000000000","message":"ditto.","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9d96c0831c1f42a18820cb05f3bfc0cd05e07964","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"},{"line_number":144,"context_line":"                                                          self.ctx, \"host-a\"))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_auto_schedule_networks_agents_down(self):"},{"line_number":147,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":148,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":149,"context_line":"                                            \"enable_dhcp\": True}]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_3d949f8b","line":146,"updated":"2014-09-17 11:21:29.000000000","message":"If you set agent_down_time\u003d0, then , agent\u0027s aren\u0027t down, is the test name correct?","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"9f562038f46e9bb2d33937c6979826ce326651de","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.assertFalse(scheduler.auto_schedule_networks(plugin,"},{"line_number":144,"context_line":"                                                          self.ctx, \"host-a\"))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_auto_schedule_networks_agents_down(self):"},{"line_number":147,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":148,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":149,"context_line":"                                            \"enable_dhcp\": True}]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_bddb2f20","line":146,"in_reply_to":"fa98f980_3d949f8b","updated":"2014-09-17 11:33:55.000000000","message":"Thanks for the review.\nPlease see this https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L105\n\nI am setting the cfg.CONF.agent_down_time downtime to 0 seconds, so that function is_agent_down() returns true.\n\nThe default \"cfg.CONF.agent_down_time\" value is 75 seconds.","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9d96c0831c1f42a18820cb05f3bfc0cd05e07964","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # create dhcp agents"},{"line_number":238,"context_line":"        hosts \u003d [\u0027host-\u0027 + str(i) for i in range(self.num_dhcp_agents)]"},{"line_number":239,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":240,"context_line":"        # bring down the specified agents"},{"line_number":241,"context_line":"        for i in range(self.agents_down):"},{"line_number":242,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_bd35efa9","line":239,"updated":"2014-09-17 11:21:29.000000000","message":"You could extend the previously suggested function with am optional argument:\n\nself._create_and_save_agents(host, down_agents\u003dself.agents_down) and move the next 8 lines inside.","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"50a4d296c9e3fd7b2c9e6e0dddac6ee381889af7","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                   for agent in hosted_agents):"},{"line_number":407,"context_line":"                agent_found \u003d True"},{"line_number":408,"context_line":"            else:"},{"line_number":409,"context_line":"                agent_found \u003d False"},{"line_number":410,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":411,"context_line":"            self.assertEqual(expected_result, agent_found)"},{"line_number":412,"context_line":"            net_index +\u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_1849a632","line":409,"updated":"2014-09-17 14:03:09.000000000","message":"agent_found \u003d any(...)\nwould be simpler.","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"69ccb1b080ba45e6115aea0a3677920397239a69","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                   for agent in hosted_agents):"},{"line_number":407,"context_line":"                agent_found \u003d True"},{"line_number":408,"context_line":"            else:"},{"line_number":409,"context_line":"                agent_found \u003d False"},{"line_number":410,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":411,"context_line":"            self.assertEqual(expected_result, agent_found)"},{"line_number":412,"context_line":"            net_index +\u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_f8b782f3","line":409,"in_reply_to":"fa98f980_1849a632","updated":"2014-09-17 14:09:02.000000000","message":"Agree. I will update it accordingly","commit_id":"a28b827848e52e57bcda230a3bdb4835451dbc46"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7bba37646282ab86a6e71fced1920703dfe1f48f","unresolved":false,"context_lines":[{"line_number":32,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(_DHCPSchedulerBaseTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_a4adca33","line":35,"updated":"2014-09-23 02:11:24.000000000","message":"Why does this start with an underscore? I haven\u0027t seen this convention for any other test bases.","commit_id":"250321ff5c4c6b11adb3fa3a852517e80e443016"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"70e4680b8c011cf9cb578e1fe1afaec4dfb214f4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(_DHCPSchedulerBaseTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_f004ec7f","line":35,"in_reply_to":"da9df570_a4adca33","updated":"2014-09-23 06:01:11.000000000","message":"I have seen _ being used in oslo.messaging.\nhttps://github.com/openstack/oslo.messaging/blob/master/tests/drivers/test_impl_qpid.py#L68\n\nI dont mind changing the name as per your suggestion.","commit_id":"250321ff5c4c6b11adb3fa3a852517e80e443016"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7bba37646282ab86a6e71fced1920703dfe1f48f","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                                        [1],"},{"line_number":345,"context_line":"                                                        [3]],"},{"line_number":346,"context_line":"                            expected_return\u003dTrue,"},{"line_number":347,"context_line":"                            expected_scheduled\u003d[[True, False, False, False],"},{"line_number":348,"context_line":"                                                [False, False, True, False],"},{"line_number":349,"context_line":"                                                [False, True, False, False],"},{"line_number":350,"context_line":"                                                [False, False, False, True]])),"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_c4aace18","line":347,"updated":"2014-09-23 02:11:24.000000000","message":"Maybe I\u0027m not familiar enough with the unit tests here yet, but these seem very difficult to undertstand. An unannotated boolean matrix will be hard to troubleshoot in a failure without lots of trial and error since the line number from an iteration isn\u0027t really enough to tell you which one failed. Or would the error be much better than a normal boolean assertion failure?","commit_id":"250321ff5c4c6b11adb3fa3a852517e80e443016"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"70e4680b8c011cf9cb578e1fe1afaec4dfb214f4","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                                        [1],"},{"line_number":345,"context_line":"                                                        [3]],"},{"line_number":346,"context_line":"                            expected_return\u003dTrue,"},{"line_number":347,"context_line":"                            expected_scheduled\u003d[[True, False, False, False],"},{"line_number":348,"context_line":"                                                [False, False, True, False],"},{"line_number":349,"context_line":"                                                [False, True, False, False],"},{"line_number":350,"context_line":"                                                [False, False, False, True]])),"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_f0794cfd","line":347,"in_reply_to":"da9df570_c4aace18","updated":"2014-09-23 06:01:11.000000000","message":"When the test case fails, it also shows which scenario it failed. \n\u0027host_index\u0027 parameter of _test_auto_schedule() maps to the index of the \u0027expected_scheduled\u0027. You want this to be printed ?","commit_id":"250321ff5c4c6b11adb3fa3a852517e80e443016"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"ea3024cb7329ad49e5699f248fe3dc91df9ad32f","unresolved":false,"context_lines":[{"line_number":398,"context_line":"            agent_found \u003d any(_agent_id \u003d\u003d agent.dhcp_agent_id"},{"line_number":399,"context_line":"                              for agent in hosted_agents)"},{"line_number":400,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":401,"context_line":"            self.assertEqual(expected_result, agent_found, message\u003dmsg)"},{"line_number":402,"context_line":"            net_index +\u003d 1"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def test_auto_schedule(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9df570_32ed8ef0","line":401,"updated":"2014-09-23 13:31:51.000000000","message":"message is not valid keyword argument for assertEqual.\n \nYou will have to either use \nself.assertEqual(expected, value, msg\u003d\"...\")\nor \nself.assertEqual(expected, value, \"...\")\n\nAlso since you are printing a message, better to give some meaningful description instead of simply printing host_index.","commit_id":"22727fec330443ff6e01e977c53edf08aecfdfe7"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"de0ce21b59cff9b34ec953eb1b4af966587e8714","unresolved":false,"context_lines":[{"line_number":398,"context_line":"            agent_found \u003d any(_agent_id \u003d\u003d agent.dhcp_agent_id"},{"line_number":399,"context_line":"                              for agent in hosted_agents)"},{"line_number":400,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":401,"context_line":"            self.assertEqual(expected_result, agent_found, message\u003dmsg)"},{"line_number":402,"context_line":"            net_index +\u003d 1"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def test_auto_schedule(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9df570_dd7c5323","line":401,"in_reply_to":"da9df570_32ed8ef0","updated":"2014-09-23 13:57:48.000000000","message":"Looks like we use /usr/local/lib/python2.7/dist-packages/testtools/testcase.py which has the signature of \"message\u003d\" and not https://docs.python.org/2/library/unittest.html which has the signature of \"msg\u003d\" as I thought.\n\nnit: In case there is a need to update your patch, please consider providing some description in your message.","commit_id":"22727fec330443ff6e01e977c53edf08aecfdfe7"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork("},{"line_number":179,"context_line":"    DHCPSchedulerBaseTestCase, agentschedulers_db.DhcpAgentSchedulerDbMixin,"},{"line_number":180,"context_line":"        agents_db.AgentDbMixin, common_db_mixin.CommonDbMixin):"},{"line_number":181,"context_line":"    \"\"\" Test various scenarios for ChanceScheduler.schedule."},{"line_number":182,"context_line":"        num_dhcp_agents  --\u003e number of dhcp agents which is also number of"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_93dd7b17","line":179,"updated":"2014-11-11 11:32:30.000000000","message":"nit: prefer to put them one a line","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        scheduler \u003d dhcp_agent_scheduler.ChanceScheduler()"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # create dhcp agents"},{"line_number":238,"context_line":"        hosts \u003d [\u0027host-\u0027 + str(i) for i in range(self.num_dhcp_agents)]"},{"line_number":239,"context_line":"        dhcp_agents \u003d self._create_and_save_agents("},{"line_number":240,"context_line":"            hosts, no_of_down_agents\u003dself.agents_down)"},{"line_number":241,"context_line":"        active_agents \u003d list(dhcp_agents[self.agents_down:])"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_53db131b","line":238,"updated":"2014-11-11 11:32:30.000000000","message":"nit: prefer\n  hosts \u003d [\u0027host-%s\u0027 % i for i in range(self.num_dhcp_agents)]","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks("},{"line_number":266,"context_line":"    DHCPSchedulerBaseTestCase, agentschedulers_db.DhcpAgentSchedulerDbMixin,"},{"line_number":267,"context_line":"        agents_db.AgentDbMixin, common_db_mixin.CommonDbMixin):"},{"line_number":268,"context_line":"    \"\"\" Test various scenarios for ChanceScheduler.auto_schedule_networks"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_d3fe236b","line":266,"updated":"2014-11-11 11:32:30.000000000","message":"same as above","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":351,"context_line":"    ]"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def get_subnets(self, context, fields\u003dNone):"},{"line_number":354,"context_line":"        subnets \u003d []"},{"line_number":355,"context_line":"        for net_id in self._networks:"},{"line_number":356,"context_line":"            subnets.append({\u0027network_id\u0027: net_id,"},{"line_number":357,"context_line":"                            \u0027enable_dhcp\u0027: True})"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_d30c6397","line":354,"updated":"2014-11-11 11:32:30.000000000","message":"may collapse 354-358 into:\n return [{\u0027network_id\u0027: net_id,\t\n            \u0027enable_dhcp\u0027: True} for net_id in self._networks]","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        dhcp_agents \u003d self._create_and_save_agents(hosts)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        # create networks"},{"line_number":371,"context_line":"        self._networks \u003d [str(host_index) + \u0027-network-\u0027 + str(i)"},{"line_number":372,"context_line":"                          for i in range(self.num_networks)]"},{"line_number":373,"context_line":"        self._save_networks(self._networks)"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_f33a3f35","line":371,"updated":"2014-11-11 11:32:30.000000000","message":"nit: prefer \n \u0027%s-network-%s\u0027 % (host_index, i)","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c71702744d3a18c8192e6e6d8222c7a5de86fa8d","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            net_agents \u003d self.networks_already_scheduled[net_index]"},{"line_number":379,"context_line":"            if not net_agents:"},{"line_number":380,"context_line":"                continue"},{"line_number":381,"context_line":"            _agents \u003d []"},{"line_number":382,"context_line":"            for agent_no in net_agents:"},{"line_number":383,"context_line":"                _agents.append(dhcp_agents[agent_no])"},{"line_number":384,"context_line":"            scheduler._schedule_bind_network(self.ctx, _agents,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_133fcb26","line":381,"updated":"2014-11-11 11:32:30.000000000","message":"why \u0027_agents\u0027 and not \u0027agents\u0027?","commit_id":"7696dbfd5299c28a1484b638b94c05dc78956269"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"abf3726ae1b66f5bc8adc326140e7f6e9ae31a9a","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork("},{"line_number":179,"context_line":"    DHCPSchedulerBaseTestCase,"},{"line_number":180,"context_line":"        agentschedulers_db.DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"        agents_db.AgentDbMixin,"},{"line_number":182,"context_line":"        common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_82b0be8c","line":179,"updated":"2014-11-11 15:16:52.000000000","message":"sorry for spotting this again, i mean this style of indentation:\n class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,\n                                        agentschedulers_db.DhcpAgentSchedulerDbMixin,\n                                        agents_db.AgentDbMixin,\n                                        ...\n\nhere and below","commit_id":"361828fab62b3636894a3159863db8d20b78642b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"1d961a6aef6b7b4da174652ee7e7ceb976f18063","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork("},{"line_number":179,"context_line":"    DHCPSchedulerBaseTestCase,"},{"line_number":180,"context_line":"        agentschedulers_db.DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"        agents_db.AgentDbMixin,"},{"line_number":182,"context_line":"        common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_45a0a043","line":179,"in_reply_to":"5a890539_82b0be8c","updated":"2014-11-11 15:45:17.000000000","message":"I tried this, but the second line \u0027agentschedulers_db.DhcpAgentSchedulerDbMixin\u0027 is going \u003e 80 chars.\n\nShall I do the below\nfrom neutron.db import agentschedulers_db as sched_db \nso that it can fit within 80 chars ?","commit_id":"361828fab62b3636894a3159863db8d20b78642b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"87e03302599f94dafed973b993078650afee4553","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":61,"context_line":"                self.ctx.session.add(agent)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _create_and_save_agents(self, hosts, no_of_down_agents\u003d0):"},{"line_number":64,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_6c78f7c4","line":63,"updated":"2014-11-13 00:58:36.000000000","message":"nit: probably renaming it would make more clear that the method also set no_of_down_agents down, how about _create_and_set_agents_down","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8e0b5b07e00c08cd1d0e73edff44b8d0bb349246","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":61,"context_line":"                self.ctx.session.add(agent)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _create_and_save_agents(self, hosts, no_of_down_agents\u003d0):"},{"line_number":64,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_57d73abf","line":63,"in_reply_to":"5a890539_6c78f7c4","updated":"2014-11-13 12:05:10.000000000","message":"Done. renamed it as per your suggestion.","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"87e03302599f94dafed973b993078650afee4553","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"},{"line_number":67,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"},{"line_number":68,"context_line":"            # just make it a year old"},{"line_number":69,"context_line":"            dhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d datetime.datetime("},{"line_number":70,"context_line":"                old_time.year - 1, old_time.month, old_time.day)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_ac82df91","line":67,"updated":"2014-11-13 00:58:36.000000000","message":"nit: I know it\u0027s a test but what if no_of_down_agents \u003e len(dhcp_agents) ? maybe a check should be added and an error raised in that case","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8e0b5b07e00c08cd1d0e73edff44b8d0bb349246","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"},{"line_number":67,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"},{"line_number":68,"context_line":"            # just make it a year old"},{"line_number":69,"context_line":"            dhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d datetime.datetime("},{"line_number":70,"context_line":"                old_time.year - 1, old_time.month, old_time.day)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_d79faab2","line":67,"in_reply_to":"5a890539_ac82df91","updated":"2014-11-13 12:05:10.000000000","message":"If no_of_down_agents \u003e len(dhcp_agents), there would be KeyError exception and I think that should be good enough to know why the test case failed.","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e40138032ca2b555cb2e963474604859d28adc4","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(0, len(results))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,"},{"line_number":179,"context_line":"                                       agentschedulers_db"},{"line_number":180,"context_line":"                                       .DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"                                       agents_db.AgentDbMixin,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_c2e9cb81","line":178,"updated":"2014-11-12 12:27:38.000000000","message":"Nit: I have to admit, it\u0027s easier for me to read when the dotted class name is not broken across lines. Maybe consider:\n\n    class DHCPSchedulerTestScheduleNetwork(\n        DHCPSchedulerBaseTestCase,\n        agentschedulers_db.DhcpAgentSchedulerDbMixin,\n        agents_db.AgentDbMixin,\n        common_db_mixin.CommonDbMixin):","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8e0b5b07e00c08cd1d0e73edff44b8d0bb349246","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(0, len(results))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,"},{"line_number":179,"context_line":"                                       agentschedulers_db"},{"line_number":180,"context_line":"                                       .DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"                                       agents_db.AgentDbMixin,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_b7c85e23","line":178,"in_reply_to":"5a890539_333bc29d","updated":"2014-11-13 12:05:10.000000000","message":"Done","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"83e1c09beb0328ad339f38a299d2f51d47e1b643","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(0, len(results))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,"},{"line_number":179,"context_line":"                                       agentschedulers_db"},{"line_number":180,"context_line":"                                       .DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"                                       agents_db.AgentDbMixin,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f30cdb44","line":178,"in_reply_to":"5a890539_c2e9cb81","updated":"2014-11-12 13:48:48.000000000","message":"unfortunately I\u0027ve recommended this kind of formatting.\nI think the compromise could be to do\n import agentschedulers_db as adb\nand just use shorter alias to make this fit 1 line","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"d9bb449a543699036ddf4010c9c24ad6c1a2bae9","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(0, len(results))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,"},{"line_number":179,"context_line":"                                       agentschedulers_db"},{"line_number":180,"context_line":"                                       .DhcpAgentSchedulerDbMixin,"},{"line_number":181,"context_line":"                                       agents_db.AgentDbMixin,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_333bc29d","line":178,"in_reply_to":"5a890539_f30cdb44","updated":"2014-11-12 13:56:21.000000000","message":"+1","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e40138032ca2b555cb2e963474604859d28adc4","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            self.assertIsNone(scheduled_agents)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks(DHCPSchedulerBaseTestCase,"},{"line_number":268,"context_line":"                                            agentschedulers_db"},{"line_number":269,"context_line":"                                            .DhcpAgentSchedulerDbMixin,"},{"line_number":270,"context_line":"                                            agents_db.AgentDbMixin,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_8296e3ee","line":267,"updated":"2014-11-12 12:27:38.000000000","message":"nit: ditto","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e40138032ca2b555cb2e963474604859d28adc4","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":365,"context_line":"        msg \u003d \u0027host_index \u003d %s\u0027 % host_index"},{"line_number":366,"context_line":"        # create dhcp agents"},{"line_number":367,"context_line":"        hosts \u003d [\u0027%s-host-%s\u0027 % (host_index, i)"},{"line_number":368,"context_line":"                 for i in range(self.num_dhcp_agents)]"},{"line_number":369,"context_line":"        dhcp_agents \u003d self._create_and_save_agents(hosts)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_a2359ff8","line":367,"updated":"2014-11-12 12:27:38.000000000","message":"With \u003e1 argument, it is better to use named formatters:\n\n    hosts \u003d [\u0027%(index)s-host-%(count)s\u0027 % {\u0027index\u0027: host_index, \u0027count\u0027: i}\n\nMaybe with better key names that what I used...","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"83e1c09beb0328ad339f38a299d2f51d47e1b643","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":365,"context_line":"        msg \u003d \u0027host_index \u003d %s\u0027 % host_index"},{"line_number":366,"context_line":"        # create dhcp agents"},{"line_number":367,"context_line":"        hosts \u003d [\u0027%s-host-%s\u0027 % (host_index, i)"},{"line_number":368,"context_line":"                 for i in range(self.num_dhcp_agents)]"},{"line_number":369,"context_line":"        dhcp_agents \u003d self._create_and_save_agents(hosts)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_b33c13e4","line":367,"in_reply_to":"5a890539_a2359ff8","updated":"2014-11-12 13:48:48.000000000","message":"i think for this specific purpose this is not needed and just create longer line","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"7245e015e1fb077f496b6f45be1b265728caef3e","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":365,"context_line":"        msg \u003d \u0027host_index \u003d %s\u0027 % host_index"},{"line_number":366,"context_line":"        # create dhcp agents"},{"line_number":367,"context_line":"        hosts \u003d [\u0027%s-host-%s\u0027 % (host_index, i)"},{"line_number":368,"context_line":"                 for i in range(self.num_dhcp_agents)]"},{"line_number":369,"context_line":"        dhcp_agents \u003d self._create_and_save_agents(hosts)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_fc710745","line":367,"in_reply_to":"5a890539_b33c13e4","updated":"2014-11-12 17:13:28.000000000","message":"enikanorov: agreed. it is actually simpler to read as-is in my opinion.","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"7245e015e1fb077f496b6f45be1b265728caef3e","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        net_index \u003d 0"},{"line_number":391,"context_line":"        agent_id \u003d dhcp_agents[host_index].id"},{"line_number":392,"context_line":"        for net_id in self._networks:"},{"line_number":393,"context_line":"            hosted_agents \u003d ("},{"line_number":394,"context_line":"                self.ctx.session.query("},{"line_number":395,"context_line":"                    agentschedulers_db.NetworkDhcpAgentBinding)."}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_4dd263d3","line":392,"updated":"2014-11-12 17:13:28.000000000","message":"You should probably just use:\n\n    for net_index, net_id in enumerate(self._networks):\n\ninstead of net_index \u003d 0/net_index+\u003d1.","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8e0b5b07e00c08cd1d0e73edff44b8d0bb349246","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        net_index \u003d 0"},{"line_number":391,"context_line":"        agent_id \u003d dhcp_agents[host_index].id"},{"line_number":392,"context_line":"        for net_id in self._networks:"},{"line_number":393,"context_line":"            hosted_agents \u003d ("},{"line_number":394,"context_line":"                self.ctx.session.query("},{"line_number":395,"context_line":"                    agentschedulers_db.NetworkDhcpAgentBinding)."}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_17d692c5","line":392,"in_reply_to":"5a890539_4dd263d3","updated":"2014-11-13 12:05:10.000000000","message":"Done","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"7245e015e1fb077f496b6f45be1b265728caef3e","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            agent_found \u003d any(agent_id \u003d\u003d agent.dhcp_agent_id"},{"line_number":398,"context_line":"                              for agent in hosted_agents)"},{"line_number":399,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":400,"context_line":"            self.assertEqual(expected_result, agent_found, message\u003dmsg)"},{"line_number":401,"context_line":"            net_index +\u003d 1"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def test_auto_schedule(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_e8013d07","line":400,"updated":"2014-11-12 17:13:28.000000000","message":"It might be worth it to put pass in something like:\n\n    msg + \u0027[%s]\u0027 % net_index\n\nto make it obvious what part actually failed.","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8e0b5b07e00c08cd1d0e73edff44b8d0bb349246","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            agent_found \u003d any(agent_id \u003d\u003d agent.dhcp_agent_id"},{"line_number":398,"context_line":"                              for agent in hosted_agents)"},{"line_number":399,"context_line":"            expected_result \u003d self.expected_scheduled[host_index][net_index]"},{"line_number":400,"context_line":"            self.assertEqual(expected_result, agent_found, message\u003dmsg)"},{"line_number":401,"context_line":"            net_index +\u003d 1"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def test_auto_schedule(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_37dc6ee4","line":400,"in_reply_to":"5a890539_e8013d07","updated":"2014-11-13 12:05:10.000000000","message":"Done","commit_id":"c228f04a6085ded032881a3f4d04647213c18d22"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":30,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_e8aa456f","line":32,"updated":"2014-12-09 01:22:06.000000000","message":"Please copy/paste the comment as to why this is necessary (test scenarios is still pretty new to most folks).","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    def _create_and_set_agents_down(self, hosts, no_of_down_agents\u003d0):"},{"line_number":64,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"},{"line_number":67,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"},{"line_number":68,"context_line":"            # just make it a year old"},{"line_number":69,"context_line":"            dhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d datetime.datetime("}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_88a3819d","line":66,"updated":"2014-12-09 01:22:06.000000000","message":"Consider iterating directly over the sequence rather than using an index variable, e.g.\n\nfor agent in dhcp_agents[:no_of_down_agents]:","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # bring down the specified agents"},{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"},{"line_number":67,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"},{"line_number":68,"context_line":"            # just make it a year old"},{"line_number":69,"context_line":"            dhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d datetime.datetime("},{"line_number":70,"context_line":"                old_time.year - 1, old_time.month, old_time.day)"},{"line_number":71,"context_line":"        self._save_agents(dhcp_agents)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_48def940","line":68,"updated":"2014-12-09 01:22:06.000000000","message":"Consider using a self-documenting variable instead of a comment , e.g.\n\nprevious_year \u003d datetime.datetime(old_time.year - 1, ...)\ndhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d previous_year","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        for i in range(no_of_down_agents):"},{"line_number":67,"context_line":"            old_time \u003d dhcp_agents[i][\u0027heartbeat_timestamp\u0027]"},{"line_number":68,"context_line":"            # just make it a year old"},{"line_number":69,"context_line":"            dhcp_agents[i][\u0027heartbeat_timestamp\u0027] \u003d datetime.datetime("},{"line_number":70,"context_line":"                old_time.year - 1, old_time.month, old_time.day)"},{"line_number":71,"context_line":"        self._save_agents(dhcp_agents)"},{"line_number":72,"context_line":"        return dhcp_agents"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_e8c5e55b","line":69,"updated":"2014-12-09 01:22:06.000000000","message":"(No action required) Consider using timedelta instead, e.g.\n\nold_time - datetime.timedelta(days\u003d365)","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            .all())"},{"line_number":140,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def test_auto_schedule_networks_dhcp_disabled(self):"},{"line_number":143,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        plugin.get_subnets.return_value \u003d [{\"network_id\": self.network_id,"},{"line_number":145,"context_line":"                                            \"enable_dhcp\": False}]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_e8e4053d","line":142,"updated":"2014-12-09 01:22:06.000000000","message":"These 3 test additions and the 2 existing tests would appear to be largely common.  Consider refactoring (maybe using scenarios).","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(0, len(results))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DHCPSchedulerTestScheduleNetwork(DHCPSchedulerBaseTestCase,"},{"line_number":179,"context_line":"                                       agsch_db.DhcpAgentSchedulerDbMixin,"},{"line_number":180,"context_line":"                                       agents_db.AgentDbMixin,"},{"line_number":181,"context_line":"                                       common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_d7b0cfdf","line":178,"updated":"2014-12-09 01:22:06.000000000","message":"This test class and the one that follows do not belong in the unit test tree.  Please move to the functional tree to make this explicit (e.g. neutron/tests/functional).  It\u0027s ok to import from the unit test tree as necessary.","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    \"\"\""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    scenarios \u003d ["},{"line_number":197,"context_line":"        (\u0027scenario_1\u0027, dict(num_dhcp_agents\u003d0,"},{"line_number":198,"context_line":"                            agents_per_network\u003d1,"},{"line_number":199,"context_line":"                            agents_already_scheduled\u003d0,"},{"line_number":200,"context_line":"                            agents_down\u003d0,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_c86ca99f","line":197,"updated":"2014-12-09 01:22:06.000000000","message":"The naming convention is a bit confusing here.  All of the variables refer to a \u0027count\u0027 of agents, yet only the first has a \u0027num_\u0027 prefix.  Remove the prefix or add it to all?\n\nAlso, please ensure that the first scenario will execute with nosetests, as follows (we should probably get this into the base test class at some point):\n\n def setUp(self):\n  super(..)\n  if not hasattr(self, \u0027num_dhcp_agents\u0027):\n   self.__dict__.update(self.scenarios[0][1])","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        scheduled_agents \u003d scheduler.schedule(self, self.ctx,"},{"line_number":253,"context_line":"                                              self.network)"},{"line_number":254,"context_line":"        if self.scheduled_agents:"},{"line_number":255,"context_line":"            self.assertEqual(self.scheduled_agents, len(scheduled_agents))"},{"line_number":256,"context_line":"            results \u003d ("},{"line_number":257,"context_line":"                self.ctx.session.query("},{"line_number":258,"context_line":"                    agsch_db.NetworkDhcpAgentBinding)."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_ebeebfeb","line":255,"updated":"2014-12-09 01:22:06.000000000","message":"Please use self.list_dhcp_agents_hosting_network() to retrieve the list of scheduled agents.","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.assertEqual(self.agents_already_scheduled +"},{"line_number":261,"context_line":"                             len(scheduled_agents), len(results))"},{"line_number":262,"context_line":"        else:"},{"line_number":263,"context_line":"            self.assertIsNone(scheduled_agents)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks(DHCPSchedulerBaseTestCase,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_88262115","line":263,"updated":"2014-12-09 01:22:06.000000000","message":"Why is this check necessary?","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"1e11225ff4ac8d1b27a53cea84bf74a0caa9317b","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.assertEqual(self.agents_already_scheduled +"},{"line_number":261,"context_line":"                             len(scheduled_agents), len(results))"},{"line_number":262,"context_line":"        else:"},{"line_number":263,"context_line":"            self.assertIsNone(scheduled_agents)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"class DHCPSchedulerTestAutoScheduleNetworks(DHCPSchedulerBaseTestCase,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_31df263d","line":263,"in_reply_to":"3a961159_88262115","updated":"2014-12-10 07:08:44.000000000","message":"Yes it is required. For the scenarios 1, 2 and 3, scheduler.schedule is expected to return None and hence the check.\nIn the next patch i will rename the local variable \u0027scheduled_agents\u0027 so that there is no confusion between self.scheduled_agents and this local variable.","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # pre schedule the networks to the agents defined in"},{"line_number":375,"context_line":"        # self.networks_already_scheduled before calling auto_schedule_network"},{"line_number":376,"context_line":"        for net_index in range(len(self.networks_already_scheduled)):"},{"line_number":377,"context_line":"            net_agents \u003d self.networks_already_scheduled[net_index]"},{"line_number":378,"context_line":"            if not net_agents:"},{"line_number":379,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_6b5d6f21","line":376,"updated":"2014-12-09 01:22:06.000000000","message":"Please use \u0027enumerate\u0027:\n\nfor i, net_agents in enumerate(self.networks_already_scheduled):","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"403efb5d2bc5dddb4c0e9903e27bfa0d3b8164ec","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        agent_id \u003d dhcp_agents[host_index].id"},{"line_number":389,"context_line":"        for net_index, net_id in enumerate(self._networks):"},{"line_number":390,"context_line":"            hosted_agents \u003d ("},{"line_number":391,"context_line":"                self.ctx.session.query("},{"line_number":392,"context_line":"                    agsch_db.NetworkDhcpAgentBinding)."},{"line_number":393,"context_line":"                filter_by(network_id\u003dnet_id).all())"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_2bc0c74f","line":390,"updated":"2014-12-09 01:22:06.000000000","message":"Please use self.list_dhcp_agents_hosting_network() to retrieve the list of scheduled agents.","commit_id":"213307d8f14a79838579cbd06390278c4dffde04"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.common import topics"},{"line_number":25,"context_line":"from neutron import context"},{"line_number":26,"context_line":"from neutron.db import agents_db"},{"line_number":27,"context_line":"from neutron.db import agentschedulers_db as agsch_db"},{"line_number":28,"context_line":"from neutron.db import models_v2"},{"line_number":29,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":30,"context_line":"from neutron.tests.unit import testlib_api"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_65754cf9","line":27,"updated":"2014-12-10 23:18:34.000000000","message":"(No action required) Try to avoid obscure shortforms.  \u0027scheduler_db\u0027 might be a more reasonable name in this case.","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":39,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def setUp(self):"},{"line_number":45,"context_line":"        super(DHCPSchedulerBaseTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_45da10e9","line":42,"updated":"2014-12-10 23:18:34.000000000","message":"Please be consistent with respect to naming.  Acronyms are generally camel-cased rather than appearing in all-caps (e.g. SqlTestCase vs SQLTestCase).","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":39,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class DHCPSchedulerBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def setUp(self):"},{"line_number":45,"context_line":"        super(DHCPSchedulerBaseTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_dc96d23e","line":42,"in_reply_to":"3a961159_45da10e9","updated":"2014-12-11 05:21:00.000000000","message":"Done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":68,"context_line":"                self.ctx.session.add(agent)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_and_set_agents_down(self, hosts, no_of_down_agents\u003d0):"},{"line_number":71,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":72,"context_line":"        # bring down the specified agents"},{"line_number":73,"context_line":"        for agent in dhcp_agents[:no_of_down_agents]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_858eb8ce","line":70,"updated":"2014-12-10 23:18:34.000000000","message":"\u0027num\u0027 would be preferable to \u0027no\u0027 as an abreviation for \u0027number\u0027.  down_agent_count might be preferable, in any case.","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":68,"context_line":"                self.ctx.session.add(agent)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_and_set_agents_down(self, hosts, no_of_down_agents\u003d0):"},{"line_number":71,"context_line":"        dhcp_agents \u003d self._get_agents(hosts)"},{"line_number":72,"context_line":"        # bring down the specified agents"},{"line_number":73,"context_line":"        for agent in dhcp_agents[:no_of_down_agents]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_fc970e38","line":70,"in_reply_to":"3a961159_858eb8ce","updated":"2014-12-11 05:21:00.000000000","message":"Agree. Done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            if self.scheduled_already:"},{"line_number":172,"context_line":"                self._test_schedule_bind_network(agents, self.network_id)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        if self.network is False or self.enable_dhcp is False:"},{"line_number":175,"context_line":"            expected_auto_schedule_ret_value \u003d False"},{"line_number":176,"context_line":"            expected_hosting_dhcp_agents \u003d 0"},{"line_number":177,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_e50a1c78","line":174,"updated":"2014-12-10 23:18:34.000000000","message":"(No action required) code golf:\n\n expected_result \u003d (self.network and self.enable_dhcp)\n expected_hosted_agents \u003d 1 if expected_result else 0","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b941de960df30c7e08d0f20cbd6781061577b996","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            expected_hosting_dhcp_agents \u003d 0"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        observed_ret_value \u003d scheduler.auto_schedule_networks("},{"line_number":185,"context_line":"            plugin, self.ctx, \"host-a\" if not self.invalid_host else \"host-b\")"},{"line_number":186,"context_line":"        self.assertEqual(expected_auto_schedule_ret_value, observed_ret_value)"},{"line_number":187,"context_line":"        hosted_agents \u003d ("},{"line_number":188,"context_line":"            self.ctx.session.query(agsch_db.NetworkDhcpAgentBinding).all())"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_90b43436","line":185,"updated":"2014-12-10 23:18:34.000000000","message":"I would discourage the use of inline ternary operators.  I think readability would be enhanced by putting the statement on a separate line and using an appropriately named variable.","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"fdd740cbb0a53a6db1a6c92f0afc66723b42f8ea","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            expected_hosting_dhcp_agents \u003d 0"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        observed_ret_value \u003d scheduler.auto_schedule_networks("},{"line_number":185,"context_line":"            plugin, self.ctx, \"host-a\" if not self.invalid_host else \"host-b\")"},{"line_number":186,"context_line":"        self.assertEqual(expected_auto_schedule_ret_value, observed_ret_value)"},{"line_number":187,"context_line":"        hosted_agents \u003d ("},{"line_number":188,"context_line":"            self.ctx.session.query(agsch_db.NetworkDhcpAgentBinding).all())"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_fcae2e80","line":185,"in_reply_to":"3a961159_90b43436","updated":"2014-12-11 05:21:00.000000000","message":"Done","commit_id":"ae039ee4a4545ab35eee603d6c6c52acd854bc86"},{"author":{"_account_id":14039,"name":"watanabe isao","email":"watanabe.isao.openstack@gmail.com","username":"watanabe.isao"},"change_message_id":"204a9101ea72cedbeaf24ab4a12e11b2c2e8abd2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # bring down the specified agents"},{"line_number":73,"context_line":"        for agent in dhcp_agents[:down_agent_count]:"},{"line_number":74,"context_line":"            old_time \u003d agent[\u0027heartbeat_timestamp\u0027]"},{"line_number":75,"context_line":"            previous_year \u003d old_time - datetime.timedelta(days\u003d365)"},{"line_number":76,"context_line":"            agent[\u0027heartbeat_timestamp\u0027] \u003d previous_year"},{"line_number":77,"context_line":"        self._save_agents(dhcp_agents)"},{"line_number":78,"context_line":"        return dhcp_agents"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_6c5d0515","line":75,"updated":"2014-12-12 06:08:33.000000000","message":"\"_create_and_set_agents_down\" is good. And, in my work. I did the same thing to add the timedelta, before. But after that I found simply set \"admin_state_up\u003dFalse\" can do te same thing. See my code (138659), please.","commit_id":"6c1d8b0387090e1c9ef53df022a420d1382b900a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":30,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# the below code is required for the following reason"},{"line_number":33,"context_line":"# (as documented in testscenarios)"},{"line_number":34,"context_line":"\"\"\"Multiply tests depending on their \u0027scenarios\u0027 attribute."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e80553c2","line":32,"updated":"2015-01-16 00:15:21.000000000","message":"Please replace this commentary and docstring with this simple boilerplate: \n\n# Required to generate tests from scenarios.  Not compatible with nose.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.scheduler import dhcp_agent_scheduler"},{"line_number":30,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# the below code is required for the following reason"},{"line_number":33,"context_line":"# (as documented in testscenarios)"},{"line_number":34,"context_line":"\"\"\"Multiply tests depending on their \u0027scenarios\u0027 attribute."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c93a32e5","line":32,"in_reply_to":"3a961159_e80553c2","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        results \u003d ("},{"line_number":89,"context_line":"            self.ctx.session.query("},{"line_number":90,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding)."},{"line_number":91,"context_line":"            filter_by(network_id\u003dnetwork_id).all())"},{"line_number":92,"context_line":"        self.assertEqual(len(agents), len(results))"},{"line_number":93,"context_line":"        for result in results:"},{"line_number":94,"context_line":"            self.assertEqual(network_id, result.network_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_48266768","line":91,"updated":"2015-01-16 00:15:21.000000000","message":"This line line should be aligned with the line above","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        results \u003d ("},{"line_number":89,"context_line":"            self.ctx.session.query("},{"line_number":90,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding)."},{"line_number":91,"context_line":"            filter_by(network_id\u003dnetwork_id).all())"},{"line_number":92,"context_line":"        self.assertEqual(len(agents), len(results))"},{"line_number":93,"context_line":"        for result in results:"},{"line_number":94,"context_line":"            self.assertEqual(network_id, result.network_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_492642cc","line":91,"in_reply_to":"3a961159_48266768","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":115,"context_line":"class DhcpSchedulerTestAutoScheduleNetworks(DhcpSchedulerBaseTestCase):"},{"line_number":116,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    network --\u003e network is present or not"},{"line_number":119,"context_line":"    enable_dhcp --\u003e dhcp is enabled or disabled in the subnet of the network"},{"line_number":120,"context_line":"    scheduled_already --\u003e network is already scheduled to the agent or not"},{"line_number":121,"context_line":"    agent_down --\u003e dhcp agent is down or alive"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e8e9d31a","line":118,"updated":"2015-01-16 00:15:21.000000000","message":"network -\u003e network_present","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"class DhcpSchedulerTestAutoScheduleNetworks(DhcpSchedulerBaseTestCase):"},{"line_number":116,"context_line":"    \"\"\"Unit test scenarios for ChanceScheduler.auto_schedule_networks."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    network --\u003e network is present or not"},{"line_number":119,"context_line":"    enable_dhcp --\u003e dhcp is enabled or disabled in the subnet of the network"},{"line_number":120,"context_line":"    scheduled_already --\u003e network is already scheduled to the agent or not"},{"line_number":121,"context_line":"    agent_down --\u003e dhcp agent is down or alive"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_69185e84","line":118,"in_reply_to":"3a961159_e8e9d31a","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    enable_dhcp --\u003e dhcp is enabled or disabled in the subnet of the network"},{"line_number":120,"context_line":"    scheduled_already --\u003e network is already scheduled to the agent or not"},{"line_number":121,"context_line":"    agent_down --\u003e dhcp agent is down or alive"},{"line_number":122,"context_line":"    invalid_host --\u003e If true, then an invalid host is passed to schedule"},{"line_number":123,"context_line":"                     the network"},{"line_number":124,"context_line":"    \"\"\""},{"line_number":125,"context_line":"    scenarios \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_08ed3f25","line":122,"updated":"2015-01-16 00:15:21.000000000","message":"invalid_host -\u003e valid_host\n\nAll the use of invalid_host is with \u0027not\u0027, so reversing the meaning  will be simpler.","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    enable_dhcp --\u003e dhcp is enabled or disabled in the subnet of the network"},{"line_number":120,"context_line":"    scheduled_already --\u003e network is already scheduled to the agent or not"},{"line_number":121,"context_line":"    agent_down --\u003e dhcp agent is down or alive"},{"line_number":122,"context_line":"    invalid_host --\u003e If true, then an invalid host is passed to schedule"},{"line_number":123,"context_line":"                     the network"},{"line_number":124,"context_line":"    \"\"\""},{"line_number":125,"context_line":"    scenarios \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_891bca7e","line":122,"in_reply_to":"3a961159_08ed3f25","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1a338716bec5b306410ee6b0a2a93b211b3a415","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                              invalid_host\u003dTrue)),"},{"line_number":161,"context_line":"    ]"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def setUp(self):"},{"line_number":164,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":165,"context_line":"        if not hasattr(self, \u0027network\u0027):"},{"line_number":166,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_08a53fb4","line":163,"updated":"2015-01-16 00:15:21.000000000","message":"Please remove","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"62e4c6a07aa3061134ac970b7ff9e550ae0fc05e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                              invalid_host\u003dTrue)),"},{"line_number":161,"context_line":"    ]"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def setUp(self):"},{"line_number":164,"context_line":"        # ensure that the first scenario will execute with nosetests"},{"line_number":165,"context_line":"        if not hasattr(self, \u0027network\u0027):"},{"line_number":166,"context_line":"            self.__dict__.update(self.scenarios[0][1])"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a90ec63a","line":163,"in_reply_to":"3a961159_08a53fb4","updated":"2015-01-17 09:58:18.000000000","message":"Done","commit_id":"623e1bc86802eaad6224cd65f4c8d3e9b1e8e80b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"243881af4a9a32040c42cd2d6777422c3842dc38","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        else an invalid host is passed."},{"line_number":126,"context_line":"    \"\"\""},{"line_number":127,"context_line":"    scenarios \u003d ["},{"line_number":128,"context_line":"        (\u0027Network present\u0027, dict(network_present\u003dTrue,"},{"line_number":129,"context_line":"                                 enable_dhcp\u003dTrue,"},{"line_number":130,"context_line":"                                 scheduled_already\u003dFalse,"},{"line_number":131,"context_line":"                                 agent_down\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_6a5adef6","line":128,"updated":"2015-01-20 05:26:41.000000000","message":"Please put the dict on the next line from the scenario name for all scenarios so they are easier to read.","commit_id":"3097c9797a14413e00b75b319b22d90482cc7c97"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"243881af4a9a32040c42cd2d6777422c3842dc38","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                              valid_host\u003dFalse)),"},{"line_number":163,"context_line":"    ]"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def setUp(self):"},{"line_number":166,"context_line":"        super(TestAutoScheduleNetworks, self).setUp()"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_auto_schedule_network(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_4a4e023a","line":165,"updated":"2015-01-20 05:26:41.000000000","message":"This method should be removed.","commit_id":"3097c9797a14413e00b75b319b22d90482cc7c97"}],"test-requirements.txt":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34eb9c1980b139041a8ec2bb717deb6636a8efbb","unresolved":false,"context_lines":[{"line_number":10,"context_line":"sphinx\u003e\u003d1.1.2,!\u003d1.2.0,\u003c1.3"},{"line_number":11,"context_line":"oslosphinx\u003e\u003d2.2.0.0a2"},{"line_number":12,"context_line":"testrepository\u003e\u003d0.0.18"},{"line_number":13,"context_line":"testscenarios\u003e\u003d0.4"},{"line_number":14,"context_line":"testtools\u003e\u003d0.9.34"},{"line_number":15,"context_line":"WebTest\u003e\u003d2.0"}],"source_content_type":"text/plain","patch_set":2,"id":"fa98f980_c10d8c37","line":13,"updated":"2014-09-16 13:11:06.000000000","message":"Would be cleaner if this was done as a separate commit, in case this commit is ever reverted for some reason. Granted, the revert could exclude this change, but it starts to get messy.","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"a69fe4f39ebd41b5538c92bd52cc310465791018","unresolved":false,"context_lines":[{"line_number":10,"context_line":"sphinx\u003e\u003d1.1.2,!\u003d1.2.0,\u003c1.3"},{"line_number":11,"context_line":"oslosphinx\u003e\u003d2.2.0.0a2"},{"line_number":12,"context_line":"testrepository\u003e\u003d0.0.18"},{"line_number":13,"context_line":"testscenarios\u003e\u003d0.4"},{"line_number":14,"context_line":"testtools\u003e\u003d0.9.34"},{"line_number":15,"context_line":"WebTest\u003e\u003d2.0"}],"source_content_type":"text/plain","patch_set":2,"id":"fa98f980_cc394341","line":13,"in_reply_to":"fa98f980_c10d8c37","updated":"2014-09-16 13:58:57.000000000","message":"Thanks for the review.\nSo you want this to be removed from this patch and add it later.\nTill it is added the test cases which is added in this patch should be skipped, right?","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"473a45f483899bacb46a88d15ac90507d9d9e399","unresolved":false,"context_lines":[{"line_number":10,"context_line":"sphinx\u003e\u003d1.1.2,!\u003d1.2.0,\u003c1.3"},{"line_number":11,"context_line":"oslosphinx\u003e\u003d2.2.0.0a2"},{"line_number":12,"context_line":"testrepository\u003e\u003d0.0.18"},{"line_number":13,"context_line":"testscenarios\u003e\u003d0.4"},{"line_number":14,"context_line":"testtools\u003e\u003d0.9.34"},{"line_number":15,"context_line":"WebTest\u003e\u003d2.0"}],"source_content_type":"text/plain","patch_set":2,"id":"fa98f980_3c4bde60","line":13,"in_reply_to":"fa98f980_cc394341","updated":"2014-09-16 14:53:27.000000000","message":"I think Paul Michali\t means to create separate change and rebase this test on that change that will add test-requirements. But I think that this should be better to leave it as it is now in one change, so it will be clear why it is needed to be added.","commit_id":"35e000647e838a2f1e809d08fa255372dad60dda"}]}
