)]}'
{"ironic/drivers/modules/ssh.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"adcd9766381dbbb592cfcaa314ffca1acaf2b1db","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        driver_info[\u0027macs\u0027] \u003d driver_utils.get_node_mac_addresses(task)"},{"line_number":576,"context_line":"        ssh_obj \u003d _get_connection(task.node)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        # _power_on will turn the power off if it\u0027s already on."},{"line_number":579,"context_line":"        state \u003d _power_on(ssh_obj, driver_info)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        if state !\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_6be00ffb","line":578,"updated":"2015-01-12 16:48:00.000000000","message":"Should it be a # NOTE?","commit_id":"7472c5c8fbe6c3bee25237f243815655a84e5230"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a6d805cf517129b16b40f0701b931cd0d60ebce2","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        driver_info[\u0027macs\u0027] \u003d driver_utils.get_node_mac_addresses(task)"},{"line_number":576,"context_line":"        ssh_obj \u003d _get_connection(task.node)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        # _power_on will turn the power off if it\u0027s already on."},{"line_number":579,"context_line":"        state \u003d _power_on(ssh_obj, driver_info)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        if state !\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_0b022b72","line":578,"in_reply_to":"3a961159_6be00ffb","updated":"2015-01-12 16:53:42.000000000","message":"You mean \"# NOTE:  _power_on will turn the power off if it\u0027s already on.\" ?\n\nI don\u0027t think it adds anything tbh. Thanks for the swift review though.","commit_id":"7472c5c8fbe6c3bee25237f243815655a84e5230"}],"ironic/tests/drivers/test_ssh.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"18f97a26550e03e771e98f818897869ce9c8446d","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":629,"context_line":"                get_power_stat_mock.assert_called_once_with(self.sshclient,"},{"line_number":630,"context_line":"                                                            info)"},{"line_number":631,"context_line":"                power_off_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":632,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_91d568b9","side":"PARENT","line":631,"updated":"2015-01-12 17:45:11.000000000","message":"It seems to be better not to mock _power_on here to ensure _power_off was called from it. You can remove power_on_mock completely and mock _ssh_execute instead. As for get_power_stat_mock, you can check how many times it was called (get_power_stat_mock.call_count)","commit_id":"adafa1bf5d94186cd8b85d3c3cb7684202970a32"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0457d4844c666141bf5662a2b1a21f1fd8cb4d1b","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":629,"context_line":"                get_power_stat_mock.assert_called_once_with(self.sshclient,"},{"line_number":630,"context_line":"                                                            info)"},{"line_number":631,"context_line":"                power_off_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":632,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d50a631f","side":"PARENT","line":631,"in_reply_to":"3a961159_91d568b9","updated":"2015-01-13 09:46:43.000000000","message":"I disagree, it will duplicate test__power_on* without any added value","commit_id":"adafa1bf5d94186cd8b85d3c3cb7684202970a32"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"14c261cb716f566e3ae6368ba53348326a5ca79e","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":629,"context_line":"                get_power_stat_mock.assert_called_once_with(self.sshclient,"},{"line_number":630,"context_line":"                                                            info)"},{"line_number":631,"context_line":"                power_off_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":632,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_90bb89e3","side":"PARENT","line":631,"in_reply_to":"3a961159_d50a631f","updated":"2015-01-13 10:33:11.000000000","message":"Inclined to agree with Dmitry here. Not just because it\u0027s less work for me either :)","commit_id":"adafa1bf5d94186cd8b85d3c3cb7684202970a32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"18f97a26550e03e771e98f818897869ce9c8446d","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":659,"context_line":"                get_power_stat_mock.assert_called_once_with(self.sshclient,"},{"line_number":660,"context_line":"                                                            info)"},{"line_number":661,"context_line":"                power_off_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":662,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b1e2649e","side":"PARENT","line":661,"updated":"2015-01-12 17:45:11.000000000","message":"ditto","commit_id":"adafa1bf5d94186cd8b85d3c3cb7684202970a32"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0457d4844c666141bf5662a2b1a21f1fd8cb4d1b","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":659,"context_line":"                get_power_stat_mock.assert_called_once_with(self.sshclient,"},{"line_number":660,"context_line":"                                                            info)"},{"line_number":661,"context_line":"                power_off_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":662,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_351ba774","side":"PARENT","line":661,"in_reply_to":"3a961159_b1e2649e","updated":"2015-01-13 09:46:43.000000000","message":"ditto","commit_id":"adafa1bf5d94186cd8b85d3c3cb7684202970a32"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0457d4844c666141bf5662a2b1a21f1fd8cb4d1b","unresolved":false,"context_lines":[{"line_number":626,"context_line":"                parse_drv_info_mock.assert_called_once_with(task.node)"},{"line_number":627,"context_line":"                get_mac_addr_mock.assert_called_once_with(mock.ANY)"},{"line_number":628,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":629,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"},{"line_number":632,"context_line":"    @mock.patch.object(ssh, \u0027_get_connection\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_754b6f5f","line":629,"updated":"2015-01-13 09:46:43.000000000","message":"either\n\n self.assertFalse(power_off_mock.called)\n\nor just delete mocking power off from line #607 completely.","commit_id":"7472c5c8fbe6c3bee25237f243815655a84e5230"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"14c261cb716f566e3ae6368ba53348326a5ca79e","unresolved":false,"context_lines":[{"line_number":626,"context_line":"                parse_drv_info_mock.assert_called_once_with(task.node)"},{"line_number":627,"context_line":"                get_mac_addr_mock.assert_called_once_with(mock.ANY)"},{"line_number":628,"context_line":"                get_conn_mock.assert_called_once_with(task.node)"},{"line_number":629,"context_line":"                power_on_mock.assert_called_once_with(self.sshclient, info)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch.object(driver_utils, \u0027get_node_mac_addresses\u0027)"},{"line_number":632,"context_line":"    @mock.patch.object(ssh, \u0027_get_connection\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_f0792d31","line":629,"in_reply_to":"3a961159_754b6f5f","updated":"2015-01-13 10:33:11.000000000","message":"Oops, sloppy - I\u0027ll also remove the get_power_status mock","commit_id":"7472c5c8fbe6c3bee25237f243815655a84e5230"}]}
