)]}'
{"manila/share/drivers/generic.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"b8a0b7a0ceb63c8f3ec9717be6e40581019519ba","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # (aovchinnikov): ssh_execute does not behave well when passed"},{"line_number":165,"context_line":"        # parameters with spaces."},{"line_number":166,"context_line":"        wrap \u003d lambda token: \"\\\"\" + token + \"\\\"\""},{"line_number":167,"context_line":"        command \u003d [wrap(tkn) if tkn.count(\u0027 \u0027) else tkn for tkn in command]"},{"line_number":168,"context_line":"        return processutils.ssh_execute(ssh, \u0027 \u0027.join(command),"},{"line_number":169,"context_line":"                                        check_exit_code\u003dcheck_exit_code)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_aec1eae5","line":167,"updated":"2016-09-19 11:56:00.000000000","message":"could you please add an UT to this logic?","commit_id":"ce942f32b818d41ca8cdb77faf82946c8ba08a26"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"8fb6aef3d3ffa3136545322434dfc335cf43b4fb","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # (aovchinnikov): ssh_execute does not behave well when passed"},{"line_number":165,"context_line":"        # parameters with spaces."},{"line_number":166,"context_line":"        wrap \u003d lambda token: \"\\\"\" + token + \"\\\"\""},{"line_number":167,"context_line":"        command \u003d [wrap(tkn) if tkn.count(\u0027 \u0027) else tkn for tkn in command]"},{"line_number":168,"context_line":"        return processutils.ssh_execute(ssh, \u0027 \u0027.join(command),"},{"line_number":169,"context_line":"                                        check_exit_code\u003dcheck_exit_code)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_e4e871b5","line":167,"in_reply_to":"7a8ec9b2_aec1eae5","updated":"2016-09-19 12:21:52.000000000","message":"Yes, sure.","commit_id":"ce942f32b818d41ca8cdb77faf82946c8ba08a26"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"469a048665374927a33090a0f8f4720d6ef02217","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            ssh \u003d ssh_pool.create()"},{"line_number":162,"context_line":"            self.ssh_connections[server[\u0027instance_id\u0027]] \u003d (ssh_pool, ssh)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        # (aovchinnikov): ssh_execute does not behave well when passed"},{"line_number":165,"context_line":"        # parameters with spaces."},{"line_number":166,"context_line":"        wrap \u003d lambda token: \"\\\"\" + token + \"\\\"\""},{"line_number":167,"context_line":"        command \u003d [wrap(tkn) if tkn.count(\u0027 \u0027) else tkn for tkn in command]"},{"line_number":168,"context_line":"        return processutils.ssh_execute(ssh, \u0027 \u0027.join(command),"},{"line_number":169,"context_line":"                                        check_exit_code\u003dcheck_exit_code)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def check_for_setup_error(self):"},{"line_number":172,"context_line":"        \"\"\"Returns an error if prerequisites aren\u0027t met.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_b8a054f5","line":169,"range":{"start_line":164,"start_character":0,"end_line":169,"end_character":72},"updated":"2016-09-19 11:07:54.000000000","message":"Did you consider defining ssh_execute() in manila/utils, similarly to our manila-specific definition of execute() there, and doing the space escape there?","commit_id":"ce942f32b818d41ca8cdb77faf82946c8ba08a26"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"eadb6907721e5e963373adb345f92b36aa2cac09","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            ssh \u003d ssh_pool.create()"},{"line_number":162,"context_line":"            self.ssh_connections[server[\u0027instance_id\u0027]] \u003d (ssh_pool, ssh)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        # (aovchinnikov): ssh_execute does not behave well when passed"},{"line_number":165,"context_line":"        # parameters with spaces."},{"line_number":166,"context_line":"        wrap \u003d lambda token: \"\\\"\" + token + \"\\\"\""},{"line_number":167,"context_line":"        command \u003d [wrap(tkn) if tkn.count(\u0027 \u0027) else tkn for tkn in command]"},{"line_number":168,"context_line":"        return processutils.ssh_execute(ssh, \u0027 \u0027.join(command),"},{"line_number":169,"context_line":"                                        check_exit_code\u003dcheck_exit_code)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def check_for_setup_error(self):"},{"line_number":172,"context_line":"        \"\"\"Returns an error if prerequisites aren\u0027t met.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_58e4b0aa","line":169,"range":{"start_line":164,"start_character":0,"end_line":169,"end_character":72},"in_reply_to":"7a8ec9b2_b8a054f5","updated":"2016-09-19 11:28:51.000000000","message":"Yes, I did, but as far as first-party drivers are concerned this seems to be the only place where it is used. So since it is a single occurrence of ssh_execute it probably does not justify for adding a wrapper to utils.","commit_id":"ce942f32b818d41ca8cdb77faf82946c8ba08a26"}],"manila/tests/share/drivers/test_generic.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"eca54b4a0bbc83511497a286ce81e2407325f1bb","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"        self.assertEqual(ssh_output, result)"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"    def test__ssh_exec_check_list_comprehensions_still_work(self):"},{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_d59c975f","line":1370,"range":{"start_line":1370,"start_character":8,"end_line":1370,"end_character":18},"updated":"2016-09-21 03:55:31.000000000","message":"this definition isn\u0027t necessary, cause it\u0027s only referenced once.\nor reference it in an equal assertion for _driver._ssh_exec call result.","commit_id":"5d880facc881dc229a71f25379784519b731fc02"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"90d17e03c75a7186728ad4ad48c494dac24dfc9b","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"        self.assertEqual(ssh_output, result)"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"    def test__ssh_exec_check_list_comprehensions_still_work(self):"},{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_e2bb7e0d","line":1370,"range":{"start_line":1370,"start_character":8,"end_line":1370,"end_character":18},"in_reply_to":"7a8ec9b2_9dcdcdb9","updated":"2016-09-21 11:35:13.000000000","message":"Alexey, I think, Yingzhe Zeng was saying about just \"single\" usage of this var. In this case it could be provided in place.","commit_id":"5d880facc881dc229a71f25379784519b731fc02"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"ceb2761d3c7ad73dcc902d38360f041221261025","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"        self.assertEqual(ssh_output, result)"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"    def test__ssh_exec_check_list_comprehensions_still_work(self):"},{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_9dcdcdb9","line":1370,"range":{"start_line":1370,"start_character":8,"end_line":1370,"end_character":18},"in_reply_to":"7a8ec9b2_d59c975f","updated":"2016-09-21 08:19:40.000000000","message":"Isn\u0027t necessary means you can remove it and nothing will change. This is not true. Please refer to line 1379.","commit_id":"5d880facc881dc229a71f25379784519b731fc02"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"386ceb26a8db5f17d077f40601cfd8973a500f6a","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def test__ssh_exec_check_list_comprehensions_still_work(self):"},{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport \u003d mock.Mock()"},{"line_number":1374,"context_line":"        ssh.get_transport().is_active \u003d mock.Mock(side_effect\u003dlambda: False)"},{"line_number":1375,"context_line":"        ssh_pool \u003d mock.Mock()"},{"line_number":1376,"context_line":"        ssh_pool.create \u003d mock.Mock(side_effect\u003dlambda: ssh)"},{"line_number":1377,"context_line":"        ssh_pool.remove \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_e594a8e9","line":1374,"range":{"start_line":1372,"start_character":8,"end_line":1374,"end_character":76},"updated":"2016-09-20 12:52:41.000000000","message":"It is wrong approach for mocking nested stuff, just do following:\n\n\"\"\"\nssh \u003d mock.Mock()\nssh.get_transport.return_value.is_active \u003d mock.Mock(side_effect\u003dlambda: False)\n\"\"\"\n\nBecause on line 1374 you do first call of \"ssh.get_transport()\" (influencing mock logic) just to get return value that you can get explicitly.","commit_id":"5d880facc881dc229a71f25379784519b731fc02"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"ceb2761d3c7ad73dcc902d38360f041221261025","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def test__ssh_exec_check_list_comprehensions_still_work(self):"},{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport \u003d mock.Mock()"},{"line_number":1374,"context_line":"        ssh.get_transport().is_active \u003d mock.Mock(side_effect\u003dlambda: False)"},{"line_number":1375,"context_line":"        ssh_pool \u003d mock.Mock()"},{"line_number":1376,"context_line":"        ssh_pool.create \u003d mock.Mock(side_effect\u003dlambda: ssh)"},{"line_number":1377,"context_line":"        ssh_pool.remove \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_bdc44992","line":1374,"range":{"start_line":1372,"start_character":8,"end_line":1374,"end_character":76},"in_reply_to":"7a8ec9b2_e594a8e9","updated":"2016-09-21 08:19:40.000000000","message":"Done","commit_id":"5d880facc881dc229a71f25379784519b731fc02"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"07e577252f3f1bdc318f69797493c1d8456b7c4f","unresolved":false,"context_lines":[{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport.is_active \u003d mock.Mock(side_effect\u003dlambda: False)"},{"line_number":1374,"context_line":"        ssh_pool \u003d mock.Mock()"},{"line_number":1375,"context_line":"        ssh_pool.create \u003d mock.Mock(side_effect\u003dlambda: ssh)"},{"line_number":1376,"context_line":"        ssh_pool.remove \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_c224c20e","line":1373,"range":{"start_line":1373,"start_character":8,"end_line":1373,"end_character":74},"updated":"2016-09-21 11:35:06.000000000","message":"It is wrong definition according to proposed one, and the fact that test passed means it is just not used and not covered by logic. So, I guess you can just remove this line and everything will still pass.","commit_id":"a00176629cc6d93676b01f03ec932382dd65af95"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"b7494c9e1cd5bb795e046f8f7732e6df107fd3f5","unresolved":false,"context_lines":[{"line_number":1370,"context_line":"        ssh_output \u003d \u0027fake_ssh_output\u0027"},{"line_number":1371,"context_line":"        cmd \u003d [\u0027fake\u0027, \u0027command spaced\u0027]"},{"line_number":1372,"context_line":"        ssh \u003d mock.Mock()"},{"line_number":1373,"context_line":"        ssh.get_transport.is_active \u003d mock.Mock(side_effect\u003dlambda: False)"},{"line_number":1374,"context_line":"        ssh_pool \u003d mock.Mock()"},{"line_number":1375,"context_line":"        ssh_pool.create \u003d mock.Mock(side_effect\u003dlambda: ssh)"},{"line_number":1376,"context_line":"        ssh_pool.remove \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_c8006337","line":1373,"range":{"start_line":1373,"start_character":8,"end_line":1373,"end_character":74},"in_reply_to":"7a8ec9b2_c224c20e","updated":"2016-09-21 11:43:31.000000000","message":"Hmm, your guess is right.","commit_id":"a00176629cc6d93676b01f03ec932382dd65af95"}]}
