)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"89aa1c017afc88cd7e1877ab935cf0526bcd3132","unresolved":false,"context_lines":[{"line_number":12,"context_line":"The function tries to locate the passed in sshclient object inside sshpool.free_items."},{"line_number":13,"context_line":"However, since the sshclient object is set to “none” at the beginning, it never"},{"line_number":14,"context_line":"finds the object and ends up with decrementing the current size, without actually removing the object."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"1. Removed reset to ‘None’ so that the attempt to locate object goes through."},{"line_number":17,"context_line":"2. fixed the code to use free_items.remove(ssh) to remove the ssh object identified instead of free_items.pop(sh)"},{"line_number":18,"context_line":"3. also updated the code to decrement current size only if a match is found in free_items."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aed3d3a_4be724b0","line":15,"updated":"2016-02-27 15:41:22.000000000","message":"Please wrap lines at 80 characters or less.\n\nThank you!","commit_id":"3e20960e1e592042b18ceeb15980cdfb100d4e48"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2f1146970d925e68ff5e001c0629f09968be09a8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\"fix sshpool.remove code\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"**formatted commit message to conform to 80 characters or less per line**"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"currently, sshpool.remove function under cinder/ssh_utils.py is broken."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_25312c06","line":9,"updated":"2016-02-27 20:06:05.000000000","message":"This line shouldn\u0027t be here.\n\nFWIW, I think the guideline is actually 72 characters.  You see a dotted red line in gerrit review where these lines should be wrapped.  Also, as long as you are cleaning up, I\u0027ve marked a couple places where you wrapped the line but added extra leading spaces.","commit_id":"9d756eceffcc3c5eb55c064cb2788dcf4ac4ab34"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2f1146970d925e68ff5e001c0629f09968be09a8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The function tries to locate the passed in sshclient object inside"},{"line_number":14,"context_line":"sshpool.free_items."},{"line_number":15,"context_line":"However, since the sshclient object is set to “none” at the beginning,"},{"line_number":16,"context_line":" it never finds the object and ends up with decrementing the current size,"},{"line_number":17,"context_line":" without actually removing the object."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Made the following changes to fix:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_052ce8a9","line":16,"updated":"2016-02-27 20:06:05.000000000","message":"remove leading space here","commit_id":"9d756eceffcc3c5eb55c064cb2788dcf4ac4ab34"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2f1146970d925e68ff5e001c0629f09968be09a8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"sshpool.free_items."},{"line_number":15,"context_line":"However, since the sshclient object is set to “none” at the beginning,"},{"line_number":16,"context_line":" it never finds the object and ends up with decrementing the current size,"},{"line_number":17,"context_line":" without actually removing the object."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Made the following changes to fix:"},{"line_number":20,"context_line":"1. Removed reset to ‘None’ so that the attempt to locate object goes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_451c3077","line":17,"updated":"2016-02-27 20:06:05.000000000","message":"ditto.","commit_id":"9d756eceffcc3c5eb55c064cb2788dcf4ac4ab34"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2f1146970d925e68ff5e001c0629f09968be09a8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"remove an object from the pool if no match is found."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: I4871f4faeb1fc790325f274ab21dc42a8d71fb26"},{"line_number":32,"context_line":"Closes-Bug: 1463557"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_68002902","line":32,"updated":"2016-02-27 20:06:05.000000000","message":"Closes-Bug: #1463557\n\nUsing this form will yield a link that works.","commit_id":"9d756eceffcc3c5eb55c064cb2788dcf4ac4ab34"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2016-02-26 19:49:24 +0000"},{"line_number":4,"context_line":"Commit:     Surya Ghatty \u003cghatty@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-28 02:38:53 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\"fix sshpool.remove code\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"currently, sshpool.remove function under cinder/ssh_utils.py"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9aed3d3a_25e616b0","line":6,"updated":"2016-02-29 16:26:14.000000000","message":"Remove the quotes here and change fix to Fix","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-02-28 02:38:53 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\"fix sshpool.remove code\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"currently, sshpool.remove function under cinder/ssh_utils.py"},{"line_number":10,"context_line":"is broken."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9aed3d3a_0538323c","line":8,"updated":"2016-02-29 16:26:14.000000000","message":"s/currently/Currently","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":9,"context_line":"currently, sshpool.remove function under cinder/ssh_utils.py"},{"line_number":10,"context_line":"is broken."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The function tries to locate the passed in sshclient object inside"},{"line_number":13,"context_line":"sshpool.free_items."},{"line_number":14,"context_line":"However, since the sshclient object is set to “none” at the"},{"line_number":15,"context_line":"beginning, it never finds the object and ends up with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9aed3d3a_05eb1279","line":12,"updated":"2016-02-29 16:26:14.000000000","message":"This can probably move up to the previous paragraph.","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":10,"context_line":"is broken."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The function tries to locate the passed in sshclient object inside"},{"line_number":13,"context_line":"sshpool.free_items."},{"line_number":14,"context_line":"However, since the sshclient object is set to “none” at the"},{"line_number":15,"context_line":"beginning, it never finds the object and ends up with"},{"line_number":16,"context_line":"decrementing the current size, without actually removing"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9aed3d3a_45019a37","line":13,"updated":"2016-02-29 16:26:14.000000000","message":"s/\"none\"/None","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Made the following changes to fix:"},{"line_number":20,"context_line":"1. Removed reset to ‘None’ so that the attempt to locate object"},{"line_number":21,"context_line":"goes through."},{"line_number":22,"context_line":"2. fixed the code to use free_items.remove(ssh) to remove the ssh"},{"line_number":23,"context_line":"object identified instead of free_items.pop(sh)"},{"line_number":24,"context_line":"3. also updated the code to decrement current size only if a match"},{"line_number":25,"context_line":"is found in free_items."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9aed3d3a_e0837c54","line":22,"updated":"2016-02-29 16:26:14.000000000","message":"Should be consistent with capitalization here, so change \"fixed\" to \"Fixed\" and a few other cases mentioned below","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"ccbf05955909e5ace0d0addc2386916554f6cdb6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"sshclient object inside sshpool.free_items."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However, since the sshclient object is set to “None” at the"},{"line_number":14,"context_line":"beginning, it never finds the object and ends up with"},{"line_number":15,"context_line":"decrementing the current size, without actually removing"},{"line_number":16,"context_line":"the object."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aed3d3a_ff902445","line":14,"updated":"2016-02-29 22:23:13.000000000","message":"remove \"with\" from end of line","commit_id":"83116cc496ce09c56ef95081f9439cedf0aa3028"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"ccbf05955909e5ace0d0addc2386916554f6cdb6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"1. Removed reset to ‘None’ so that the attempt to locate object"},{"line_number":20,"context_line":"goes through."},{"line_number":21,"context_line":"2. Fixed the code to use free_items.remove(ssh) to remove the ssh"},{"line_number":22,"context_line":"object identified instead of free_items.pop(sh)"},{"line_number":23,"context_line":"3. Also updated the code to decrement current size only if a match"},{"line_number":24,"context_line":"is found in free_items."},{"line_number":25,"context_line":"4. Added test case to test remove() of an ssh client that is in the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aed3d3a_dfbc40bd","line":22,"updated":"2016-02-29 22:23:13.000000000","message":"should be free_items.pop(ssh)","commit_id":"83116cc496ce09c56ef95081f9439cedf0aa3028"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"b8b89e5e71bc21f3979f55cebf7a8a258f70212f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However, since the sshclient object is set to “None” at the"},{"line_number":14,"context_line":"beginning, it never finds the object and ends up decrementing"},{"line_number":15,"context_line":" the current size, without actually removing the object."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Made the following changes to fix:"},{"line_number":18,"context_line":"1. Removed reset to ‘None’ so that the attempt to locate object"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7af24918_bc12a460","line":15,"updated":"2016-03-02 05:17:26.000000000","message":"Extra space at the beginning here.","commit_id":"b4f63203ffa32e6ce2f678cdf6287621eeff2c59"}],"cinder/tests/unit/test_ssh_utils.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"from oslo_config import cfg"},{"line_number":15,"context_line":"import paramiko"},{"line_number":16,"context_line":"import random"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_74e0d296","line":16,"updated":"2016-02-29 16:26:14.000000000","message":"These stdlibs should be moved above the third party libs (i.e. moved directly below mock. That\u0027s an OpenStack style guideline found at http://docs.openstack.org/developer/hacking/#imports","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"1a9061d69f98c97ab11a950f46920d081ddee9eb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"from oslo_config import cfg"},{"line_number":15,"context_line":"import paramiko"},{"line_number":16,"context_line":"import random"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_ec7a4987","line":16,"in_reply_to":"9aed3d3a_74e0d296","updated":"2016-02-29 20:01:13.000000000","message":"Wow, wonder how this got through pep8?","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    @mock.patch(\u0027os.path.isfile\u0027, return_value\u003dTrue)"},{"line_number":85,"context_line":"    def test_sshpool_remove(self, mock_isfile, mock_sshclient, mock_open,"},{"line_number":86,"context_line":"                            mock_conf):"},{"line_number":87,"context_line":"        mock_sshclient.return_value \u003d FakeSSHClient()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        mock_conf.ssh_hosts_key_file.return_value \u003d \u0027dummy\u0027"},{"line_number":90,"context_line":"        sshpool \u003d ssh_utils.SSHPool(\"127.0.0.1\", 22, 10,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_45407a34","line":87,"updated":"2016-02-29 16:26:14.000000000","message":"Playing around with this some more, we can actually get 3 mock ssh clients, and pick test removing by doing something like:\n\nssh_to_remove \u003d mock.MagicMock()\n\nmock_sshclient.side_effect \u003d [mock.MagicMock(), ssh_to_remove, mock.MagicMock()]\nsshpool \u003d ssh_utils.SSHPool(\"127.0.0.1\", 22, 10,\n                                    \"test\",\n                                    password\u003d\"test\",\n                                    min_size\u003d3,\n                                    max_size\u003d3)\n\nself.assertIn(ssh_to_remove, sshpool.free_items)\nsshpool.remove(free_items)\n\n\nThat works since mock.side_effect with a list will return the next value in the list each time the method is called, and we\u0027re forcing the size of the SSHPool to be 3.","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        sshpool.put(FakeSSHClient())"},{"line_number":96,"context_line":"        sshpool.put(FakeSSHClient())"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        ssh1 \u003d sshpool.free_items[random.choice([0, 1, 2])]"},{"line_number":99,"context_line":"        mylist \u003d list(sshpool.free_items)"},{"line_number":100,"context_line":"        self.assertIn(ssh1, mylist)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_e5d42e21","line":98,"updated":"2016-02-29 16:26:14.000000000","message":"Typically we avoid using random behavior with the tests since then we don\u0027t get deterministic behavior in the tests.","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bb4708053311d22f211520f2847a04c0d4face21","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def test_sshpool_remove_object_not_in_pool(self, mock_isfile,"},{"line_number":113,"context_line":"                                               mock_sshclient, mock_open,"},{"line_number":114,"context_line":"                                               mock_conf):"},{"line_number":115,"context_line":"        mock_sshclient.return_value \u003d FakeSSHClient()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        mock_conf.ssh_hosts_key_file.return_value \u003d \u0027dummy\u0027"},{"line_number":118,"context_line":"        sshpool \u003d ssh_utils.SSHPool(\"127.0.0.1\", 22, 10,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_a5b7c638","line":115,"updated":"2016-02-29 16:26:14.000000000","message":"Same comment as above","commit_id":"64aec321d7488377df6ad3939fa3134c8370bcb2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"ccbf05955909e5ace0d0addc2386916554f6cdb6","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def test_missing_ssh_hosts_key_config(self, mock_sshclient, mock_open,"},{"line_number":206,"context_line":"                                          mock_conf):"},{"line_number":207,"context_line":"        mock_sshclient.return_value \u003d FakeSSHClient()"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        mock_conf.ssh_hosts_key_file \u003d None"},{"line_number":210,"context_line":"        # create with password"},{"line_number":211,"context_line":"        self.assertRaises(exception.ParameterNotFound,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_5f015037","side":"PARENT","line":208,"updated":"2016-02-29 22:23:13.000000000","message":"No need to change this line with the current patch","commit_id":"71388796d3280a3800b6c034d5d415ed7ca647f5"},{"author":{"_account_id":16953,"name":"Surya Ghatty","email":"ghatty@us.ibm.com","username":"Sghatty"},"change_message_id":"0f1bb8f15c1365b40cd44b84e6757dfd03feb26c","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def test_missing_ssh_hosts_key_config(self, mock_sshclient, mock_open,"},{"line_number":206,"context_line":"                                          mock_conf):"},{"line_number":207,"context_line":"        mock_sshclient.return_value \u003d FakeSSHClient()"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        mock_conf.ssh_hosts_key_file \u003d None"},{"line_number":210,"context_line":"        # create with password"},{"line_number":211,"context_line":"        self.assertRaises(exception.ParameterNotFound,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_baf06a92","side":"PARENT","line":208,"in_reply_to":"9aed3d3a_5f015037","updated":"2016-02-29 22:47:02.000000000","message":"Done","commit_id":"71388796d3280a3800b6c034d5d415ed7ca647f5"}]}
