)]}'
{"cinder/tests/unit/volume/drivers/ibm/test_storwize_svc.py":[{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"8d465d274fbe78f820e2b0d240517dd14a27b935","unresolved":true,"context_lines":[{"line_number":8360,"context_line":"                                  \u0027fakevol\u0027, \u00271\u0027, \u0027gb\u0027, \u0027fakepool\u0027, opt, [])"},{"line_number":8361,"context_line":""},{"line_number":8362,"context_line":"    @mock.patch(\u0027time.sleep\u0027)"},{"line_number":8363,"context_line":"    def test_lslicense_exception(self, mock_sleep):"},{"line_number":8364,"context_line":"        with mock.patch.object("},{"line_number":8365,"context_line":"                storwize_svc_common.StorwizeSSH,"},{"line_number":8366,"context_line":"                \u0027_run_ssh\u0027, ) as mock_run_ssh:"}],"source_content_type":"text/x-python","patch_set":2,"id":"f3a0a427_536e8c5b","line":8363,"updated":"2021-07-16 16:48:08.000000000","message":"I think a better name for this test would be something like test_ssh_retry. You\u0027re just using lslicense() to generate sample ssh commands, and in this case there is no exception because the 3rd mock side effect returns data.\n\nYou might consider adding another test_ssh_retry_fails, with mock_run_ssh.return_value \u003d \u0027\u0027, and then verify the exception is raised.","commit_id":"7891fe0911d534a68d101462837acb53a4b2307f"}],"cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"231496e89f28307ca49d8e1f20fc45d6a3d0f756","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    @cinder_utils.retry(IndexError, interval\u003d2, retries\u003d3)"},{"line_number":215,"context_line":"    def lslicense(self):"},{"line_number":216,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027, \u0027lslicense\u0027, \u0027-delim\u0027, \u0027!\u0027]"},{"line_number":217,"context_line":"        return self.run_ssh_info(ssh_cmd)[0]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @cinder_utils.retry(IndexError, interval\u003d2, retries\u003d3)"},{"line_number":220,"context_line":"    def lsguicapabilities(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_1cbc1f04","line":217,"updated":"2020-04-21 14:17:45.000000000","message":"Catching IndexError for the whole method isn\u0027t a very clean way to fix this -- run_ssh_info() should always return a list, or these methods should handle when it doesn\u0027t.","commit_id":"c449f97f644b532015c3600ee043dd8b72a286c0"},{"author":{"_account_id":30428,"name":"Xuchu Jiang","email":"jiangxuchu@gmail.com","username":"Xuchu"},"change_message_id":"5e1355c359ac977c0bec5440b60739a0fd625331","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    @cinder_utils.retry(IndexError, interval\u003d2, retries\u003d3)"},{"line_number":215,"context_line":"    def lslicense(self):"},{"line_number":216,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027, \u0027lslicense\u0027, \u0027-delim\u0027, \u0027!\u0027]"},{"line_number":217,"context_line":"        return self.run_ssh_info(ssh_cmd)[0]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @cinder_utils.retry(IndexError, interval\u003d2, retries\u003d3)"},{"line_number":220,"context_line":"    def lsguicapabilities(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_c7d024cd","line":217,"in_reply_to":"1f493fa4_1cbc1f04","updated":"2020-04-21 16:05:39.000000000","message":"Hi Eric, Thanks for your comments. In this patch, run_ssh_info()in all the related function, should not return None, so I add retry mechanism. Do you have suggestion how to fix this issue ?","commit_id":"c449f97f644b532015c3600ee043dd8b72a286c0"},{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"8d465d274fbe78f820e2b0d240517dd14a27b935","unresolved":true,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class ReturnNoneException(exception.VolumeBackendAPIException):"},{"line_number":158,"context_line":"    message \u003d _(\u0027Get nothing from Storwize backend API\u0027)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class StorwizeSSH(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"955a204a_323b9320","line":158,"updated":"2021-07-16 16:48:08.000000000","message":"grammar: \"Get nothing\" feels awkward. How about \"Empty response received from Storwize backend API\"\n\nAnd maybe name it StorwizeEmptyResponseException.","commit_id":"7891fe0911d534a68d101462837acb53a4b2307f"}]}
