)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"aa34871e5a9afa685000e6b3acbf2c99f2af0c0e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the size is appropriate instead of taking the image size as the"},{"line_number":12,"context_line":"volume size directly."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Besides that, raise VolumeNotFound or SnapshotNotFound when the"},{"line_number":15,"context_line":"backing file for the volume or the source volume of the snapshot"},{"line_number":16,"context_line":"does not exist."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAUH%2F%2BldE%3D","line":14,"updated":"2014-01-24 10:13:01.000000000","message":"Pls remove this as the corresponding code has been removed.","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d0796dd0fd5b7a51ef97280f8f4e2b0eb79fc65d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the size is appropriate instead of taking the image size as the"},{"line_number":12,"context_line":"volume size directly."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Besides that, raise VolumeNotFound or SnapshotNotFound when the"},{"line_number":15,"context_line":"backing file for the volume or the source volume of the snapshot"},{"line_number":16,"context_line":"does not exist."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAUH%2F%2Ba1w%3D","line":14,"in_reply_to":"AAAAUH%2F%2BldE%3D","updated":"2014-01-27 04:31:44.000000000","message":"Done","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"}],"cinder/tests/test_vmware_vmdk.py":[{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"c376a9eba89b6e32dbc74efc83fc19a372ecd726","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"                                       new_vmdk_path)"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        m.ReplayAll()"},{"line_number":1158,"context_line":"        self._driver._clone_backing_by_copying(volume, src_vmdk_path, 1)"},{"line_number":1159,"context_line":"        m.UnsetStubs()"},{"line_number":1160,"context_line":"        m.VerifyAll()"},{"line_number":1161,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FvwE%3D","line":1158,"updated":"2014-02-11 03:38:39.000000000","message":"Please cover the path where volume[\u0027size\u0027] is greater than src_size_in_gb and assert that _extend_vmdk_virtual_disk is being invoked.\n\nWhile at it you could convert this test case to mock if you are comfortable with that.","commit_id":"6e97ca9bcbfbdc011d8fb649b559e318e0a53eeb"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Test suite for VMware VMDK driver."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import contextlib"},{"line_number":21,"context_line":"import mock"},{"line_number":22,"context_line":"import mox"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmNE%3D","line":20,"updated":"2014-02-12 05:19:15.000000000","message":"mock library supports decorators - http://www.voidspace.org.uk/python/mock/getting-started.html#patch-decorators. Could you use that instead of contextlib? That would make the code much easier to read.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"},{"line_number":1147,"context_line":"                as volumeops:"},{"line_number":1148,"context_line":"            volumeops.return_value \u003d self._volumeops"},{"line_number":1149,"context_line":"            with contextlib.nested("},{"line_number":1150,"context_line":"                mock.patch.object(self._driver,"},{"line_number":1151,"context_line":"                                  \u0027_create_backing_in_inventory\u0027),"},{"line_number":1152,"context_line":"                mock.patch.object(self._driver.volumeops,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGc%3D","line":1149,"updated":"2014-02-12 05:19:15.000000000","message":"Use patch decorator to test method instead? Would make code easier to read.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"75dd46d912046d50bee89a9dc1a1ea654cf3fb33","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"},{"line_number":1147,"context_line":"                as volumeops:"},{"line_number":1148,"context_line":"            volumeops.return_value \u003d self._volumeops"},{"line_number":1149,"context_line":"            with contextlib.nested("},{"line_number":1150,"context_line":"                mock.patch.object(self._driver,"},{"line_number":1151,"context_line":"                                  \u0027_create_backing_in_inventory\u0027),"},{"line_number":1152,"context_line":"                mock.patch.object(self._driver.volumeops,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2Fl9w%3D","line":1149,"in_reply_to":"AAAAUX%2F%2FmBg%3D","updated":"2014-02-12 05:55:21.000000000","message":"Done. OK, I got to resolve it. Thank you, Subbu.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"5cdfac5cf616607b8eeeba3b175e6749a1e9c362","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"},{"line_number":1147,"context_line":"                as volumeops:"},{"line_number":1148,"context_line":"            volumeops.return_value \u003d self._volumeops"},{"line_number":1149,"context_line":"            with contextlib.nested("},{"line_number":1150,"context_line":"                mock.patch.object(self._driver,"},{"line_number":1151,"context_line":"                                  \u0027_create_backing_in_inventory\u0027),"},{"line_number":1152,"context_line":"                mock.patch.object(self._driver.volumeops,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2Fl9g%3D","line":1149,"in_reply_to":"AAAAUX%2F%2FmBg%3D","updated":"2014-02-12 05:55:45.000000000","message":"You could use @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.volumeops\u0027) as the decorator and get the mocked volumeops as a param to this test case.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"c8491990a51778de6c0fe57f8bd05c7c6a923a48","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"},{"line_number":1147,"context_line":"                as volumeops:"},{"line_number":1148,"context_line":"            volumeops.return_value \u003d self._volumeops"},{"line_number":1149,"context_line":"            with contextlib.nested("},{"line_number":1150,"context_line":"                mock.patch.object(self._driver,"},{"line_number":1151,"context_line":"                                  \u0027_create_backing_in_inventory\u0027),"},{"line_number":1152,"context_line":"                mock.patch.object(self._driver.volumeops,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmBg%3D","line":1149,"in_reply_to":"AAAAUX%2F%2FmGc%3D","updated":"2014-02-12 05:40:32.000000000","message":"If I put @mock.patch.object(self._driver.__class__, \u0027volumeops\u0027) as the decorator, error will be raised for self._driver.__class__, because they can not find self. I am not sure how to handle this case.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1162,"context_line":"            ) as (_create_backing_in_inventory, get_vmdk_path,"},{"line_number":1163,"context_line":"                  get_dc, delete_vmdk_file, copy_vmdk_file,"},{"line_number":1164,"context_line":"                  _extend_vmdk_virtual_disk):"},{"line_number":1165,"context_line":"                _create_backing_in_inventory.return_value \u003d\\"},{"line_number":1166,"context_line":"                    fake_backing"},{"line_number":1167,"context_line":"                get_vmdk_path.return_value \u003d fake_vmdk_path"},{"line_number":1168,"context_line":"                get_dc.return_value \u003d fake_dc"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGQ%3D","line":1165,"updated":"2014-02-12 05:19:15.000000000","message":"I think we don\u0027t use \u0027\\\u0027 for line continuations any more.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"                self._driver._clone_backing_by_copying(fake_volume,"},{"line_number":1172,"context_line":"                                                       fake_src_vmdk_path,"},{"line_number":1173,"context_line":"                                                       fake_size)"},{"line_number":1174,"context_line":"                self.assertTrue(_create_backing_in_inventory.called)"},{"line_number":1175,"context_line":"                self.assertTrue(get_vmdk_path.called)"},{"line_number":1176,"context_line":"                self.assertTrue(get_dc.called)"},{"line_number":1177,"context_line":"                self.assertTrue(delete_vmdk_file.called)"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGM%3D","line":1174,"updated":"2014-02-12 05:19:15.000000000","message":"use _create_backing_in_inventory.assert_called_once_with() instead for verifying args passed as well.\nThis comment for next 5 lines as well.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1870,"context_line":""},{"line_number":1871,"context_line":"    def test_extend_vmdk_virtual_disk(self):"},{"line_number":1872,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1873,"context_line":"        fake_backing \u003d FakeMor(\u0027VirtualMachine\u0027, \u0027my_back\u0027)"},{"line_number":1874,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""},{"line_number":1875,"context_line":"        fake_dc \u003d FakeMor(\u0027Datacenter\u0027, \u0027my_dc\u0027)"},{"line_number":1876,"context_line":"        fake_name \u003d \u0027fake_name\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGo%3D","line":1873,"updated":"2014-02-12 05:19:15.000000000","message":"use mock.sentinel.backing here.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1872,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1873,"context_line":"        fake_backing \u003d FakeMor(\u0027VirtualMachine\u0027, \u0027my_back\u0027)"},{"line_number":1874,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""},{"line_number":1875,"context_line":"        fake_dc \u003d FakeMor(\u0027Datacenter\u0027, \u0027my_dc\u0027)"},{"line_number":1876,"context_line":"        fake_name \u003d \u0027fake_name\u0027"},{"line_number":1877,"context_line":"        fake_size \u003d 7"},{"line_number":1878,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGk%3D","line":1875,"updated":"2014-02-12 05:19:15.000000000","message":"use mock.sentinel.datacenter here.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"        with mock.patch.object(self._driver.__class__, \u0027volumeops\u0027)\\"},{"line_number":1879,"context_line":"                as volumeops:"},{"line_number":1880,"context_line":"            volumeops.return_value \u003d self._volumeops"},{"line_number":1881,"context_line":"            with contextlib.nested("},{"line_number":1882,"context_line":"                mock.patch.object(self._driver.volumeops,"},{"line_number":1883,"context_line":"                                  \u0027get_backing\u0027),"},{"line_number":1884,"context_line":"                mock.patch.object(self._driver.volumeops,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmGw%3D","line":1881,"updated":"2014-02-12 05:19:15.000000000","message":"Use patch decorator instead?","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1919,"context_line":""},{"line_number":1920,"context_line":"    def test_volumeops_extend_virtual_disk(self):"},{"line_number":1921,"context_line":"        \"\"\"Test volumeops.extend_virtual_disk.\"\"\""},{"line_number":1922,"context_line":"        fake_task \u003d FakeMor(\u0027Task\u0027, \u0027my_task\u0027)"},{"line_number":1923,"context_line":"        fake_task_info \u003d FakeTaskInfo(\u0027success\u0027)"},{"line_number":1924,"context_line":"        fake_size \u003d 5"},{"line_number":1925,"context_line":"        fake_name \u003d \u0027fake_volume_0000000001\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmHA%3D","line":1922,"updated":"2014-02-12 05:19:15.000000000","message":"I am trying to get rid of the usage of Fake* classes when converting to mock. So could you kindly avoid them and use mock.sentinel or mock.Mock instead.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"3cbd5f54a65238fe89cf8554d585979eed9031e0","unresolved":false,"context_lines":[{"line_number":1939,"context_line":"            self._volumeops.extend_virtual_disk(fake_size,"},{"line_number":1940,"context_line":"                                                fake_name, fake_dc,"},{"line_number":1941,"context_line":"                                                eagerZero\u003dfake_eagerZero)"},{"line_number":1942,"context_line":"            self.assertTrue(invoke_api.called)"},{"line_number":1943,"context_line":"            self.assertTrue(wait_for_task.called)"},{"line_number":1944,"context_line":""},{"line_number":1945,"context_line":"    def test_volumeops_clone_backing(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAUX%2F%2FmG0%3D","line":1942,"updated":"2014-02-12 05:19:15.000000000","message":"You could use invoke_api.assert_called_once_with(). That way you can also assert the args that is passed for better testing.","commit_id":"0fe7da9bdd0b1fc6c3e94985e7265854f636672d"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"f0d0b7a71a14a1ce82dae3f1be6659e51680bcb5","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"    def test_clone_backing_by_copying(self, volumeops, create_backing,"},{"line_number":1142,"context_line":"                                      extend_virtual_disk):"},{"line_number":1143,"context_line":"        \"\"\"Test _clone_backing_by_copying.\"\"\""},{"line_number":1144,"context_line":"        fake_volume \u003d FakeObject()"},{"line_number":1145,"context_line":"        fake_volume[\u0027size\u0027] \u003d 2"},{"line_number":1146,"context_line":"        fake_volume[\u0027name\u0027] \u003d \u0027fake_volume-0000000000001\u0027"},{"line_number":1147,"context_line":"        fake_size \u003d 1"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Fkcc%3D","line":1144,"updated":"2014-02-12 09:42:46.000000000","message":"Please remove usage of FakeObject() as well. You can use \"fake_volume \u003d mock.MagicMock()\" in this case since you need to set its size and name.","commit_id":"138334ed013d3337d1487f512021021595c3f1a5"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"f0d0b7a71a14a1ce82dae3f1be6659e51680bcb5","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"        volumeops.get_dc.assert_called_once_with(fake_backing)"},{"line_number":1164,"context_line":"        volumeops.delete_vmdk_file.assert_called_once_with(fake_vmdk_path,"},{"line_number":1165,"context_line":"                                                           fake_dc)"},{"line_number":1166,"context_line":"        volumeops.copy_vmdk_file.\\"},{"line_number":1167,"context_line":"            assert_called_once_with(fake_dc, fake_src_vmdk_path,"},{"line_number":1168,"context_line":"                                    fake_vmdk_path)"},{"line_number":1169,"context_line":"        extend_virtual_disk.assert_called_once_with(fake_volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Fka0%3D","line":1166,"updated":"2014-02-12 09:42:46.000000000","message":"Do not use \u0027\\\u0027 for line continuation.","commit_id":"138334ed013d3337d1487f512021021595c3f1a5"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1135,"context_line":"                       \u0027_extend_vmdk_virtual_disk\u0027)"},{"line_number":1136,"context_line":"    @mock.patch.object(vmdk.VMwareEsxVmdkDriver,"},{"line_number":1137,"context_line":"                       \u0027_create_backing_in_inventory\u0027)"},{"line_number":1138,"context_line":"    @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.\u0027"},{"line_number":1139,"context_line":"                \u0027volumeops\u0027)"},{"line_number":1140,"context_line":"    def test_clone_backing_by_copying(self, volumeops, create_backing,"},{"line_number":1141,"context_line":"                                      extend_virtual_disk):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGy4%3D","line":1138,"updated":"2014-02-17 04:55:38.000000000","message":"Nit: You could change this one too to @mock.patch.object(\u0027vmdk.VMwareEsxVmdkDriver, \u0027volumeops\u0027) just to keep it consistent.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"        self.assertFalse(extend_virtual_disk.called)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"    @mock.patch.object(vmdk.VMwareEsxVmdkDriver, \u0027_clone_backing_by_copying\u0027)"},{"line_number":1179,"context_line":"    @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.\u0027"},{"line_number":1180,"context_line":"                \u0027volumeops\u0027)"},{"line_number":1181,"context_line":"    def test_create_cloned_volume_with_backing(self, volumeops,"},{"line_number":1182,"context_line":"                                               _clone_backing_by_copying):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGyo%3D","line":1179,"updated":"2014-02-17 04:55:38.000000000","message":"Nit: You could change this one too to @mock.patch.object(\u0027vmdk.VMwareEsxVmdkDriver, \u0027volumeops\u0027) just to keep it consistent.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"    @mock.patch.object(vmdk.VMwareEsxVmdkDriver, \u0027_clone_backing_by_copying\u0027)"},{"line_number":1179,"context_line":"    @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.\u0027"},{"line_number":1180,"context_line":"                \u0027volumeops\u0027)"},{"line_number":1181,"context_line":"    def test_create_cloned_volume_with_backing(self, volumeops,"},{"line_number":1182,"context_line":"                                               _clone_backing_by_copying):"},{"line_number":1183,"context_line":"        \"\"\"Test create_cloned_volume with a backing.\"\"\""},{"line_number":1184,"context_line":"        fake_volume \u003d {\u0027size\u0027: 2, \u0027name\u0027: \u0027fake_volume-0000000000001\u0027}"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGvE%3D","line":1181,"updated":"2014-02-17 04:55:38.000000000","message":"BTW, this test does not exercise \u0027extend\u0027. So you could have left it alone. Thanks for converting to mock anyway.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"        m.VerifyAll()"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"    @mock.patch.object(vmdk.VMwareEsxVmdkDriver, \u0027_clone_backing_by_copying\u0027)"},{"line_number":1238,"context_line":"    @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.\u0027"},{"line_number":1239,"context_line":"                \u0027volumeops\u0027)"},{"line_number":1240,"context_line":"    def test_create_volume_from_snapshot(self, volumeops,"},{"line_number":1241,"context_line":"                                         _clone_backing_by_copying):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGyM%3D","line":1238,"updated":"2014-02-17 04:55:38.000000000","message":"Nit: You could change this one too to @mock.patch.object(\u0027vmdk.VMwareEsxVmdkDriver, \u0027volumeops\u0027) just to keep it consistent.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"    @mock.patch.object(vmdk.VMwareEsxVmdkDriver, \u0027_clone_backing_by_copying\u0027)"},{"line_number":1238,"context_line":"    @mock.patch(\u0027cinder.volume.drivers.vmware.vmdk.VMwareEsxVmdkDriver.\u0027"},{"line_number":1239,"context_line":"                \u0027volumeops\u0027)"},{"line_number":1240,"context_line":"    def test_create_volume_from_snapshot(self, volumeops,"},{"line_number":1241,"context_line":"                                         _clone_backing_by_copying):"},{"line_number":1242,"context_line":"        \"\"\"Test create_volume_from_snapshot.\"\"\""},{"line_number":1243,"context_line":"        fake_volume \u003d {\u0027size\u0027: 2, \u0027name\u0027: \u0027fake_volume-0000000000001\u0027}"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGvA%3D","line":1240,"updated":"2014-02-17 04:55:38.000000000","message":"BTW, this test does not exercise \u0027extend\u0027. So you could have left it alone. Thanks for converting to mock anyway.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"    def _test_copy_image_to_volume_vmdk(self, volume_ops, session,"},{"line_number":1407,"context_line":"                                        _create_backing_in_inventory,"},{"line_number":1408,"context_line":"                                        _get_ds_name_flat_vmdk_path,"},{"line_number":1409,"context_line":"                                        _extend_vmdk_virtual_disk,"},{"line_number":1410,"context_line":"                                        fetch_flat_image):"},{"line_number":1411,"context_line":"        \"\"\"Test copy_image_to_volume with an acceptable vmdk disk format.\"\"\""},{"line_number":1412,"context_line":"        volumeops.return_value \u003d self._volumeops"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGsg%3D","line":1409,"updated":"2014-02-17 04:55:38.000000000","message":"_extend_vmdk_virtual_disk is not used? extend is not tested yet?","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1435,"context_line":"        _get_ds_name_flat_vmdk_path.return_value \u003d (datastore_name,"},{"line_number":1436,"context_line":"                                                    flat_vmdk_path)"},{"line_number":1437,"context_line":"        volume_ops.get_host.return_value \u003d fake_host"},{"line_number":1438,"context_line":"        \u0027\u0027\u0027volumeops.get_dc.return_value \u003d fake_datacenter"},{"line_number":1439,"context_line":"        volumeops.get_entity_name.return_value \u003d fake_datacenter_name"},{"line_number":1440,"context_line":"        volumeops.delete_file.return_value \u003d None\u0027\u0027\u0027"},{"line_number":1441,"context_line":"        self._driver.copy_image_to_volume(fake_context, fake_volume,"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGvw%3D","line":1438,"updated":"2014-02-17 04:55:38.000000000","message":"Please remove commented out source code - next 3 lines.","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1b6b38d8afff579c8f64177abb7346c55812af87","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"        self._driver.copy_image_to_volume(fake_context, fake_volume,"},{"line_number":1442,"context_line":"                                          image_service, fake_image_id)"},{"line_number":1443,"context_line":"        _create_backing_in_inventory.assert_called_with(fake_volume)"},{"line_number":1444,"context_line":"        \u0027\u0027\u0027host \u003d FakeMor(\u0027Host\u0027, \u0027my_host\u0027)"},{"line_number":1445,"context_line":"        m.StubOutWithMock(self._volumeops, \u0027get_host\u0027)"},{"line_number":1446,"context_line":"        self._volumeops.get_host(backing).AndReturn(host)"},{"line_number":1447,"context_line":"        datacenter \u003d FakeMor(\u0027Datacenter\u0027, \u0027my_datacenter\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FGvg%3D","line":1444,"updated":"2014-02-17 04:55:38.000000000","message":"Please remove commented out source code - until line #1475","commit_id":"d030f2a2b1c8c305a863e32ac42a10b6193da5c2"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1403,"context_line":"        image_service \u003d mock.Mock(glance.GlanceImageService)"},{"line_number":1404,"context_line":"        fake_size \u003d 3"},{"line_number":1405,"context_line":"        fake_volume \u003d {\u0027name\u0027: \u0027volume_name\u0027, \u0027size\u0027: fake_size}"},{"line_number":1406,"context_line":"        fake_backing \u003d mock.MagicMock()"},{"line_number":1407,"context_line":"        fake_datastore_name \u003d \u0027datastore1\u0027"},{"line_number":1408,"context_line":"        flat_vmdk_path \u003d \u0027myvolumes/myvm-flat.vmdk\u0027"},{"line_number":1409,"context_line":"        fake_host \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FE8s%3D","line":1406,"updated":"2014-02-17 11:14:16.000000000","message":"possible to use mock.sentinel.backing instead?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"        fake_backing \u003d mock.MagicMock()"},{"line_number":1407,"context_line":"        fake_datastore_name \u003d \u0027datastore1\u0027"},{"line_number":1408,"context_line":"        flat_vmdk_path \u003d \u0027myvolumes/myvm-flat.vmdk\u0027"},{"line_number":1409,"context_line":"        fake_host \u003d mock.MagicMock()"},{"line_number":1410,"context_line":"        fake_datacenter \u003d mock.sentinel.datacenter"},{"line_number":1411,"context_line":"        fake_datacenter_name \u003d mock.sentinel.datacenter_name"},{"line_number":1412,"context_line":"        flat_path \u003d \u0027[%s] %s\u0027 % (fake_datastore_name, flat_vmdk_path)"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FE8I%3D","line":1409,"updated":"2014-02-17 11:14:16.000000000","message":"possible to use mock.sentinel.host instead?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1409,"context_line":"        fake_host \u003d mock.MagicMock()"},{"line_number":1410,"context_line":"        fake_datacenter \u003d mock.sentinel.datacenter"},{"line_number":1411,"context_line":"        fake_datacenter_name \u003d mock.sentinel.datacenter_name"},{"line_number":1412,"context_line":"        flat_path \u003d \u0027[%s] %s\u0027 % (fake_datastore_name, flat_vmdk_path)"},{"line_number":1413,"context_line":"        timeout \u003d self._config.vmware_image_transfer_timeout_secs"},{"line_number":1414,"context_line":""},{"line_number":1415,"context_line":"        image_service.show.return_value \u003d fake_image_meta"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FESc%3D","line":1412,"updated":"2014-02-17 11:14:16.000000000","message":"unused variable?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"        volume_ops.get_dc.return_value \u003d fake_datacenter"},{"line_number":1421,"context_line":"        volume_ops.get_entity_name.return_value \u003d fake_datacenter_name"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"        # If the volume size is greater then than the image size,"},{"line_number":1424,"context_line":"        # _extend_vmdk_virtual_disk will be called."},{"line_number":1425,"context_line":"        self._driver.copy_image_to_volume(fake_context, fake_volume,"},{"line_number":1426,"context_line":"                                          image_service, fake_image_id)"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEPk%3D","line":1423,"updated":"2014-02-17 11:14:16.000000000","message":"If the volume size is greater than the image size,","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"                           \u0027properties\u0027: {\u0027vmware_disktype\u0027:"},{"line_number":1489,"context_line":"                                          \u0027streamOptimized\u0027}}"},{"line_number":1490,"context_line":"        image_service \u003d mock.Mock(glance.GlanceImageService)"},{"line_number":1491,"context_line":"        (fake_host, fake_rp, fake_folder, fake_summary) \u003d (mock.MagicMock(),"},{"line_number":1492,"context_line":"                                                           mock.MagicMock(),"},{"line_number":1493,"context_line":"                                                           mock.MagicMock(),"},{"line_number":1494,"context_line":"                                                           mock.MagicMock())"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEO4%3D","line":1491,"updated":"2014-02-17 11:14:16.000000000","message":"Could we use sentinels for all four here?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"                                                           mock.MagicMock(),"},{"line_number":1494,"context_line":"                                                           mock.MagicMock())"},{"line_number":1495,"context_line":"        fake_summary.name \u003d \"datastore-1\""},{"line_number":1496,"context_line":"        fake_vm_create_spec \u003d mock.MagicMock()"},{"line_number":1497,"context_line":"        fake_disk_type \u003d \u0027thin\u0027"},{"line_number":1498,"context_line":"        vol_name \u003d \u0027fake_volume name\u0027"},{"line_number":1499,"context_line":"        fake_volume \u003d {\u0027name\u0027: vol_name, \u0027size\u0027: fake_volume_size,"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FENM%3D","line":1496,"updated":"2014-02-17 11:14:16.000000000","message":"use sentinel instead?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1685,"context_line":"        m.VerifyAll()"},{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":1688,"context_line":"    def _test_extend_vmdk_virtual_disk(self, volume_ops):"},{"line_number":1689,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1690,"context_line":"        fake_backing \u003d mock.sentinel.backing"},{"line_number":1691,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FELE%3D","line":1688,"updated":"2014-02-17 11:14:16.000000000","message":"Why is this named \"_test_extend..\"? Can this test be enabled?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"843537bd8dec5565a958027a6f267b001c782c1f","unresolved":false,"context_lines":[{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":1688,"context_line":"    def _test_extend_vmdk_virtual_disk(self, volume_ops):"},{"line_number":1689,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1690,"context_line":"        fake_backing \u003d mock.sentinel.backing"},{"line_number":1691,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""},{"line_number":1692,"context_line":"        fake_dc \u003d mock.sentinel.datacenter"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FDyU%3D","line":1689,"updated":"2014-02-17 11:41:42.000000000","message":"+1 for removing the docstring","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":1688,"context_line":"    def _test_extend_vmdk_virtual_disk(self, volume_ops):"},{"line_number":1689,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1690,"context_line":"        fake_backing \u003d mock.sentinel.backing"},{"line_number":1691,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""},{"line_number":1692,"context_line":"        fake_dc \u003d mock.sentinel.datacenter"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEKw%3D","line":1689,"updated":"2014-02-17 11:14:16.000000000","message":"Nit: vmdk._extend_vmdk_virtual_disk. Note the underscore needed.","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"b052d1f5ebdd06473d0a1132982aff88d2027a81","unresolved":false,"context_lines":[{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":1688,"context_line":"    def _test_extend_vmdk_virtual_disk(self, volume_ops):"},{"line_number":1689,"context_line":"        \"\"\"Test vmdk.extend_vmdk_virtual_disk.\"\"\""},{"line_number":1690,"context_line":"        fake_backing \u003d mock.sentinel.backing"},{"line_number":1691,"context_line":"        fake_vmdk_path \u003d \"[datastore] dest_vm/dest_vm.vmdk\""},{"line_number":1692,"context_line":"        fake_dc \u003d mock.sentinel.datacenter"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FD0c%3D","line":1689,"in_reply_to":"AAAAUX%2F%2FEKw%3D","updated":"2014-02-17 11:38:22.000000000","message":"Actually there isn\u0027t any need for docstrings for tests,","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"                                                              fake_vmdk_path,"},{"line_number":1716,"context_line":"                                                              fake_dc)"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"        # Test the exce[tional case for extend_virtual_disk"},{"line_number":1719,"context_line":"        volume_ops.extend_virtual_disk.side_effect \u003d error_util.VimException("},{"line_number":1720,"context_line":"            \u0027VimException raised.\u0027)"},{"line_number":1721,"context_line":"        self.assertRaises(error_util.VimException,"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEJM%3D","line":1718,"updated":"2014-02-17 11:14:16.000000000","message":"Nit: spelling for \"exceptional\"","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":1980,"context_line":"        m.VerifyAll()"},{"line_number":1981,"context_line":""},{"line_number":1982,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":1983,"context_line":"    def test_clone_backing_linked(self, volume_ops):"},{"line_number":1984,"context_line":"        \"\"\"Test _clone_backing with clone type - linked.\"\"\""},{"line_number":1985,"context_line":"        fake_volume \u003d {\u0027volume_type_id\u0027: None, \u0027name\u0027: \u0027fake_name\u0027,"},{"line_number":1986,"context_line":"                       \u0027size\u0027: 2}"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEFg%3D","line":1983,"updated":"2014-02-17 11:14:16.000000000","message":"Pls cover the case where _extend_vmdk_virtual_disk is called.","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":2000,"context_line":""},{"line_number":2001,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027_select_datastore_summary\u0027)"},{"line_number":2002,"context_line":"    @mock.patch.object(VMDK_DRIVER, \u0027volumeops\u0027)"},{"line_number":2003,"context_line":"    def test_clone_backing_full(self, volume_ops, _select_datastore_summary):"},{"line_number":2004,"context_line":"        \"\"\"Test _clone_backing with clone type - full.\"\"\""},{"line_number":2005,"context_line":"        fake_host \u003d mock.sentinel.host"},{"line_number":2006,"context_line":"        fake_backing \u003d mock.sentinel.backing"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEFY%3D","line":2003,"updated":"2014-02-17 11:14:16.000000000","message":"Pls cover the case where _extend_vmdk_virtual_disk is called.","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":2007,"context_line":"        fake_datastore \u003d mock.sentinel.datastore"},{"line_number":2008,"context_line":"        fake_datastores \u003d [fake_datastore]"},{"line_number":2009,"context_line":"        fake_resource_pool \u003d mock.sentinel.resourcePool"},{"line_number":2010,"context_line":"        fake_summary \u003d mock.MagicMock()"},{"line_number":2011,"context_line":"        fake_summary.datastore \u003d fake_datastore"},{"line_number":2012,"context_line":"        fake_volume \u003d {\u0027volume_type_id\u0027: None, \u0027name\u0027: \u0027fake_name\u0027,"},{"line_number":2013,"context_line":"                       \u0027size\u0027: 2}"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEEg%3D","line":2010,"updated":"2014-02-17 11:14:16.000000000","message":"Can you use mock.Mock(spec\u003dobject) instead? That will avoid any unwanted false positives.","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                                         _get_clone_type):"},{"line_number":2040,"context_line":"        \"\"\"Test create_volume_from_snapshot.\"\"\""},{"line_number":2041,"context_line":"        fake_backing \u003d mock.sentinel.backing"},{"line_number":2042,"context_line":"        fake_src_vref \u003d {\u0027status\u0027: \u0027available\u0027,"},{"line_number":2043,"context_line":"                         \u0027name\u0027: \u0027src_vol_name\u0027, \u0027size\u0027: 1}"},{"line_number":2044,"context_line":"        fake_volume \u003d {\u0027volume_type_id\u0027: None, \u0027name\u0027: \u0027fake_name\u0027,"},{"line_number":2045,"context_line":"                       \u0027size\u0027: 2}"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEB4%3D","line":2042,"updated":"2014-02-17 11:14:16.000000000","message":"unused variable?","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"}],"cinder/volume/drivers/vmware/vmdk.py":[{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c6cc06c4f42637a5bdd9715c3e2c4e66069c7630","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        if src_vref.get(\u0027size\u0027, None):"},{"line_number":617,"context_line":"            src_size_in_gb \u003d src_vref[\u0027size\u0027]"},{"line_number":618,"context_line":"        else:"},{"line_number":619,"context_line":"            src_size_in_gb \u003d src_vref[\u0027volume_size\u0027]"},{"line_number":620,"context_line":"        self._clone_backing_by_copying(volume, src_vmdk_path,"},{"line_number":621,"context_line":"                                       src_size_in_gb)"},{"line_number":622,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FAeM%3D","line":619,"updated":"2014-01-19 10:57:25.000000000","message":"Why would the volume have \u0027volume_size\u0027 rather than \u0027size\u0027?","commit_id":"62770d47ce583bdba5d9eca301200108f0662978"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c6cc06c4f42637a5bdd9715c3e2c4e66069c7630","unresolved":false,"context_lines":[{"line_number":997,"context_line":"        \"\"\""},{"line_number":998,"context_line":"        datastore \u003d None"},{"line_number":999,"context_line":"        volume_size_in_gb \u003d volume[\u0027size\u0027]"},{"line_number":1000,"context_line":"        volume_name \u003d volume[\u0027name\u0027]"},{"line_number":1001,"context_line":"        if not clone_type \u003d\u003d volumeops.LINKED_CLONE_TYPE:"},{"line_number":1002,"context_line":"            # Pick a datastore where to create the full clone under same host"},{"line_number":1003,"context_line":"            host \u003d self.volumeops.get_host(backing)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FAdo%3D","line":1000,"updated":"2014-01-19 10:57:25.000000000","message":"These extra variables don\u0027t seem very useful","commit_id":"62770d47ce583bdba5d9eca301200108f0662978"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5241ed8de7e5b28bac4b778731b0ebc9fea99ac7","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        self._delete_snapshot(snapshot)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _clone_backing_by_copying(self, volume, src_vmdk_path,"},{"line_number":569,"context_line":"                                  src_size_in_gb\u003dNone):"},{"line_number":570,"context_line":"        \"\"\"Clones volume backing."},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        Creates a backing for the input volume and replaces its VMDK file"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2ByY%3D","line":569,"updated":"2014-01-20 06:11:49.000000000","message":"This logic is a bit confusing, I believe the intent is:\nAllow optional passing in the size of the source, and if it\u0027s passed in check whether or not we\u0027ve created a volume that\u0027s greater than the origin or not (and if not extend it).\n\nYou should at the very least add it to the param list in the docstring and give a clue of what you\u0027re aiming for here.  The comment in the logic below helps, but it\u0027s still kind of odd.  Why not just make this a mandatory parameter and always do the check automatically?\n\nNow that I look closer however you don\u0027t implement the use of this parameter anywhere that I can see so I\u0027m not sure what the point is at all?","commit_id":"9100b3f9b3aeaa67dcd3f6671bea59fe5b6f0c04"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"dce691414b5db3fd6478f75719bdb08ca6310dbb","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        self._delete_snapshot(snapshot)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _clone_backing_by_copying(self, volume, src_vmdk_path,"},{"line_number":569,"context_line":"                                  src_size_in_gb\u003dNone):"},{"line_number":570,"context_line":"        \"\"\"Clones volume backing."},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        Creates a backing for the input volume and replaces its VMDK file"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2Bps%3D","line":569,"in_reply_to":"AAAAUH%2F%2B%2ByY%3D","updated":"2014-01-20 06:55:57.000000000","message":"Line 617 self._clone_backing_by_copying(volume, src_vmdk_path,     src_vref[\u0027size\u0027]) and Line 656 self._clone_backing_by_copying(volume, src_vmdk_path, snapshot[\u0027volume_size\u0027]) are the two places calling this method.\nI make it a mandatory parameter and add more descriptions in the docstring.","commit_id":"9100b3f9b3aeaa67dcd3f6671bea59fe5b6f0c04"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5241ed8de7e5b28bac4b778731b0ebc9fea99ac7","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                     {\u0027svol\u0027: src_vref[\u0027name\u0027],"},{"line_number":613,"context_line":"                      \u0027vol\u0027: volume[\u0027name\u0027]})"},{"line_number":614,"context_line":"            return"},{"line_number":615,"context_line":"        src_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"},{"line_number":616,"context_line":"        if src_vref.get(\u0027size\u0027, None):"},{"line_number":617,"context_line":"            src_size_in_gb \u003d src_vref[\u0027size\u0027]"},{"line_number":618,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2B1k%3D","line":615,"updated":"2014-01-20 06:11:49.000000000","message":"The intent with the if/else below is to handle both cases of src_vref being a snapshot, or a \"volume\" correct?\n\nI\u0027m not sure this is necessary, since the clone_volume call explicitly sends a \"volume\" object as the src_vref parameter.","commit_id":"9100b3f9b3aeaa67dcd3f6671bea59fe5b6f0c04"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"dce691414b5db3fd6478f75719bdb08ca6310dbb","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                     {\u0027svol\u0027: src_vref[\u0027name\u0027],"},{"line_number":613,"context_line":"                      \u0027vol\u0027: volume[\u0027name\u0027]})"},{"line_number":614,"context_line":"            return"},{"line_number":615,"context_line":"        src_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"},{"line_number":616,"context_line":"        if src_vref.get(\u0027size\u0027, None):"},{"line_number":617,"context_line":"            src_size_in_gb \u003d src_vref[\u0027size\u0027]"},{"line_number":618,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2BrI%3D","line":615,"in_reply_to":"AAAAUH%2F%2B%2B1k%3D","updated":"2014-01-20 06:55:57.000000000","message":"Thanks. It should be removed in this patch. This is the old code I have not removed.\nAnd I verified that src_vref is a volume for sure, taking src_vref[\u0027size\u0027] is enough.","commit_id":"9100b3f9b3aeaa67dcd3f6671bea59fe5b6f0c04"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5241ed8de7e5b28bac4b778731b0ebc9fea99ac7","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        if src_vref.get(\u0027size\u0027, None):"},{"line_number":617,"context_line":"            src_size_in_gb \u003d src_vref[\u0027size\u0027]"},{"line_number":618,"context_line":"        else:"},{"line_number":619,"context_line":"            src_size_in_gb \u003d src_vref[\u0027volume_size\u0027]"},{"line_number":620,"context_line":"        self._clone_backing_by_copying(volume, src_vmdk_path,"},{"line_number":621,"context_line":"                                       src_vref[\u0027size\u0027])"},{"line_number":622,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2B1c%3D","line":619,"updated":"2014-01-20 06:11:49.000000000","message":"You\u0027re not using the logic that you implemented above here anyway.","commit_id":"9100b3f9b3aeaa67dcd3f6671bea59fe5b6f0c04"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8cd2ce2f660c06d6992adfba09ab7211126dee06","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        snapshot_moref \u003d self.volumeops.get_snapshot(backing,"},{"line_number":654,"context_line":"                                                     snapshot[\u0027name\u0027])"},{"line_number":655,"context_line":"        if not snapshot_moref:"},{"line_number":656,"context_line":"            LOG.exception(_(\"There is no snapshot point for the snapshoted \""},{"line_number":657,"context_line":"                            \"volume: %(snap)s. Not creating any backing \""},{"line_number":658,"context_line":"                            \"for the volume: %(vol)s.\") %"},{"line_number":659,"context_line":"                          {\u0027snap\u0027: snapshot[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bz%2FU%3D","line":656,"updated":"2014-01-21 20:55:25.000000000","message":"typo:  snapshoted -\u003e snapshotted","commit_id":"3375b14bde2d3b06ff745b36c108122b62476311"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8cd2ce2f660c06d6992adfba09ab7211126dee06","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"        \"\"\""},{"line_number":1034,"context_line":"        backing \u003d self.volumeops.get_backing(snapshot[\u0027volume_name\u0027])"},{"line_number":1035,"context_line":"        if not backing:"},{"line_number":1036,"context_line":"            LOG.exception(_(\"There is no backing for the snapshoted volume: \""},{"line_number":1037,"context_line":"                            \"%(snap)s. Not creating any backing for the \""},{"line_number":1038,"context_line":"                            \"volume: %(vol)s.\") %"},{"line_number":1039,"context_line":"                          {\u0027snap\u0027: snapshot[\u0027name\u0027], \u0027vol\u0027: volume[\u0027name\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bz%2B4%3D","line":1036,"updated":"2014-01-21 20:55:25.000000000","message":"typo:  snapshoted -\u003e snapshotted","commit_id":"3375b14bde2d3b06ff745b36c108122b62476311"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8cd2ce2f660c06d6992adfba09ab7211126dee06","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        snapshot_moref \u003d self.volumeops.get_snapshot(backing,"},{"line_number":1042,"context_line":"                                                     snapshot[\u0027name\u0027])"},{"line_number":1043,"context_line":"        if not snapshot_moref:"},{"line_number":1044,"context_line":"            LOG.exception(_(\"There is no snapshot point for the snapshoted \""},{"line_number":1045,"context_line":"                            \"volume: %(snap)s. Not creating any backing for \""},{"line_number":1046,"context_line":"                            \"the volume: %(vol)s.\") %"},{"line_number":1047,"context_line":"                          {\u0027snap\u0027: snapshot[\u0027name\u0027], \u0027vol\u0027: volume[\u0027name\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bz%2Bo%3D","line":1044,"updated":"2014-01-21 20:55:25.000000000","message":"typo:  snapshoted -\u003e snapshotted","commit_id":"3375b14bde2d3b06ff745b36c108122b62476311"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"ffd4a691ba84ea1bce22bd28fc030846c7225e14","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        if not backing:"},{"line_number":219,"context_line":"            LOG.exception(_(\"Backing not available, no operation to \""},{"line_number":220,"context_line":"                            \"be performed.\"))"},{"line_number":221,"context_line":"            raise exception.VolumeNotFound(volume_id\u003dvolume[\u0027name\u0027])"},{"line_number":222,"context_line":"        self.volumeops.delete_backing(backing)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BsXc%3D","line":221,"updated":"2014-01-23 05:13:53.000000000","message":"Raising an exception here is wrong. It would cause the volume to move to \u0027error\u0027 state. Note that this driver lazy creates the backing for a volume only during attach time. Since the backing is not yet created for this volume it is correct to probably log an info message and return, so that the delete is successful.","commit_id":"637611e588dcec4b5790713e22884c06923255db"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"ffd4a691ba84ea1bce22bd28fc030846c7225e14","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        if not backing:"},{"line_number":524,"context_line":"            LOG.exception(_(\"There is no backing, so will not create \""},{"line_number":525,"context_line":"                            \"snapshot: %s.\") % snapshot[\u0027name\u0027])"},{"line_number":526,"context_line":"            raise exception.VolumeNotFound(volume_id\u003dsnapshot[\u0027volume_name\u0027])"},{"line_number":527,"context_line":"        self.volumeops.create_snapshot(backing, snapshot[\u0027name\u0027],"},{"line_number":528,"context_line":"                                       snapshot[\u0027display_description\u0027])"},{"line_number":529,"context_line":"        LOG.info(_(\"Successfully created snapshot: %s.\") % snapshot[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BsXA%3D","line":526,"updated":"2014-01-23 05:13:53.000000000","message":"For the same reason as above do not raise an exception here. It will lead the snapshot operation to fail. Since the backing is lazy created, the backing\u0027s initial state and the snapshot state are trivially the same. Therefore we are right to say that the snapshot of the volume is successful. So logging an info and returning should be fine here too.","commit_id":"637611e588dcec4b5790713e22884c06923255db"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"ffd4a691ba84ea1bce22bd28fc030846c7225e14","unresolved":false,"context_lines":[{"line_number":554,"context_line":"        if not backing:"},{"line_number":555,"context_line":"            LOG.exception(_(\"There is no backing, and so there is no \""},{"line_number":556,"context_line":"                            \"snapshot: %s.\") % snapshot[\u0027name\u0027])"},{"line_number":557,"context_line":"            raise exception.SnapshotNotFound(snapshot_id\u003dsnapshot[\u0027name\u0027])"},{"line_number":558,"context_line":"        else:"},{"line_number":559,"context_line":"            self.volumeops.delete_snapshot(backing, snapshot[\u0027name\u0027])"},{"line_number":560,"context_line":"            LOG.info(_(\"Successfully deleted snapshot: %s.\") %"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BsWs%3D","line":557,"updated":"2014-01-23 05:13:53.000000000","message":"For the same reason as above please revert here and all other places below where you are raising an exception when the backing is not found.","commit_id":"637611e588dcec4b5790713e22884c06923255db"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"aa34871e5a9afa685000e6b3acbf2c99f2af0c0e","unresolved":false,"context_lines":[{"line_number":805,"context_line":"        LOG.info(_(\"Done copying image: %(id)s to volume: %(vol)s.\") %"},{"line_number":806,"context_line":"                 {\u0027id\u0027: image_id, \u0027vol\u0027: volume[\u0027name\u0027]})"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"    def _resize_volume(self, name, new_size_in_gb):"},{"line_number":809,"context_line":"        \"\"\"Extend the size of the volume to the new size."},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        :param name: the name of the volume"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Bkas%3D","line":808,"updated":"2014-01-24 10:13:01.000000000","message":"nit: calling this _extend_volume could be more appropriate since you are assuming that new_size_in_gb is always more than its current size. Also you are invoking the \"ExtendVirtualDisk_Task\" on the backend.","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d5e3587ee3502c169cde933cc26eaa0102f4e688","unresolved":false,"context_lines":[{"line_number":805,"context_line":"        LOG.info(_(\"Done copying image: %(id)s to volume: %(vol)s.\") %"},{"line_number":806,"context_line":"                 {\u0027id\u0027: image_id, \u0027vol\u0027: volume[\u0027name\u0027]})"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"    def _resize_volume(self, name, new_size_in_gb):"},{"line_number":809,"context_line":"        \"\"\"Extend the size of the volume to the new size."},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        :param name: the name of the volume"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Ba1o%3D","line":808,"in_reply_to":"AAAAUH%2F%2Bkas%3D","updated":"2014-01-27 04:32:33.000000000","message":"Done","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"aa34871e5a9afa685000e6b3acbf2c99f2af0c0e","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"        # we need to extend/resize the capacity from the snapshot size"},{"line_number":1016,"context_line":"        # to the volume size."},{"line_number":1017,"context_line":"        if snapshot and volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027]:"},{"line_number":1018,"context_line":"            self._resize_volume(volume[\u0027name\u0027], volume[\u0027size\u0027])"},{"line_number":1019,"context_line":"        LOG.info(_(\"Successfully created clone: %s.\") % clone)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    def _create_volume_from_snapshot(self, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Bkp8%3D","line":1018,"updated":"2014-01-24 10:13:01.000000000","message":"This comparision cannot work. snapshot is a VIM moref object being passed here. So snapshot[\u0027volume_size\u0027] is not correct.\n\nTo do this right you need to compare against the source volume\u0027s/snapshot\u0027s size. For example, in the case of call from _create_cloned_volume() this needs to be compared against src_vref[\u0027size\u0027] from that method.","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"bb566e763c2ac726d5c03469e49c7c6d829dd761","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"        # we need to extend/resize the capacity from the snapshot size"},{"line_number":1016,"context_line":"        # to the volume size."},{"line_number":1017,"context_line":"        if snapshot and volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027]:"},{"line_number":1018,"context_line":"            self._resize_volume(volume[\u0027name\u0027], volume[\u0027size\u0027])"},{"line_number":1019,"context_line":"        LOG.info(_(\"Successfully created clone: %s.\") % clone)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    def _create_volume_from_snapshot(self, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Ba2Q%3D","line":1018,"in_reply_to":"AAAAUH%2F%2Bkp8%3D","updated":"2014-01-27 04:31:02.000000000","message":"I will add one more parameter source_volume_size for this _clone_backing(). When creating a volume from snapshot, set this parameter to snapshot[\u0027volume_size\u0027]; When creating a cloned volume, set this parameter to src_vref[\u0027size\u0027].","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8cd33f3cebe0af0a8be5f283626e8bcc28dc8419","unresolved":false,"context_lines":[{"line_number":813,"context_line":"        \"\"\""},{"line_number":814,"context_line":"        backing \u003d self.volumeops.get_backing(name)"},{"line_number":815,"context_line":"        if not backing:"},{"line_number":816,"context_line":"            LOG.info(_(\"The backing is not found, so there is no need\""},{"line_number":817,"context_line":"                       \"to extend the volume %s.\") % name)"},{"line_number":818,"context_line":"        else:"},{"line_number":819,"context_line":"            root_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9cN4%3D","line":816,"updated":"2014-02-06 21:55:36.000000000","message":"Missing space at the end of this line.","commit_id":"b05c7cfe09dacb5599d4dbf042e697d3fb197417"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c11de7c8296451fef1a553c458725264901a386","unresolved":false,"context_lines":[{"line_number":813,"context_line":"        \"\"\""},{"line_number":814,"context_line":"        backing \u003d self.volumeops.get_backing(name)"},{"line_number":815,"context_line":"        if not backing:"},{"line_number":816,"context_line":"            LOG.info(_(\"The backing is not found, so there is no need\""},{"line_number":817,"context_line":"                       \"to extend the volume %s.\") % name)"},{"line_number":818,"context_line":"        else:"},{"line_number":819,"context_line":"            root_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9asA%3D","line":816,"in_reply_to":"AAAAUH%2F9cN4%3D","updated":"2014-02-07 02:15:39.000000000","message":"Done","commit_id":"b05c7cfe09dacb5599d4dbf042e697d3fb197417"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"9aa506179ee3f6b383e96a7f3309c56166a9d386","unresolved":false,"context_lines":[{"line_number":826,"context_line":"                LOG.error(_(\u0027Could not extend the volume size.\u0027))"},{"line_number":827,"context_line":"                message \u003d (_(\"Unable to extend the size of the \""},{"line_number":828,"context_line":"                             \"vmdk virtual disk for volume %s.\") % name)"},{"line_number":829,"context_line":"                raise exception.VolumeBackendAPIException(data\u003dmessage)"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":"    def copy_image_to_volume(self, context, volume, image_service, image_id):"},{"line_number":832,"context_line":"        \"\"\"Creates volume from image."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F3T8%3D","line":829,"updated":"2014-02-10 10:41:28.000000000","message":"you could instead simply re-raise the same VimException here. That will keep the base exception raised from vmdk driver the same.","commit_id":"96bcc0b08d5ae46ff1a14c37a958e75630c63409"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3aaca56940c25a0ed0f57e15af2b6bb9f55ba29c","unresolved":false,"context_lines":[{"line_number":826,"context_line":"                LOG.error(_(\u0027Could not extend the volume size.\u0027))"},{"line_number":827,"context_line":"                message \u003d (_(\"Unable to extend the size of the \""},{"line_number":828,"context_line":"                             \"vmdk virtual disk for volume %s.\") % name)"},{"line_number":829,"context_line":"                raise exception.VolumeBackendAPIException(data\u003dmessage)"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":"    def copy_image_to_volume(self, context, volume, image_service, image_id):"},{"line_number":832,"context_line":"        \"\"\"Creates volume from image."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FwBg%3D","line":829,"in_reply_to":"AAAAUX%2F%2F3T8%3D","updated":"2014-02-11 02:31:03.000000000","message":"Done","commit_id":"96bcc0b08d5ae46ff1a14c37a958e75630c63409"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"c376a9eba89b6e32dbc74efc83fc19a372ecd726","unresolved":false,"context_lines":[{"line_number":805,"context_line":"        LOG.info(_(\"Done copying image: %(id)s to volume: %(vol)s.\") %"},{"line_number":806,"context_line":"                 {\u0027id\u0027: image_id, \u0027vol\u0027: volume[\u0027name\u0027]})"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"    def _extend_vmdk_virtual_disk(self, name, new_size_in_gb):"},{"line_number":809,"context_line":"        \"\"\"Extend the size of the vmdk virtual disk to the new size."},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        :param name: the name of the volume"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2Fvws%3D","line":808,"updated":"2014-02-11 03:38:39.000000000","message":"Please add a unit test for this method.","commit_id":"6e97ca9bcbfbdc011d8fb649b559e318e0a53eeb"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        \"\"\""},{"line_number":566,"context_line":"        self._delete_snapshot(snapshot)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _clone_backing_by_copying(self, volume, src_vmdk_path,"},{"line_number":569,"context_line":"                                  src_size_in_gb):"},{"line_number":570,"context_line":"        \"\"\"Clones volume backing."},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2BxTc%3D","line":568,"updated":"2014-02-19 11:06:56.000000000","message":"Is _create_backing_by_cloning or _create_backing_by_copying a better name?","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"        # Create a backing"},{"line_number":585,"context_line":"        backing \u003d self._create_backing_in_inventory(volume)"},{"line_number":586,"context_line":"        new_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"},{"line_number":587,"context_line":"        datacenter \u003d self.volumeops.get_dc(backing)"},{"line_number":588,"context_line":"        # Deleting the current VMDK file"},{"line_number":589,"context_line":"        self.volumeops.delete_vmdk_file(new_vmdk_path, datacenter)"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2BxPY%3D","line":586,"updated":"2014-02-19 11:06:56.000000000","message":"dest_vmdk_path?","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # volume/snapshot, we need to resize/extend the size of the"},{"line_number":594,"context_line":"        # vmdk virtual disk to the value specified by the user."},{"line_number":595,"context_line":"        if volume[\u0027size\u0027] \u003e src_size_in_gb:"},{"line_number":596,"context_line":"            self._extend_vmdk_virtual_disk(volume[\u0027name\u0027], volume[\u0027size\u0027])"},{"line_number":597,"context_line":"        LOG.info(_(\"Successfully cloned new backing: %(back)s from \""},{"line_number":598,"context_line":"                   \"source VMDK file: %(vmdk)s.\") %"},{"line_number":599,"context_line":"                 {\u0027back\u0027: backing, \u0027vmdk\u0027: src_vmdk_path})"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2Bv3g%3D","line":596,"updated":"2014-02-19 11:06:56.000000000","message":"Can we pass the vmdk path instead of figuring it out in _extend_vmdk_virtual_disk?","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":815,"context_line":"        if not backing:"},{"line_number":816,"context_line":"            LOG.info(_(\"The backing is not found, so there is no need \""},{"line_number":817,"context_line":"                       \"to extend the vmdk virtual disk for the volume \""},{"line_number":818,"context_line":"                       \"%s.\") % name)"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            root_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"},{"line_number":821,"context_line":"            datacenter \u003d self.volumeops.get_dc(backing)"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2Bv28%3D","line":818,"updated":"2014-02-19 11:06:56.000000000","message":", instead of %; similar change in other places as well.","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            root_vmdk_path \u003d self.volumeops.get_vmdk_path(backing)"},{"line_number":821,"context_line":"            datacenter \u003d self.volumeops.get_dc(backing)"},{"line_number":822,"context_line":"            try:"},{"line_number":823,"context_line":"                self.volumeops.extend_virtual_disk(new_size_in_gb,"},{"line_number":824,"context_line":"                                                   root_vmdk_path, datacenter)"},{"line_number":825,"context_line":"            except error_util.VimException as excep:"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2Bvz4%3D","line":822,"updated":"2014-02-19 11:06:56.000000000","message":"822-828 can be moved to another method (with input vmdk path and datacenter) which can be called from _clone_backing_by_copying.","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":823,"context_line":"                self.volumeops.extend_virtual_disk(new_size_in_gb,"},{"line_number":824,"context_line":"                                                   root_vmdk_path, datacenter)"},{"line_number":825,"context_line":"            except error_util.VimException as excep:"},{"line_number":826,"context_line":"                LOG.error(_(\"Unable to extend the size of the \""},{"line_number":827,"context_line":"                            \"vmdk virtual disk for volume %s.\") % name)"},{"line_number":828,"context_line":"                raise excep"},{"line_number":829,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2Bvzw%3D","line":826,"updated":"2014-02-19 11:06:56.000000000","message":"what about logging the exception using LOG.exception?\nAlso, consider adding vmdk/backing details as well.","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":6094,"name":"Navneet Singh","email":"navsinghnitd@gmail.com","username":"singn"},"change_message_id":"780e62770f43adbab2a296c0fd4db7822de82d5c","unresolved":false,"context_lines":[{"line_number":836,"context_line":"            self.volumeops.extend_virtual_disk(new_size_in_gb,"},{"line_number":837,"context_line":"                                               root_vmdk_path, datacenter)"},{"line_number":838,"context_line":"        except error_util.VimException as excep:"},{"line_number":839,"context_line":"            LOG.exception(_(\"Unable to extend the size of the \""},{"line_number":840,"context_line":"                            \"vmdk virtual disk at the path %s.\"),"},{"line_number":841,"context_line":"                          root_vmdk_path)"},{"line_number":842,"context_line":"            raise excep"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2Fgs4%3D","line":839,"updated":"2014-02-26 07:52:04.000000000","message":"Use with excutils.save_and_reraise_exception():","commit_id":"3e3b0ca9aed8b8f9a0d974e8c5ca219a514947e6"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"e900dda19d9870506d7b9f34a36ff7924ca148b3","unresolved":false,"context_lines":[{"line_number":836,"context_line":"            self.volumeops.extend_virtual_disk(new_size_in_gb,"},{"line_number":837,"context_line":"                                               root_vmdk_path, datacenter)"},{"line_number":838,"context_line":"        except error_util.VimException as excep:"},{"line_number":839,"context_line":"            LOG.exception(_(\"Unable to extend the size of the \""},{"line_number":840,"context_line":"                            \"vmdk virtual disk at the path %s.\"),"},{"line_number":841,"context_line":"                          root_vmdk_path)"},{"line_number":842,"context_line":"            raise excep"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAVX%2F%2F0n8%3D","line":839,"in_reply_to":"AAAAU3%2F%2Fgs4%3D","updated":"2014-02-28 02:27:31.000000000","message":"Thank you, Navneet.","commit_id":"3e3b0ca9aed8b8f9a0d974e8c5ca219a514947e6"}],"cinder/volume/drivers/vmware/volumeops.py":[{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"aa34871e5a9afa685000e6b3acbf2c99f2af0c0e","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        is zeroed out"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        diskMgr \u003d self._session.vim.service_content.virtualDiskManager"},{"line_number":329,"context_line":"        LOG.debug(_(\"Extending root virtual disk to %s\"), requested_size_in_gb)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        # VMWare API needs the capacity unit to be in KB, so convert the"},{"line_number":332,"context_line":"        # capacity unit from GB to KB."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BkZM%3D","line":329,"updated":"2014-01-24 10:13:01.000000000","message":"nit: \"Extending volume %(name)s to %(size)s GB.\"","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d0796dd0fd5b7a51ef97280f8f4e2b0eb79fc65d","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        is zeroed out"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        diskMgr \u003d self._session.vim.service_content.virtualDiskManager"},{"line_number":329,"context_line":"        LOG.debug(_(\"Extending root virtual disk to %s\"), requested_size_in_gb)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        # VMWare API needs the capacity unit to be in KB, so convert the"},{"line_number":332,"context_line":"        # capacity unit from GB to KB."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Ba2A%3D","line":329,"in_reply_to":"AAAAUH%2F%2BkZM%3D","updated":"2014-01-27 04:31:44.000000000","message":"Done","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"aa34871e5a9afa685000e6b3acbf2c99f2af0c0e","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                        newCapacityKb\u003dsize_in_kb,"},{"line_number":340,"context_line":"                                        eagerZero\u003deagerZero)"},{"line_number":341,"context_line":"        self._session.wait_for_task(task)"},{"line_number":342,"context_line":"        LOG.info(_(\"Successfully extended the disk at: %(name)s.\") %"},{"line_number":343,"context_line":"                 {\u0027name\u0027: name})"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def _get_create_spec(self, name, size_kb, disk_type, ds_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BkZk%3D","line":342,"updated":"2014-01-24 10:13:01.000000000","message":"nit: \"Successfully extended the volume %(name)s to %(size)s GB.\"","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d0796dd0fd5b7a51ef97280f8f4e2b0eb79fc65d","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                        newCapacityKb\u003dsize_in_kb,"},{"line_number":340,"context_line":"                                        eagerZero\u003deagerZero)"},{"line_number":341,"context_line":"        self._session.wait_for_task(task)"},{"line_number":342,"context_line":"        LOG.info(_(\"Successfully extended the disk at: %(name)s.\") %"},{"line_number":343,"context_line":"                 {\u0027name\u0027: name})"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def _get_create_spec(self, name, size_kb, disk_type, ds_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Ba18%3D","line":342,"in_reply_to":"AAAAUH%2F%2BkZk%3D","updated":"2014-01-27 04:31:44.000000000","message":"Done","commit_id":"ad5d44b41c0a749e160a48dfe1313352aaae7c2a"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"c376a9eba89b6e32dbc74efc83fc19a372ecd726","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        LOG.debug(_(\"Created child folder: %s.\") % child_folder)"},{"line_number":316,"context_line":"        return child_folder"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def extend_virtual_disk(self, requested_size_in_gb, name, dc_ref,"},{"line_number":319,"context_line":"                            eagerZero\u003dFalse):"},{"line_number":320,"context_line":"        \"\"\"Extend the virtual disk to the requested size."},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2Fvts%3D","line":318,"updated":"2014-02-11 03:38:39.000000000","message":"Please add a unit test for this method.","commit_id":"6e97ca9bcbfbdc011d8fb649b559e318e0a53eeb"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"c376a9eba89b6e32dbc74efc83fc19a372ecd726","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        is zeroed out"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        diskMgr \u003d self._session.vim.service_content.virtualDiskManager"},{"line_number":329,"context_line":"        LOG.debug(_(\"Extending the volume %(name)s to %(size)s GB.\") %"},{"line_number":330,"context_line":"                  {\u0027name\u0027: name, \u0027size\u0027: requested_size_in_gb})"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        # VMWare API needs the capacity unit to be in KB, so convert the"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FvtQ%3D","line":329,"updated":"2014-02-11 03:38:39.000000000","message":"Please move this log stmt above as the first line.","commit_id":"6e97ca9bcbfbdc011d8fb649b559e318e0a53eeb"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"44eeb00ca10372e70f76081c7ff9a9d4acced9a0","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        return child_folder"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def extend_virtual_disk(self, requested_size_in_gb, name, dc_ref,"},{"line_number":319,"context_line":"                            eagerZero\u003dFalse):"},{"line_number":320,"context_line":"        \"\"\"Extend the virtual disk to the requested size."},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        :param requested_size_in_gb: Size of the volume in GB"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2FEAY%3D","line":319,"updated":"2014-02-17 11:14:16.000000000","message":"Nit: rename to eager_zero","commit_id":"4b6601995421a5fb9130a59f6540517acef2b18a"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        :param eager_zero: Boolean determining if the free space"},{"line_number":326,"context_line":"        is zeroed out"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        LOG.debug(_(\"Extending the volume %(name)s to %(size)s GB.\") %"},{"line_number":329,"context_line":"                  {\u0027name\u0027: name, \u0027size\u0027: requested_size_in_gb})"},{"line_number":330,"context_line":"        diskMgr \u003d self._session.vim.service_content.virtualDiskManager"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2BvvI%3D","line":328,"updated":"2014-02-19 11:06:56.000000000","message":", instead of %","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5cda476d6fd9a3cd6bbc37357d82d821ba8c3529","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        eagerZero\u003deager_zero)"},{"line_number":342,"context_line":"        self._session.wait_for_task(task)"},{"line_number":343,"context_line":"        LOG.info(_(\"Successfully extended the volume %(name)s to \""},{"line_number":344,"context_line":"                   \"%(size)s GB.\") %"},{"line_number":345,"context_line":"                 {\u0027name\u0027: name, \u0027size\u0027: requested_size_in_gb})"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def _get_create_spec(self, name, size_kb, disk_type, ds_name):"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2Bvuw%3D","line":344,"updated":"2014-02-19 11:06:56.000000000","message":", instead of %","commit_id":"2e060ef8418eb18d5ad562337db39e94f53f7004"}]}
