)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3b4ce5f4a1c6b58bb635d1304e46b693b78ec57e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The ironic driver uses ironicclient to get the list of nodes from the"},{"line_number":10,"context_line":"Ironic service. If that service is not running, or something otherwise"},{"line_number":11,"context_line":"prevents the ironicclient\u0027s call from succeeding, and unhandled"},{"line_number":12,"context_line":"exception will occur. This patch adds a generic exception handler for"},{"line_number":13,"context_line":"this call, logging an error and continuing."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf3e73b7_75d9be81","line":11,"range":{"start_line":11,"start_character":50,"end_line":11,"end_character":53},"updated":"2017-08-07 14:16:19.000000000","message":"s/and/an","commit_id":"ab876704389042c23974f8bd992d48bf5f0a3a81"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"99f9e5a38b6fe53a8adabc7fcb26f5069a7e5f65","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The ironic driver uses ironicclient to get the list of nodes from the"},{"line_number":10,"context_line":"Ironic service. If that service is not running, or something otherwise"},{"line_number":11,"context_line":"prevents the ironicclient\u0027s call from succeeding, and unhandled"},{"line_number":12,"context_line":"exception will occur. This patch adds a generic exception handler for"},{"line_number":13,"context_line":"this call, logging an error and continuing."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf3e73b7_076001a5","line":11,"range":{"start_line":11,"start_character":50,"end_line":11,"end_character":53},"updated":"2017-08-07 18:50:54.000000000","message":"s/and/an/","commit_id":"c2d33c3271370358d48553233b41bf9119d834fb"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"6704cb55538ada1a079272b0e2e448f4ea2ed23a","unresolved":false,"context_lines":[{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"    @mock.patch.object(ironic_driver.LOG, \u0027error\u0027)"},{"line_number":2081,"context_line":"    def test_ironicclient_bad_response(self, mock_error):"},{"line_number":2082,"context_line":"        hold_call \u003d self.driver.ironicclient.call"},{"line_number":2083,"context_line":"        self.driver.ironicclient.call \u003d mock.Mock(side_effect\u003d["},{"line_number":2084,"context_line":"                [\"node1\", \"node2\"], Exception()])"},{"line_number":2085,"context_line":"        result \u003d self.driver._get_node_list()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_d5dcea47","line":2082,"updated":"2017-08-07 14:19:32.000000000","message":"please no monkey-patching.\n\nuse mock as context manager instead:\n\n  with mock.patch.object(self.driver.ironicclient, \u0027call\u0027) as call_mock:\n      call_mock.side_effect \u003d [...]","commit_id":"ab876704389042c23974f8bd992d48bf5f0a3a81"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"43148ec50b0a9178c200983a8c1c1860485f251c","unresolved":false,"context_lines":[{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"    @mock.patch.object(ironic_driver.LOG, \u0027error\u0027)"},{"line_number":2081,"context_line":"    def test_ironicclient_bad_response(self, mock_error):"},{"line_number":2082,"context_line":"        hold_call \u003d self.driver.ironicclient.call"},{"line_number":2083,"context_line":"        self.driver.ironicclient.call \u003d mock.Mock(side_effect\u003d["},{"line_number":2084,"context_line":"                [\"node1\", \"node2\"], Exception()])"},{"line_number":2085,"context_line":"        result \u003d self.driver._get_node_list()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_894aca7d","line":2082,"in_reply_to":"bf3e73b7_d5dcea47","updated":"2017-08-07 18:05:04.000000000","message":"Jay pointed out the correct object to mock, so I moved it to the decorator form.","commit_id":"ab876704389042c23974f8bd992d48bf5f0a3a81"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3b4ce5f4a1c6b58bb635d1304e46b693b78ec57e","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"        result \u003d self.driver._get_node_list()"},{"line_number":2089,"context_line":"        mock_error.assert_called_once()"},{"line_number":2090,"context_line":"        self.assertEqual([], result)"},{"line_number":2091,"context_line":"        self.driver.ironicclient.call \u003d hold_call"},{"line_number":2092,"context_line":""},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"class IronicDriverSyncTestCase(IronicDriverTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_356a1680","line":2091,"updated":"2017-08-07 14:16:19.000000000","message":"Why are you manually restoring the mocked-out ironicclient method here? Why not just do what all the other unit tests in this file do and just:\n\n @mock.patch.object(FAKE_CLIENT, \u0027call\u0027)","commit_id":"ab876704389042c23974f8bd992d48bf5f0a3a81"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"43148ec50b0a9178c200983a8c1c1860485f251c","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"        result \u003d self.driver._get_node_list()"},{"line_number":2089,"context_line":"        mock_error.assert_called_once()"},{"line_number":2090,"context_line":"        self.assertEqual([], result)"},{"line_number":2091,"context_line":"        self.driver.ironicclient.call \u003d hold_call"},{"line_number":2092,"context_line":""},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"class IronicDriverSyncTestCase(IronicDriverTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_a96c6e08","line":2091,"in_reply_to":"bf3e73b7_356a1680","updated":"2017-08-07 18:05:04.000000000","message":"Guess I didn\u0027t read the other tests well enough. I had tried to mock the ironicclient directly, and that was not working.","commit_id":"ab876704389042c23974f8bd992d48bf5f0a3a81"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98811b46b17847c000cf940b156caabe7abcde80","unresolved":false,"context_lines":[{"line_number":596,"context_line":"        except Exception as e:"},{"line_number":597,"context_line":"            # This can occur if the ironic service is not responding"},{"line_number":598,"context_line":"            LOG.error(\"Unexpected exception calling ironicclient node.list: \""},{"line_number":599,"context_line":"                    \"%s\", e)"},{"line_number":600,"context_line":"            node_list \u003d []"},{"line_number":601,"context_line":"        return node_list"},{"line_number":602,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_c563dfdb","line":599,"range":{"start_line":599,"start_character":20,"end_line":599,"end_character":24},"updated":"2017-08-01 21:47:31.000000000","message":"I swear to all that is holy I\u0027m going to make us run pep8 against E128 just because of you.","commit_id":"5c81df313675ca51afae706c1b920836b9498c04"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"812cfb4f982a75012e50cb1f2a467c4a854679d6","unresolved":false,"context_lines":[{"line_number":592,"context_line":"        node_list \u003d []"},{"line_number":593,"context_line":"        try:"},{"line_number":594,"context_line":"            node_list \u003d self.ironicclient.call(\"node.list\", **kwargs)"},{"line_number":595,"context_line":"        except exception.NovaException as e:"},{"line_number":596,"context_line":"            LOG.error(\"Failed to get the list of nodes from the Ironic \""},{"line_number":597,"context_line":"                      \"inventory. Error: %s\", e)"},{"line_number":598,"context_line":"        except Exception as e:"},{"line_number":599,"context_line":"            LOG.error(\"An unknown error has occurred when trying to get the \""},{"line_number":600,"context_line":"                      \"list of nodes from the Ironic inventory. Error: %s\", e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_ca2d7947","line":597,"range":{"start_line":595,"start_character":8,"end_line":597,"end_character":48},"updated":"2017-08-08 14:44:56.000000000","message":"Don\u0027t have this exception type covered in tests, but it is in this duplicate patch: https://review.openstack.org/#/c/449587/","commit_id":"c2d33c3271370358d48553233b41bf9119d834fb"}]}
