)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33cae0797df0e6ef1c121bf690025631f63661b9","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This is part of the blueprint vmware-image-cache-management."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The patch set also solves the following bugs:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-bug: 1230047"},{"line_number":17,"context_line":"Closes-bug: 1254128"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"AAAAUX%2F%2B9hE%3D","line":14,"updated":"2014-02-18 00:19:45.000000000","message":"How? It looks like you\u0027re just moving code around (which looks only mildly more organized than what you have now). If it really fixes bugs, It would be nice to know why.","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0bd6777a327e52b34bab0429c7415dffbb58febf","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This is part of the blueprint vmware-image-cache-management."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The patch set also solves the following bugs:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-bug: 1230047"},{"line_number":17,"context_line":"Closes-bug: 1254128"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"AAAAUX%2F%2B68w%3D","line":14,"in_reply_to":"AAAAUX%2F%2B9hE%3D","updated":"2014-02-18 07:37:03.000000000","message":"I will update the commit message to indicate how these bugs have been addressed. In the past the remote message would be invoked. If there was a race a exception would be thrown. We now catch the specific exceptions.","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"860fc457c1d50e9bd06fa6a9b7c3b0e787fb4a01","unresolved":false,"context_lines":[{"line_number":16,"context_line":"making the driver _poll_task return the task information."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The patch set also solves the following bugs by checking if"},{"line_number":19,"context_line":"the FileAlreadyExistsException exception is raised. The could be"},{"line_number":20,"context_line":"due to another process or thread creating the file."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: 1230047"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"AAAAUX%2F%2B6Y8%3D","line":19,"updated":"2014-02-18 08:50:04.000000000","message":"s/The could be/This could be/","commit_id":"193410443e39cb951076af040da22be890632d96"}],"nova/tests/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        vmwareapi_fake.cleanup()"},{"line_number":275,"context_line":"        nova.tests.image.fake.FakeImageService_reset()"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_task_info_retries(self):"},{"line_number":278,"context_line":"        tc \u003d vmwareapi_fake.create_task"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        def _fake_create_task(task_name, state\u003d\"running\", result\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wSw%3D","line":277,"updated":"2014-02-04 11:20:15.000000000","message":"Only required if _task_info_state_get() is required, which I\u0027m not convinced of.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        vmwareapi_fake.cleanup()"},{"line_number":275,"context_line":"        nova.tests.image.fake.FakeImageService_reset()"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_task_info_retries(self):"},{"line_number":278,"context_line":"        tc \u003d vmwareapi_fake.create_task"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        def _fake_create_task(task_name, state\u003d\"running\", result\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9qL0%3D","line":277,"in_reply_to":"AAAAUH%2F9wSw%3D","updated":"2014-02-05 10:28:03.000000000","message":"Done","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"}],"nova/tests/virt/vmwareapi/test_ds_util.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                               fake_call_method):"},{"line_number":161,"context_line":"            ds_util.mkdir(self.session, \u0027fake-path\u0027, \u0027fake-dc-ref\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def test_task_info_state_get(self):"},{"line_number":164,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":165,"context_line":"            self.assertEqual(\u0027get_dynamic_property\u0027, method)"},{"line_number":166,"context_line":"            if not self.incomplete:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wLc%3D","line":163,"updated":"2014-02-04 11:20:15.000000000","message":"Don\u0027t think the function under test is required.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                               fake_call_method):"},{"line_number":161,"context_line":"            ds_util.mkdir(self.session, \u0027fake-path\u0027, \u0027fake-dc-ref\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def test_task_info_state_get(self):"},{"line_number":164,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":165,"context_line":"            self.assertEqual(\u0027get_dynamic_property\u0027, method)"},{"line_number":166,"context_line":"            if not self.incomplete:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9qK0%3D","line":163,"in_reply_to":"AAAAUH%2F9wLc%3D","updated":"2014-02-05 10:28:03.000000000","message":"Done","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"5a3e34bb0fc582dc614cc844306874b7d5e7e3c1","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":199,"context_line":"                               fake_call_method):"},{"line_number":200,"context_line":"            task, file \u003d ds_util.file_exists(self.session, \u0027fake-browser\u0027,"},{"line_number":201,"context_line":"                                             \u0027fake-path\u0027, \u0027fake-file\u0027)"},{"line_number":202,"context_line":"            self.assertTrue(task)"},{"line_number":203,"context_line":"            self.assertTrue(file)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9YgM%3D","line":200,"updated":"2014-02-07 10:16:52.000000000","message":"nit: it may be clearer to rename \"task, file\" to \"dir_exists, file_exists\"","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"5a3e34bb0fc582dc614cc844306874b7d5e7e3c1","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":222,"context_line":"                               fake_call_method):"},{"line_number":223,"context_line":"            task, file \u003d ds_util.file_exists(self.session, \u0027fake-browser\u0027,"},{"line_number":224,"context_line":"                                             \u0027fake-path\u0027, \u0027fake-file\u0027)"},{"line_number":225,"context_line":"            self.assertFalse(task)"},{"line_number":226,"context_line":"            self.assertFalse(file)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9YgE%3D","line":223,"updated":"2014-02-07 10:16:52.000000000","message":"nit: it may be clearer to rename \"task, file\" to \"dir_exists, file_exists\"","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"fee0d6a7e1a5be2fa3dc9dc16ce94f7078b3bf8e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.virt.vmwareapi import fake"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class fake_session(object):"},{"line_number":25,"context_line":"    def __init__(self, ret\u003dNone):"},{"line_number":26,"context_line":"        self.ret \u003d ret"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FQDI%3D","line":24,"updated":"2014-02-14 14:51:20.000000000","message":"can we somehow reuse test_vm_util.fake_session ?","commit_id":"3c8c46fd41ea8c2130d1bbb550a31b7694b9a13e"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"fee0d6a7e1a5be2fa3dc9dc16ce94f7078b3bf8e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                info.state \u003d \u0027success\u0027"},{"line_number":130,"context_line":"                return info"},{"line_number":131,"context_line":"            # Should never get here"},{"line_number":132,"context_line":"            self.assertTrue(False)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":135,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FQGk%3D","line":132,"updated":"2014-02-14 14:51:20.000000000","message":"self.fail()","commit_id":"3c8c46fd41ea8c2130d1bbb550a31b7694b9a13e"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"fee0d6a7e1a5be2fa3dc9dc16ce94f7078b3bf8e","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                info.result \u003d result"},{"line_number":194,"context_line":"                return info"},{"line_number":195,"context_line":"            # Should never get here"},{"line_number":196,"context_line":"            self.assertTrue(False)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":199,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FQEw%3D","line":196,"updated":"2014-02-14 14:51:20.000000000","message":"self.fail()","commit_id":"3c8c46fd41ea8c2130d1bbb550a31b7694b9a13e"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"fee0d6a7e1a5be2fa3dc9dc16ce94f7078b3bf8e","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                info.error \u003d error"},{"line_number":217,"context_line":"                return info"},{"line_number":218,"context_line":"            # Should never get here"},{"line_number":219,"context_line":"            self.assertTrue(False)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":222,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FQFA%3D","line":219,"updated":"2014-02-14 14:51:20.000000000","message":"self.fail()","commit_id":"3c8c46fd41ea8c2130d1bbb550a31b7694b9a13e"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"860fc457c1d50e9bd06fa6a9b7c3b0e787fb4a01","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                info.state \u003d \u0027success\u0027"},{"line_number":130,"context_line":"                return info"},{"line_number":131,"context_line":"            # Should never get here"},{"line_number":132,"context_line":"            self.assertTrue(False)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":135,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2B6aE%3D","line":132,"updated":"2014-02-18 08:50:04.000000000","message":"self.fail(\u0027should never get here\u0027)","commit_id":"193410443e39cb951076af040da22be890632d96"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"860fc457c1d50e9bd06fa6a9b7c3b0e787fb4a01","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                info.error \u003d error"},{"line_number":152,"context_line":"                return info"},{"line_number":153,"context_line":"            # Should never get here"},{"line_number":154,"context_line":"            self.assertTrue(False)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":157,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2B6Z0%3D","line":154,"updated":"2014-02-18 08:50:04.000000000","message":"self.fail(\u0027should never get here\u0027)","commit_id":"193410443e39cb951076af040da22be890632d96"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"860fc457c1d50e9bd06fa6a9b7c3b0e787fb4a01","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                info.result \u003d result"},{"line_number":194,"context_line":"                return info"},{"line_number":195,"context_line":"            # Should never get here"},{"line_number":196,"context_line":"            self.assertTrue(False)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":199,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2B6Zw%3D","line":196,"updated":"2014-02-18 08:50:04.000000000","message":"self.fail(\u0027should never get here\u0027)","commit_id":"193410443e39cb951076af040da22be890632d96"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"860fc457c1d50e9bd06fa6a9b7c3b0e787fb4a01","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                info.error \u003d error"},{"line_number":217,"context_line":"                return info"},{"line_number":218,"context_line":"            # Should never get here"},{"line_number":219,"context_line":"            self.assertTrue(False)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        with mock.patch.object(self.session, \u0027_call_method\u0027,"},{"line_number":222,"context_line":"                               fake_call_method):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2B6Zs%3D","line":219,"updated":"2014-02-18 08:50:04.000000000","message":"self.fail(\u0027should never get here\u0027)","commit_id":"193410443e39cb951076af040da22be890632d96"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        path \u003d ds_util.build_datastore_path(\u0027ds\u0027, \u0027folder/file\u0027)"},{"line_number":62,"context_line":"        self.assertEqual(\u0027[ds] folder/file\u0027, path)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_split_datastore_path(self):"},{"line_number":65,"context_line":"        url, path \u003d ds_util.split_datastore_path(\u0027[ds]\u0027)"},{"line_number":66,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":67,"context_line":"        self.assertEqual(\u0027\u0027, path)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Fa8Q%3D","line":64,"updated":"2014-02-26 19:37:20.000000000","message":"what about testing for a malformed path?\n\nfor example what happens with: \n ds_util.split_datastore_path(\"not a legal posix path\")\n\nshould IndexError be wrapped with some other descriptive error such as \"MalformedDatastorePathError\" or something named to describe the fault?","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        path \u003d ds_util.build_datastore_path(\u0027ds\u0027, \u0027folder/file\u0027)"},{"line_number":62,"context_line":"        self.assertEqual(\u0027[ds] folder/file\u0027, path)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_split_datastore_path(self):"},{"line_number":65,"context_line":"        url, path \u003d ds_util.split_datastore_path(\u0027[ds]\u0027)"},{"line_number":66,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":67,"context_line":"        self.assertEqual(\u0027\u0027, path)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8DY%3D","line":64,"in_reply_to":"AAAAU3%2F%2Fa8Q%3D","updated":"2014-02-27 09:17:24.000000000","message":"Done","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":70,"context_line":"        self.assertEqual(\u0027folder\u0027, path)"},{"line_number":71,"context_line":"        url, path \u003d ds_util.split_datastore_path(\u0027[ds] folder/file\u0027)"},{"line_number":72,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":73,"context_line":"        self.assertEqual(\u0027folder/file\u0027, path)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_file_delete(self):"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FayU%3D","line":72,"updated":"2014-02-26 19:37:20.000000000","message":"I\u0027m confused by calling the first return value \u0027url\u0027\n\nbased on the above line, isn\u0027t \u0027ds\u0027 just the name of the datastore, not it\u0027s url? We have a datastore URL that we can build in order to do posts to datastores using HTTP...\n\nhttp://pubs.vmware.com/vsphere-50/index.jsp?topic\u003d%2Fcom.vmware.wssdk.pg.doc_50%2FPG_ChC_Http_Access.21.3.html","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":70,"context_line":"        self.assertEqual(\u0027folder\u0027, path)"},{"line_number":71,"context_line":"        url, path \u003d ds_util.split_datastore_path(\u0027[ds] folder/file\u0027)"},{"line_number":72,"context_line":"        self.assertEqual(\u0027ds\u0027, url)"},{"line_number":73,"context_line":"        self.assertEqual(\u0027folder/file\u0027, path)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_file_delete(self):"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8Ck%3D","line":72,"in_reply_to":"AAAAU3%2F%2FayU%3D","updated":"2014-02-27 09:17:24.000000000","message":"Done","commit_id":"492f86ab50f549298b8c1242df35d90145987657"}],"nova/tests/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        ops._mkdir \u003d mock.Mock()"},{"line_number":115,"context_line":"        return ds_name, ds_ref, ops, path"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_create_cache_folder(self):"},{"line_number":118,"context_line":"        ds_name, ds_ref, ops, path \u003d self._setup_create_cache_mocks()"},{"line_number":119,"context_line":"        ops.create_cache_folder(ds_name, ds_ref)"},{"line_number":120,"context_line":"        ops._mkdir.assert_called_with(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FaXk%3D","side":"PARENT","line":117,"updated":"2014-02-26 19:37:20.000000000","message":"what replaces these tests? there is still a vmops._create_folder method is there not?","commit_id":"f17e50abe6ebb47f91814647cbbb340b1af31c4c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        ops._mkdir \u003d mock.Mock()"},{"line_number":115,"context_line":"        return ds_name, ds_ref, ops, path"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_create_cache_folder(self):"},{"line_number":118,"context_line":"        ds_name, ds_ref, ops, path \u003d self._setup_create_cache_mocks()"},{"line_number":119,"context_line":"        ops.create_cache_folder(ds_name, ds_ref)"},{"line_number":120,"context_line":"        ops._mkdir.assert_called_with(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F7zM%3D","side":"PARENT","line":117,"in_reply_to":"AAAAU3%2F%2FaXk%3D","updated":"2014-02-27 09:17:24.000000000","message":"Done","commit_id":"f17e50abe6ebb47f91814647cbbb340b1af31c4c"}],"nova/virt/vmwareapi/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33cae0797df0e6ef1c121bf690025631f63661b9","unresolved":false,"context_lines":[{"line_number":933,"context_line":"                LOG.debug(_(\"Task [%(task_name)s] %(task_ref)s \""},{"line_number":934,"context_line":"                            \"status: success\"),"},{"line_number":935,"context_line":"                          {\u0027task_name\u0027: task_name, \u0027task_ref\u0027: task_ref})"},{"line_number":936,"context_line":"                done.send(task_info)"},{"line_number":937,"context_line":"            else:"},{"line_number":938,"context_line":"                error_info \u003d str(task_info.error.localizedMessage)"},{"line_number":939,"context_line":"                LOG.warn(_(\"Task [%(task_name)s] %(task_ref)s \""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2B9kg%3D","line":936,"updated":"2014-02-18 00:19:45.000000000","message":"Is this related to the patch? I don\u0027t see how it fixes one of your listed bugs either, which I think it\u0027s supposed to, but looks suspicious to me.","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0bd6777a327e52b34bab0429c7415dffbb58febf","unresolved":false,"context_lines":[{"line_number":933,"context_line":"                LOG.debug(_(\"Task [%(task_name)s] %(task_ref)s \""},{"line_number":934,"context_line":"                            \"status: success\"),"},{"line_number":935,"context_line":"                          {\u0027task_name\u0027: task_name, \u0027task_ref\u0027: task_ref})"},{"line_number":936,"context_line":"                done.send(task_info)"},{"line_number":937,"context_line":"            else:"},{"line_number":938,"context_line":"                error_info \u003d str(task_info.error.localizedMessage)"},{"line_number":939,"context_line":"                LOG.warn(_(\"Task [%(task_name)s] %(task_ref)s \""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2B664%3D","line":936,"in_reply_to":"AAAAUX%2F%2B9kg%3D","updated":"2014-02-18 07:37:03.000000000","message":"I should have mentioned this in the commit message. This change simplifies the API. In the past we would have had to poll the task to get the data - https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L1560. This is already done by the _wait_for_task method","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"}],"nova/virt/vmwareapi/ds_util.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"69fb4f708f449720a78138dee92f5cc23cc04e50","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def split_datastore_path(datastore_path):"},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":43,"context_line":"    name and the entity path."},{"line_number":44,"context_line":"    \"\"\""},{"line_number":45,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FZiI%3D","line":42,"updated":"2014-01-14 06:06:29.000000000","message":"you left a comment about formatting doc strings like this for me here: https://review.openstack.org/#/c/64769/3/nova/utils.py so i had to return the favor :)","commit_id":"91ff1d9e90275888dc4e5a3f863909ca3450409d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"70ff01dbc8697bc6d9d76319ddcf398733474d38","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def split_datastore_path(datastore_path):"},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":43,"context_line":"    name and the entity path."},{"line_number":44,"context_line":"    \"\"\""},{"line_number":45,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FCLU%3D","line":42,"updated":"2014-01-18 06:12:28.000000000","message":"bump :P just kidding","commit_id":"e9cfb60ac40051a6651f2be2f4ae9db029dafeef"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":41,"context_line":"    name and the entity path."},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"},{"line_number":44,"context_line":"    path \u003d \"\""},{"line_number":45,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":46,"context_line":"        datastore_url \u003d spl[0]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wa0%3D","line":43,"updated":"2014-02-04 11:20:15.000000000","message":"Do we not like regular expressions?\n\nNot important, though.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":41,"context_line":"    name and the entity path."},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"},{"line_number":44,"context_line":"    path \u003d \"\""},{"line_number":45,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":46,"context_line":"        datastore_url \u003d spl[0]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9uvs%3D","line":43,"in_reply_to":"AAAAUH%2F9wa0%3D","updated":"2014-02-05 10:28:03.000000000","message":"This is existing code that was moved from vm_util to ds_util","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    try:"},{"line_number":79,"context_line":"        session._wait_for_task(instance[\u0027uuid\u0027], move_task)"},{"line_number":80,"context_line":"    except Exception as e:"},{"line_number":81,"context_line":"        LOG.warning(_(\"File moving failed - %s\"), e)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _task_info_state_get(session, search_task):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wZc%3D","line":81,"updated":"2014-02-04 11:20:15.000000000","message":"This should not be catching this Exception, as we can\u0027t assume how the caller should respond to it. We definitely don\u0027t want to bury all possible exceptions!","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    try:"},{"line_number":79,"context_line":"        session._wait_for_task(instance[\u0027uuid\u0027], move_task)"},{"line_number":80,"context_line":"    except Exception as e:"},{"line_number":81,"context_line":"        LOG.warning(_(\"File moving failed - %s\"), e)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _task_info_state_get(session, search_task):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wBk%3D","line":81,"in_reply_to":"AAAAUH%2F9wZc%3D","updated":"2014-02-05 10:28:03.000000000","message":"We are currently dealing with this in https://review.openstack.org/#/c/70137/.\nIf you look at https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L377 you will see that this is existing code.\nI am going to base this on that patch.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        LOG.warning(_(\"File moving failed - %s\"), e)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _task_info_state_get(session, search_task):"},{"line_number":85,"context_line":"    retries \u003d 0"},{"line_number":86,"context_line":"    # Wait till the state changes from queued or running."},{"line_number":87,"context_line":"    # If an error state is returned, it means that the path doesn\u0027t exist."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wVM%3D","line":84,"updated":"2014-02-04 11:20:15.000000000","message":"Why not use _wait_for_task()? They look functionally almost equivalent, except that _wait_for_task has better error logging, but isn\u0027t time bounded. If time bounding is important, we should probably add it to _wait_for_task, along with associated cancellation.\n\nAlso, _wait_for_task() is nicer to the event loop.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        LOG.warning(_(\"File moving failed - %s\"), e)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _task_info_state_get(session, search_task):"},{"line_number":85,"context_line":"    retries \u003d 0"},{"line_number":86,"context_line":"    # Wait till the state changes from queued or running."},{"line_number":87,"context_line":"    # If an error state is returned, it means that the path doesn\u0027t exist."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9v%2FI%3D","line":84,"in_reply_to":"AAAAUH%2F9wVM%3D","updated":"2014-02-05 10:28:03.000000000","message":"Very good point.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            \"SearchDatastore_Task\","},{"line_number":110,"context_line":"            ds_browser,"},{"line_number":111,"context_line":"            datastorePath\u003dds_path)"},{"line_number":112,"context_line":"    task_info \u003d _task_info_state_get(session, search_task)"},{"line_number":113,"context_line":"    if task_info.state \u003d\u003d \u0027error\u0027:"},{"line_number":114,"context_line":"        return False"},{"line_number":115,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wVE%3D","line":112,"updated":"2014-02-04 11:20:15.000000000","message":"_wait_for_task()","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            \"SearchDatastore_Task\","},{"line_number":110,"context_line":"            ds_browser,"},{"line_number":111,"context_line":"            datastorePath\u003dds_path)"},{"line_number":112,"context_line":"    task_info \u003d _task_info_state_get(session, search_task)"},{"line_number":113,"context_line":"    if task_info.state \u003d\u003d \u0027error\u0027:"},{"line_number":114,"context_line":"        return False"},{"line_number":115,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9t78%3D","line":112,"in_reply_to":"AAAAUH%2F9wVE%3D","updated":"2014-02-05 10:28:03.000000000","message":"This has been updated (I need to update the fake file management for this....","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                             ds_browser,"},{"line_number":125,"context_line":"                                             datastorePath\u003dds_path,"},{"line_number":126,"context_line":"                                             searchSpec\u003dsearch_spec)"},{"line_number":127,"context_line":"    task_info \u003d _task_info_state_get(session, search_task)"},{"line_number":128,"context_line":"    if task_info.state \u003d\u003d \u0027error\u0027:"},{"line_number":129,"context_line":"        return False, False"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wU8%3D","line":127,"updated":"2014-02-04 11:20:15.000000000","message":"_wait_for_task()","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                             ds_browser,"},{"line_number":125,"context_line":"                                             datastorePath\u003dds_path,"},{"line_number":126,"context_line":"                                             searchSpec\u003dsearch_spec)"},{"line_number":127,"context_line":"    task_info \u003d _task_info_state_get(session, search_task)"},{"line_number":128,"context_line":"    if task_info.state \u003d\u003d \u0027error\u0027:"},{"line_number":129,"context_line":"        return False, False"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9t34%3D","line":127,"in_reply_to":"AAAAUH%2F9wU8%3D","updated":"2014-02-05 10:28:03.000000000","message":"We are unable to do this at the moment - the reason is below - we need to read the task information to get the file name. If we wish to get this information from _wait_for_task then we need to receive the task_info.\ni think that is a separate patch set","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"5a3e34bb0fc582dc614cc844306874b7d5e7e3c1","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":20,"context_line":"from nova.openstack.common import log as logging"},{"line_number":21,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":22,"context_line":"from nova.virt.vmwareapi import error_util"},{"line_number":23,"context_line":"from nova.virt.vmwareapi import vm_util"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9ZC4%3D","line":21,"updated":"2014-02-07 10:16:52.000000000","message":"uuidutils may not be necessary? Please see next comment.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    LOG.debug(_(\"Deleted the datastore file\"), instance\u003dinstance)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def move_folder(session, instance, dc_ref, src_folder, dst_folder):"},{"line_number":62,"context_line":"    LOG.debug(_(\"Moving folder from %(src)s to %(dst)s.\"),"},{"line_number":63,"context_line":"              {\u0027src\u0027: src_folder, \u0027dst\u0027: dst_folder})"},{"line_number":64,"context_line":"    vim \u003d session._get_vim()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9Xc8%3D","line":61,"updated":"2014-02-07 12:40:42.000000000","message":"This operates on both files and folders. For consistency with file_delete() and file_exists() I\u0027d call it file_move().","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            destinationDatacenter\u003ddc_ref)"},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        session._wait_for_task(instance[\u0027uuid\u0027], move_task)"},{"line_number":75,"context_line":"    except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":76,"context_line":"        # File move has failed. This may be due to the fact that a"},{"line_number":77,"context_line":"        # process or thread has already completed the opertaion."},{"line_number":78,"context_line":"        # In the event of a FileAlreadyExists we continue, all other"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9XcQ%3D","line":75,"updated":"2014-02-07 12:40:42.000000000","message":"As this function is now in a library, it\u0027s no longer safe to catch this here. Only the caller knows whether FILE_ALREADY_EXISTS can be ignored, or if it needs special handling.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"5a3e34bb0fc582dc614cc844306874b7d5e7e3c1","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            ds_browser,"},{"line_number":89,"context_line":"            datastorePath\u003dds_path)"},{"line_number":90,"context_line":"    try:"},{"line_number":91,"context_line":"        session._wait_for_task(uuidutils.generate_uuid(),"},{"line_number":92,"context_line":"                               search_task)"},{"line_number":93,"context_line":"    except error_util.get_fault_class(error_util.FILE_NOT_FOUND):"},{"line_number":94,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9ZDc%3D","line":91,"updated":"2014-02-07 10:16:52.000000000","message":"The uuid gen looks weird. I think passing None should suffice. The reason being...\n\n_wait_for_task should not be instance-specific. (The equivalent in the oslo patch under review does not have an instance uuid, btw). Even here, the instance uuid param passed in is never used anywhere! We really should eliminate it from the function and fix up all call sites, but that is probably something for another refactor patch.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"5a3e34bb0fc582dc614cc844306874b7d5e7e3c1","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                             datastorePath\u003dds_path,"},{"line_number":106,"context_line":"                                             searchSpec\u003dsearch_spec)"},{"line_number":107,"context_line":"    try:"},{"line_number":108,"context_line":"        task_info \u003d session._wait_for_task(uuidutils.generate_uuid(),"},{"line_number":109,"context_line":"                                           search_task)"},{"line_number":110,"context_line":"    except error_util.get_fault_class(error_util.FILE_NOT_FOUND):"},{"line_number":111,"context_line":"        return False, False"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9ZDI%3D","line":108,"updated":"2014-02-07 10:16:52.000000000","message":"Same comment about uuid","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"cf2bfb2b01d688a1a69d1c058b49d595a08b0f55","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            destinationName\u003ddst_file,"},{"line_number":71,"context_line":"            destinationDatacenter\u003ddc_ref)"},{"line_number":72,"context_line":"    session._wait_for_task(instance[\u0027uuid\u0027], move_task)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def path_exists(session, ds_browser, ds_path):"},{"line_number":76,"context_line":"    \"\"\"Check if the path exists on the datastore.\"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAUX%2F%2FqRs%3D","line":73,"updated":"2014-02-11 17:21:20.000000000","message":"can we add a debug log here for consistency?","commit_id":"39ecaf22435f77dfcaad7c0c9e59098d23b8f9ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33cae0797df0e6ef1c121bf690025631f63661b9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":35,"context_line":"    name and the entity path."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"},{"line_number":38,"context_line":"    path \u003d \"\""},{"line_number":39,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":40,"context_line":"        datastore_url \u003d spl[0]"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2B9j0%3D","line":37,"updated":"2014-02-18 00:19:45.000000000","message":"Personally, I think I would have used a regex, even if just to make this a lot clearer. Unless I look at the result of build_datastore_path() above, I have no idea what \"a vmware style datastore path\" looks like, and this line of code is thus totally opaque.","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0bd6777a327e52b34bab0429c7415dffbb58febf","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    Split the VMware style datastore path to get the Datastore"},{"line_number":35,"context_line":"    name and the entity path."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    spl \u003d datastore_path.split(\u0027[\u0027, 1)[1].split(\u0027]\u0027, 1)"},{"line_number":38,"context_line":"    path \u003d \"\""},{"line_number":39,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":40,"context_line":"        datastore_url \u003d spl[0]"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUX%2F%2B644%3D","line":37,"in_reply_to":"AAAAUX%2F%2B9j0%3D","updated":"2014-02-18 07:37:03.000000000","message":"This is code that was moved from https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vm_util.py#L38 to here. A datastore patch is as follows:\n[datastore] vmware_base/XXX/YYY/XYZ.vmdk\nI would be happy to address this in a patch above this one.","commit_id":"045a31c600b7c1f379053f0461d8823c49ed42ba"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        datastore_url \u003d spl[0]"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        datastore_url, path \u003d spl"},{"line_number":43,"context_line":"    return datastore_url, path.strip()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def file_delete(session, datastore_path, dc_ref):"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Fa0s%3D","line":43,"updated":"2014-02-26 19:37:20.000000000","message":"datastore_url is really the datastore name at this point isn\u0027t it? It\u0027s likely to be \u0027ds1\u0027 or something similar. So maybe we could just call it datastore_name and path?","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        datastore_url \u003d spl[0]"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        datastore_url, path \u003d spl"},{"line_number":43,"context_line":"    return datastore_url, path.strip()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def file_delete(session, datastore_path, dc_ref):"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8eI%3D","line":43,"in_reply_to":"AAAAU3%2F%2Fa0s%3D","updated":"2014-02-27 09:17:24.000000000","message":"Done","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    LOG.debug(_(\"Deleted the datastore file\"))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def move_file(session, dc_ref, src_file, dst_file):"},{"line_number":60,"context_line":"    LOG.debug(_(\"Moving file from %(src)s to %(dst)s.\"),"},{"line_number":61,"context_line":"              {\u0027src\u0027: src_file, \u0027dst\u0027: dst_file})"},{"line_number":62,"context_line":"    vim \u003d session._get_vim()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FasM%3D","line":59,"updated":"2014-02-26 19:37:20.000000000","message":"this method in particular can raise any number of FileFaults from FileNotFound to FileAlreadyExists or NoDiskSpace while the method here itself does not raise these, it might be valuable to maintainers to see a document line indicating what can go wrong\n\n* http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.fault.FileFault.html\n\n* http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.FileManager.html#moveFile","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    LOG.debug(_(\"Deleted the datastore file\"))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def move_file(session, dc_ref, src_file, dst_file):"},{"line_number":60,"context_line":"    LOG.debug(_(\"Moving file from %(src)s to %(dst)s.\"),"},{"line_number":61,"context_line":"              {\u0027src\u0027: src_file, \u0027dst\u0027: dst_file})"},{"line_number":62,"context_line":"    vim \u003d session._get_vim()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F7zI%3D","line":59,"in_reply_to":"AAAAU3%2F%2FasM%3D","updated":"2014-02-27 09:17:24.000000000","message":"Done","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae7fb7b3d89424b54f9edd2696ab7539d4403657","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def file_delete(session, datastore_path, dc_ref):"},{"line_number":48,"context_line":"    LOG.debug(_(\"Deleting the datastore file %s\"), datastore_path)"},{"line_number":49,"context_line":"    vim \u003d session._get_vim()"},{"line_number":50,"context_line":"    file_delete_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7XQ%3D","line":47,"updated":"2014-02-27 10:21:17.000000000","message":"rename to delete_file for consistency","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"910baf04c738b93553c99037d3a3621061e2d2b7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def file_delete(session, datastore_path, dc_ref):"},{"line_number":48,"context_line":"    LOG.debug(_(\"Deleting the datastore file %s\"), datastore_path)"},{"line_number":49,"context_line":"    vim \u003d session._get_vim()"},{"line_number":50,"context_line":"    file_delete_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7QM%3D","line":47,"in_reply_to":"AAAAVX%2F%2F7XQ%3D","updated":"2014-02-27 10:35:36.000000000","message":"Done","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29337cd2875a203763c6b85b6bd427f99d080ea0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    LOG.debug(_(\"Deleted the datastore file\"))"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def move_file(session, dc_ref, src_file, dst_file):"},{"line_number":61,"context_line":"    \"\"\"Moves the source file or folder to the destination."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    - CannotAccessFile: Thrown if the source file or folder cannot be"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5p0%3D","line":60,"updated":"2014-02-27 14:41:22.000000000","message":"I think I mentioned this before, but we need to have some naming consistency here. We\u0027ve got:\n\ndelete_file, move_file\n\nbut:\n\npath_exists, file_exists\n\nIt doesn\u0027t matter which, but you should pick one. i.e.:\n\ndelete_file, move_file, exists_path, exists_file\n\nor:\n\nfile_delete, file_move, path_exists, file_exists","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ddbd52803ada8bbdff7838b50176be567ba1a0f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    LOG.debug(_(\"Deleted the datastore file\"))"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def move_file(session, dc_ref, src_file, dst_file):"},{"line_number":61,"context_line":"    \"\"\"Moves the source file or folder to the destination."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    - CannotAccessFile: Thrown if the source file or folder cannot be"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5PY%3D","line":60,"in_reply_to":"AAAAVX%2F%2F5p0%3D","updated":"2014-02-27 15:00:15.000000000","message":"Done","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29337cd2875a203763c6b85b6bd427f99d080ea0","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    LOG.debug(_(\"File moved\"))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def path_exists(session, ds_browser, ds_path):"},{"line_number":96,"context_line":"    \"\"\"Check if the path exists on the datastore.\"\"\""},{"line_number":97,"context_line":"    search_task \u003d session._call_method("},{"line_number":98,"context_line":"            session._get_vim(),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5pM%3D","line":95,"updated":"2014-02-27 14:41:22.000000000","message":"This function doesn\u0027t work on arbitrary paths, only paths to directories/folders. It should be called dir_exists (or exists_dir, see above).\n\nAlso, it isn\u0027t used! Given that any use of this function (or file_exists()) stands an excellent chance of being a race condition, it should be removed.\n\nIncidentally, the single use of file_exists() *is* a race condition, but a safe one.","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ddbd52803ada8bbdff7838b50176be567ba1a0f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    LOG.debug(_(\"File moved\"))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def path_exists(session, ds_browser, ds_path):"},{"line_number":96,"context_line":"    \"\"\"Check if the path exists on the datastore.\"\"\""},{"line_number":97,"context_line":"    search_task \u003d session._call_method("},{"line_number":98,"context_line":"            session._get_vim(),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5Os%3D","line":95,"in_reply_to":"AAAAVX%2F%2F5pM%3D","updated":"2014-02-27 15:00:15.000000000","message":"it was used prior to a rebase. dumped!","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29337cd2875a203763c6b85b6bd427f99d080ea0","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def file_exists(session, ds_browser, ds_path, file_name):"},{"line_number":110,"context_line":"    \"\"\"Check if the file exists on the datastore.\"\"\""},{"line_number":111,"context_line":"    client_factory \u003d session._get_vim().client.factory"},{"line_number":112,"context_line":"    search_spec \u003d vm_util.search_datastore_spec(client_factory, file_name)"},{"line_number":113,"context_line":"    search_task \u003d session._call_method(session._get_vim(),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5YQ%3D","line":110,"updated":"2014-02-27 14:41:22.000000000","message":"Perhaps a warning here that if you use this function you\u0027re almost certainly introducing a race condition. Use with extreme caution.","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ddbd52803ada8bbdff7838b50176be567ba1a0f","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def file_exists(session, ds_browser, ds_path, file_name):"},{"line_number":110,"context_line":"    \"\"\"Check if the file exists on the datastore.\"\"\""},{"line_number":111,"context_line":"    client_factory \u003d session._get_vim().client.factory"},{"line_number":112,"context_line":"    search_spec \u003d vm_util.search_datastore_spec(client_factory, file_name)"},{"line_number":113,"context_line":"    search_task \u003d session._call_method(session._get_vim(),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5Lo%3D","line":110,"in_reply_to":"AAAAVX%2F%2F5YQ%3D","updated":"2014-02-27 15:00:15.000000000","message":"Sorry, not sure I understand. Why is this most certainly introducing a race.\nThere are possible races for the datasore folders - base and temp.\nRest should be unque names.","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29337cd2875a203763c6b85b6bd427f99d080ea0","unresolved":false,"context_lines":[{"line_number":109,"context_line":"def file_exists(session, ds_browser, ds_path, file_name):"},{"line_number":110,"context_line":"    \"\"\"Check if the file exists on the datastore.\"\"\""},{"line_number":111,"context_line":"    client_factory \u003d session._get_vim().client.factory"},{"line_number":112,"context_line":"    search_spec \u003d vm_util.search_datastore_spec(client_factory, file_name)"},{"line_number":113,"context_line":"    search_task \u003d session._call_method(session._get_vim(),"},{"line_number":114,"context_line":"                                             \"SearchDatastore_Task\","},{"line_number":115,"context_line":"                                             ds_browser,"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5og%3D","line":112,"updated":"2014-02-27 14:41:22.000000000","message":"search_datastore_spec isn\u0027t used anywhere else in the code. You could probably remove it and inline it here (it\u0027s 2 lines).","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ddbd52803ada8bbdff7838b50176be567ba1a0f","unresolved":false,"context_lines":[{"line_number":109,"context_line":"def file_exists(session, ds_browser, ds_path, file_name):"},{"line_number":110,"context_line":"    \"\"\"Check if the file exists on the datastore.\"\"\""},{"line_number":111,"context_line":"    client_factory \u003d session._get_vim().client.factory"},{"line_number":112,"context_line":"    search_spec \u003d vm_util.search_datastore_spec(client_factory, file_name)"},{"line_number":113,"context_line":"    search_task \u003d session._call_method(session._get_vim(),"},{"line_number":114,"context_line":"                                             \"SearchDatastore_Task\","},{"line_number":115,"context_line":"                                             ds_browser,"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAVX%2F%2F5Mc%3D","line":112,"in_reply_to":"AAAAVX%2F%2F5og%3D","updated":"2014-02-27 15:00:15.000000000","message":"i would prefer that we leave that in vm_utility as it is related to the vm config specs,","commit_id":"e97510acf78931f37ce3ac01b8a0184ba3907375"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"612b0ca822735d3734a0536410f0c1f5688990d1","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def file_move(session, dc_ref, src_file, dst_file):"},{"line_number":61,"context_line":"    \"\"\"Moves the source file or folder to the destination."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    - CannotAccessFile: Thrown if the source file or folder cannot be"},{"line_number":64,"context_line":"                        moved because of insufficient permissions."},{"line_number":65,"context_line":"    - FileAlreadyExists: Thrown if a file with the given name already"},{"line_number":66,"context_line":"                         exists at the destination."}],"source_content_type":"text/x-python","patch_set":44,"id":"AAAAVX%2F%2F2fc%3D","line":63,"updated":"2014-02-27 20:33:16.000000000","message":"Seems kinda dangling. I suggest add before these a line like: \nThe list of possible faults that the server can return on error include:","commit_id":"fc9173920ae86e8e589ad79c601e2fa7ae00cbd4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f4d1bd5318c979de4e78e3a345546411f1883834","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def file_move(session, dc_ref, src_file, dst_file):"},{"line_number":61,"context_line":"    \"\"\"Moves the source file or folder to the destination."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    - CannotAccessFile: Thrown if the source file or folder cannot be"},{"line_number":64,"context_line":"                        moved because of insufficient permissions."},{"line_number":65,"context_line":"    - FileAlreadyExists: Thrown if a file with the given name already"},{"line_number":66,"context_line":"                         exists at the destination."}],"source_content_type":"text/x-python","patch_set":44,"id":"AAAAVX%2F%2FrSY%3D","line":63,"in_reply_to":"AAAAVX%2F%2F2fc%3D","updated":"2014-03-01 06:26:06.000000000","message":"Done","commit_id":"fc9173920ae86e8e589ad79c601e2fa7ae00cbd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"507d9b0a09a8ddc16a89d746752d5a5ebe562801","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":41,"context_line":"        datastore_name \u003d spl[0]"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        datastore_name, path \u003d spl"},{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2FrGw%3D","line":43,"updated":"2014-03-04 18:43:35.000000000","message":"This is really hard for me to eye-parse and know it\u0027s correct. I don\u0027t know what a ds_path looks like but I think the following would do this right:\n\n  store_spec, path \u003d datastore_path.split(\u0027 \u0027, 1)\n  name \u003d store[1:-1]\n\nright?","commit_id":"4ae9447c5429068c22f4c49a8a975e0537c1fd51"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"40579e5b6ad5cf3f1586ef9a6560a378dccd6929","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":41,"context_line":"        datastore_name \u003d spl[0]"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        datastore_name, path \u003d spl"},{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2FoKY%3D","line":43,"in_reply_to":"AAAAVn%2F%2FoL0%3D","updated":"2014-03-05 00:04:30.000000000","message":"Done","commit_id":"4ae9447c5429068c22f4c49a8a975e0537c1fd51"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"937d08001aec62f43ea4980187daaa26b7eea87c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":41,"context_line":"        datastore_name \u003d spl[0]"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        datastore_name, path \u003d spl"},{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2Fp7A%3D","line":43,"in_reply_to":"AAAAVn%2F%2FrGw%3D","updated":"2014-03-04 21:32:23.000000000","message":"Done","commit_id":"4ae9447c5429068c22f4c49a8a975e0537c1fd51"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"c15e0d59ed01b18b49737453d40a82854a80fc76","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    if len(spl) \u003d\u003d 1:"},{"line_number":41,"context_line":"        datastore_name \u003d spl[0]"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        datastore_name, path \u003d spl"},{"line_number":44,"context_line":"    return datastore_name, path.strip()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2FoL0%3D","line":43,"in_reply_to":"AAAAVn%2F%2FrGw%3D","updated":"2014-03-04 23:55:47.000000000","message":"That would not work in some cases coz the datastore name part (in square brackets) can have spaces in them, and the space after ] is optional.","commit_id":"4ae9447c5429068c22f4c49a8a975e0537c1fd51"}],"nova/virt/vmwareapi/fake.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":749,"context_line":"        super(Task, self).__init__(\"Task\")"},{"line_number":750,"context_line":"        info \u003d DataObject()"},{"line_number":751,"context_line":"        info.name \u003d task_name"},{"line_number":752,"context_line":"        if state:"},{"line_number":753,"context_line":"            info.state \u003d state"},{"line_number":754,"context_line":"        info.result \u003d result"},{"line_number":755,"context_line":"        self.set(\"info\", info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9008%3D","line":752,"updated":"2014-02-04 11:20:15.000000000","message":"In practice probably not important here, but comparison should really be \u0027is not None\u0027 (see pep8 recommendations). Note that state could also be \u0027\u0027:\n\n\u003e\u003e\u003e bool(\u0027\u0027)\nFalse\n\nI won\u0027t reject just for this.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":749,"context_line":"        super(Task, self).__init__(\"Task\")"},{"line_number":750,"context_line":"        info \u003d DataObject()"},{"line_number":751,"context_line":"        info.name \u003d task_name"},{"line_number":752,"context_line":"        if state:"},{"line_number":753,"context_line":"            info.state \u003d state"},{"line_number":754,"context_line":"        info.result \u003d result"},{"line_number":755,"context_line":"        self.set(\"info\", info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9uos%3D","line":752,"in_reply_to":"AAAAUH%2F9008%3D","updated":"2014-02-05 10:28:03.000000000","message":"Done","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"69079df0bb55b199e8109ebb37b61d6868d4761c","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def __init__(self):"},{"line_number":283,"context_line":"        super(FileNotFound, self).__init__()"},{"line_number":284,"context_line":"        self.__name__ \u003d \u0027FileNotFound\u0027"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"class VirtualDisk(DataObject):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F9VMs%3D","line":284,"updated":"2014-02-07 17:19:31.000000000","message":"Shouldn\u0027t error_util.FILE_NOT_FOUND be used here?","commit_id":"99348c4ef03950c72d14de4498e9543755bf7a6d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"65b53b7c974e67b47afe72c62bf75ccd05ad2196","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def __init__(self):"},{"line_number":283,"context_line":"        super(FileNotFound, self).__init__()"},{"line_number":284,"context_line":"        self.__name__ \u003d \u0027FileNotFound\u0027"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"class VirtualDisk(DataObject):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2F8BY%3D","line":284,"in_reply_to":"AAAAUH%2F9VMs%3D","updated":"2014-02-09 07:28:20.000000000","message":"Done","commit_id":"99348c4ef03950c72d14de4498e9543755bf7a6d"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                                              upload_folder)"},{"line_number":486,"context_line":"                    ds_util.move_folder(self._session, instance, dc_info.ref,"},{"line_number":487,"context_line":"                                        src_folder, dest_folder)"},{"line_number":488,"context_line":"                ds_util.file_delete(self._session, instance,"},{"line_number":489,"context_line":"                        ds_util.build_datastore_path(data_store_name,"},{"line_number":490,"context_line":"                                                     tmp_upload_folder),"},{"line_number":491,"context_line":"                        dc_info.ref)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wio%3D","line":488,"updated":"2014-02-04 11:20:15.000000000","message":"We would want to raise an Exception and fail here if this path already existed. In fact, we probably want to do this earlier.","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                                              upload_folder)"},{"line_number":486,"context_line":"                    ds_util.move_folder(self._session, instance, dc_info.ref,"},{"line_number":487,"context_line":"                                        src_folder, dest_folder)"},{"line_number":488,"context_line":"                ds_util.file_delete(self._session, instance,"},{"line_number":489,"context_line":"                        ds_util.build_datastore_path(data_store_name,"},{"line_number":490,"context_line":"                                                     tmp_upload_folder),"},{"line_number":491,"context_line":"                        dc_info.ref)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9v%2BM%3D","line":488,"in_reply_to":"AAAAUH%2F9wio%3D","updated":"2014-02-05 10:28:03.000000000","message":"This file exists as we create it a few lines above. Not sure I understand your comment here","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9a226de14ba2e7ea565ac3951e9f223c197de289","unresolved":false,"context_lines":[{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _get_ds_browser(self, ds_ref):"},{"line_number":1499,"context_line":"        ds_browser \u003d self._datastore_browser_mapping.get(ds_ref)"},{"line_number":1500,"context_line":"        if not ds_browser:"},{"line_number":1501,"context_line":"            ds_browser \u003d self._session._call_method("},{"line_number":1502,"context_line":"                vim_util, \"get_dynamic_property\", ds_ref, \"Datastore\","},{"line_number":1503,"context_line":"                \"browser\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9wbk%3D","line":1500,"updated":"2014-02-04 11:20:15.000000000","message":"if ds_browser is None","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"00e279cabeb5cdda2c290f3c8d708018b5196579","unresolved":false,"context_lines":[{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _get_ds_browser(self, ds_ref):"},{"line_number":1499,"context_line":"        ds_browser \u003d self._datastore_browser_mapping.get(ds_ref)"},{"line_number":1500,"context_line":"        if not ds_browser:"},{"line_number":1501,"context_line":"            ds_browser \u003d self._session._call_method("},{"line_number":1502,"context_line":"                vim_util, \"get_dynamic_property\", ds_ref, \"Datastore\","},{"line_number":1503,"context_line":"                \"browser\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9v%2BA%3D","line":1500,"in_reply_to":"AAAAUH%2F9wbk%3D","updated":"2014-02-05 10:28:03.000000000","message":"Done","commit_id":"f9d5e7bde37fc6a3f617a309bb404bf663b8fc28"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                base_folder \u003d \u0027%s/%s\u0027 % (self._base_folder, upload_name)"},{"line_number":478,"context_line":"                dest_folder \u003d ds_util.build_datastore_path(data_store_name,"},{"line_number":479,"context_line":"                                                           base_folder)"},{"line_number":480,"context_line":"                if not ds_util.path_exists(self._session, ds_browser,"},{"line_number":481,"context_line":"                                           dest_folder):"},{"line_number":482,"context_line":"                    src_folder \u003d ds_util.build_datastore_path(data_store_name,"},{"line_number":483,"context_line":"                                                              upload_folder)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9Xe0%3D","line":480,"updated":"2014-02-07 12:40:42.000000000","message":"This check creates a race (from path_exists to move_folder). Specifically, path_exists may return false, but the path may exist by the time move_folder is executed.\n\nThe check is actually redundant. You can simply call move_folder(), which should (see comment in ds_util.py) raise FILE_ALREADY_EXISTS if it exists. That would be race free.\n\nAs it happens, the race here currently has no ill effect because move_folder swallows the exception and file_delete is recursive. However, it takes several minutes of head scratching, and a trip to the vSphere API docs to convince yourself of that, when it could be obvious.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                                                              upload_folder)"},{"line_number":484,"context_line":"                    ds_util.move_folder(self._session, instance, dc_info.ref,"},{"line_number":485,"context_line":"                                        src_folder, dest_folder)"},{"line_number":486,"context_line":"                ds_util.file_delete(self._session, instance,"},{"line_number":487,"context_line":"                        ds_util.build_datastore_path(data_store_name,"},{"line_number":488,"context_line":"                                                     tmp_upload_folder),"},{"line_number":489,"context_line":"                        dc_info.ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9XYk%3D","line":486,"updated":"2014-02-07 12:40:42.000000000","message":"Nit: it\u0027s not immediately obvious that file_delete is recursive (it is). However, this is essential behaviour in the event that move_folder above failed, silently or otherwise. I\u0027d add a comment.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":765,"context_line":"            # create one"},{"line_number":766,"context_line":"            tmp_folder_path \u003d ds_util.build_datastore_path(datastore_name,"},{"line_number":767,"context_line":"                                                           self._tmp_folder)"},{"line_number":768,"context_line":"            if not ds_util.path_exists(self._session, ds_browser,"},{"line_number":769,"context_line":"                                       tmp_folder_path):"},{"line_number":770,"context_line":"                dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":771,"context_line":"                ds_util.mkdir(self._session,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9XWo%3D","line":768,"updated":"2014-02-07 12:40:42.000000000","message":"Again, this test creates a race, and isn\u0027t necessary. Unlike the case above, though, this race can create a failure because mkdir doesn\u0027t swallow it\u0027s exceptions (which is correct).\n\nThis should simply call ds_util.mkdir() and handle FileAlreadyExists.","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd7dca5e12cff80c712162f09ef7fffcf9327d84","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"        folder_exists, file_exists \u003d ds_util.file_exists(self._session,"},{"line_number":1548,"context_line":"                ds_browser, folder_path, file_name)"},{"line_number":1549,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1550,"context_line":"        if not folder_exists:"},{"line_number":1551,"context_line":"            dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":1552,"context_line":"            ds_util.mkdir(self._session,"},{"line_number":1553,"context_line":"                          ds_util.build_datastore_path(ds_name,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUH%2F9XVU%3D","line":1550,"updated":"2014-02-07 12:40:42.000000000","message":"See above. Another race condition which again will result in actual failure because of the uncaught exception from mkdir().","commit_id":"65099774851b998b154692f5f045a2cb9348c183"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"4141d221f46f3a5aadbf5ba16ec9bdae1d427f6d","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                      src_folder, dest_folder)"},{"line_number":486,"context_line":"                except error_util.get_fault_class("},{"line_number":487,"context_line":"                    error_util.FILE_ALREADY_EXISTS):"},{"line_number":488,"context_line":"                    # File move has failed. This may be due to the fact that a"},{"line_number":489,"context_line":"                    # process or thread has already completed the opertaion."},{"line_number":490,"context_line":"                    # In the event of a FileAlreadyExists we continue,"},{"line_number":491,"context_line":"                    # all other exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F9VFw%3D","line":488,"updated":"2014-02-07 17:30:27.000000000","message":"Still think a small log.debug statement would be useful. Yeah, in the expected concurrent move scenario this might be superflous, but if we end up with any issues with the spawn, it may be a useful piece of evidence whether the client\u0027s uploaded image got moved in to the cache or not.","commit_id":"99348c4ef03950c72d14de4498e9543755bf7a6d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"65b53b7c974e67b47afe72c62bf75ccd05ad2196","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                      src_folder, dest_folder)"},{"line_number":486,"context_line":"                except error_util.get_fault_class("},{"line_number":487,"context_line":"                    error_util.FILE_ALREADY_EXISTS):"},{"line_number":488,"context_line":"                    # File move has failed. This may be due to the fact that a"},{"line_number":489,"context_line":"                    # process or thread has already completed the opertaion."},{"line_number":490,"context_line":"                    # In the event of a FileAlreadyExists we continue,"},{"line_number":491,"context_line":"                    # all other exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2F8BQ%3D","line":488,"in_reply_to":"AAAAUH%2F9VFw%3D","updated":"2014-02-09 07:28:20.000000000","message":"Done","commit_id":"99348c4ef03950c72d14de4498e9543755bf7a6d"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"8c2a9a1e47035f043ff8255f94e5c3aff8f584e9","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                    self._delete_datastore_file(instance,"},{"line_number":487,"context_line":"                                                sparse_uploaded_vmdk_path,"},{"line_number":488,"context_line":"                                                dc_info.ref)"},{"line_number":489,"context_line":"                ds_browser \u003d self._get_ds_browser(data_store_ref)"},{"line_number":490,"context_line":"                base_folder \u003d \u0027%s/%s\u0027 % (self._base_folder, upload_name)"},{"line_number":491,"context_line":"                dest_folder \u003d ds_util.build_datastore_path(data_store_name,"},{"line_number":492,"context_line":"                                                           base_folder)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrP0%3D","line":489,"updated":"2014-02-11 15:34:08.000000000","message":"this seems to be unused","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"44e1ee8923983c66bae821ccb5f5430b7603ba91","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                    self._delete_datastore_file(instance,"},{"line_number":487,"context_line":"                                                sparse_uploaded_vmdk_path,"},{"line_number":488,"context_line":"                                                dc_info.ref)"},{"line_number":489,"context_line":"                ds_browser \u003d self._get_ds_browser(data_store_ref)"},{"line_number":490,"context_line":"                base_folder \u003d \u0027%s/%s\u0027 % (self._base_folder, upload_name)"},{"line_number":491,"context_line":"                dest_folder \u003d ds_util.build_datastore_path(data_store_name,"},{"line_number":492,"context_line":"                                                           base_folder)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrC0%3D","line":489,"in_reply_to":"AAAAUX%2F%2FrP0%3D","updated":"2014-02-11 15:54:28.000000000","message":"Done","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"8c2a9a1e47035f043ff8255f94e5c3aff8f584e9","unresolved":false,"context_lines":[{"line_number":781,"context_line":"            if ds_ref_ret is None:"},{"line_number":782,"context_line":"                raise exception.DatastoreNotFound()"},{"line_number":783,"context_line":"            ds_ref \u003d ds_ref_ret.ManagedObjectReference[0]"},{"line_number":784,"context_line":"            ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":785,"context_line":"            dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":786,"context_line":"            try:"},{"line_number":787,"context_line":"                ds_util.mkdir(self._session,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrPU%3D","line":784,"updated":"2014-02-11 15:34:08.000000000","message":"this seems to be unused","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"44e1ee8923983c66bae821ccb5f5430b7603ba91","unresolved":false,"context_lines":[{"line_number":781,"context_line":"            if ds_ref_ret is None:"},{"line_number":782,"context_line":"                raise exception.DatastoreNotFound()"},{"line_number":783,"context_line":"            ds_ref \u003d ds_ref_ret.ManagedObjectReference[0]"},{"line_number":784,"context_line":"            ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":785,"context_line":"            dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":786,"context_line":"            try:"},{"line_number":787,"context_line":"                ds_util.mkdir(self._session,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrCw%3D","line":784,"in_reply_to":"AAAAUX%2F%2FrPU%3D","updated":"2014-02-11 15:54:28.000000000","message":"Done","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"8c2a9a1e47035f043ff8255f94e5c3aff8f584e9","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"        vm_folder_ref \u003d dc_objs.objects[0].propSet[0].val"},{"line_number":1561,"context_line":"        return vm_folder_ref"},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1564,"context_line":"                                     folder_name, file_name):"},{"line_number":1565,"context_line":"        ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":1566,"context_line":"        # Check if the folder exists or not. If not, create one"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrO8%3D","line":1563,"updated":"2014-02-11 15:34:08.000000000","message":"why this is not part of ds_util ?","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"44e1ee8923983c66bae821ccb5f5430b7603ba91","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"        vm_folder_ref \u003d dc_objs.objects[0].propSet[0].val"},{"line_number":1561,"context_line":"        return vm_folder_ref"},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1564,"context_line":"                                     folder_name, file_name):"},{"line_number":1565,"context_line":"        ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":1566,"context_line":"        # Check if the folder exists or not. If not, create one"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FrCU%3D","line":1563,"in_reply_to":"AAAAUX%2F%2FrO8%3D","updated":"2014-02-11 15:54:28.000000000","message":"i felt like it was not part of the ds_utils. if you want I can add it as part of a patch above this one.","commit_id":"b5cd6ce589703eef6bf8804027bb6e8a926da7e8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c1ccb34d52b07dc25dd362dac5ab451eb1c47259","unresolved":false,"context_lines":[{"line_number":792,"context_line":"                # the folder check returned that it did not exist. Another"},{"line_number":793,"context_line":"                # process or thread could have created the folder"},{"line_number":794,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":795,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":796,"context_line":"                LOG.debug(_(\u0027File %s already exists.\u0027), self._tmp_folder)"},{"line_number":797,"context_line":"            return ds_ref"},{"line_number":798,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2BYJk%3D","line":795,"updated":"2014-02-21 14:49:49.000000000","message":"need to fix the message here","commit_id":"2c094290fbbb22c258f08d26eaa6b10db5e39909"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"01c209ada9afee947560341a5977710a200525e0","unresolved":false,"context_lines":[{"line_number":792,"context_line":"                # the folder check returned that it did not exist. Another"},{"line_number":793,"context_line":"                # process or thread could have created the folder"},{"line_number":794,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":795,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":796,"context_line":"                LOG.debug(_(\u0027File %s already exists.\u0027), self._tmp_folder)"},{"line_number":797,"context_line":"            return ds_ref"},{"line_number":798,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAU3%2F%2F%2BC4%3D","line":795,"in_reply_to":"AAAAUX%2F%2BYJk%3D","updated":"2014-02-23 09:17:32.000000000","message":"Done","commit_id":"2c094290fbbb22c258f08d26eaa6b10db5e39909"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c1ccb34d52b07dc25dd362dac5ab451eb1c47259","unresolved":false,"context_lines":[{"line_number":1569,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1570,"context_line":"        if not folder_exists:"},{"line_number":1571,"context_line":"            dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":1572,"context_line":"            ds_util.mkdir(self._session,"},{"line_number":1573,"context_line":"                          ds_util.build_datastore_path(ds_name,"},{"line_number":1574,"context_line":"                                                       self._base_folder),"},{"line_number":1575,"context_line":"                          dc_info.ref)"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAUX%2F%2BYJM%3D","line":1572,"updated":"2014-02-21 14:49:49.000000000","message":"need to catch exception here","commit_id":"2c094290fbbb22c258f08d26eaa6b10db5e39909"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"01c209ada9afee947560341a5977710a200525e0","unresolved":false,"context_lines":[{"line_number":1569,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1570,"context_line":"        if not folder_exists:"},{"line_number":1571,"context_line":"            dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":1572,"context_line":"            ds_util.mkdir(self._session,"},{"line_number":1573,"context_line":"                          ds_util.build_datastore_path(ds_name,"},{"line_number":1574,"context_line":"                                                       self._base_folder),"},{"line_number":1575,"context_line":"                          dc_info.ref)"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAU3%2F%2F%2BCo%3D","line":1572,"in_reply_to":"AAAAUX%2F%2BYJM%3D","updated":"2014-02-23 09:17:32.000000000","message":"Done","commit_id":"2c094290fbbb22c258f08d26eaa6b10db5e39909"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1636,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    def create_cache_folder(self, ds_name, ds_ref):"},{"line_number":1639,"context_line":"        try:"},{"line_number":1640,"context_line":"            path \u003d vm_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1641,"context_line":"            self._mkdir(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Fabk%3D","side":"PARENT","line":1638,"updated":"2014-02-26 19:37:20.000000000","message":"This was named specifically to indicate that creating the cache folder was a special circumstance.","commit_id":"f17e50abe6ebb47f91814647cbbb340b1af31c4c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1636,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    def create_cache_folder(self, ds_name, ds_ref):"},{"line_number":1639,"context_line":"        try:"},{"line_number":1640,"context_line":"            path \u003d vm_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1641,"context_line":"            self._mkdir(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8LM%3D","side":"PARENT","line":1638,"in_reply_to":"AAAAU3%2F%2Fabk%3D","updated":"2014-02-27 09:17:24.000000000","message":"please see the comment above for the temp folder. the temp folder management is the same as the cache folder. there may be races here too. hence the change.","commit_id":"f17e50abe6ebb47f91814647cbbb340b1af31c4c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1cc326f752490edebbaf4bac7a73adb02a99e571","unresolved":false,"context_lines":[{"line_number":793,"context_line":"            if ds_ref_ret is None:"},{"line_number":794,"context_line":"                raise exception.DatastoreNotFound()"},{"line_number":795,"context_line":"            ds_ref \u003d ds_ref_ret.ManagedObjectReference[0]"},{"line_number":796,"context_line":"            self._create_folder(datastore_name, ds_ref, self._tmp_folder)"},{"line_number":797,"context_line":"            return ds_ref"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        ds_ref \u003d _check_if_tmp_folder_exists()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FaH0%3D","line":796,"updated":"2014-02-26 20:17:45.000000000","message":"This won\u0027t fail if the folder already exists, but AFAICT, it should in this case.","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":793,"context_line":"            if ds_ref_ret is None:"},{"line_number":794,"context_line":"                raise exception.DatastoreNotFound()"},{"line_number":795,"context_line":"            ds_ref \u003d ds_ref_ret.ManagedObjectReference[0]"},{"line_number":796,"context_line":"            self._create_folder(datastore_name, ds_ref, self._tmp_folder)"},{"line_number":797,"context_line":"            return ds_ref"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        ds_ref \u003d _check_if_tmp_folder_exists()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8WU%3D","line":796,"in_reply_to":"AAAAU3%2F%2FaH0%3D","updated":"2014-02-27 09:17:24.000000000","message":"This should not fail if the folder already exists. The purpose of this change is threefold:\n1. there may be a case of a race when 2 compute nodes are trying the create the temporary directory and it does not exist\n2. this consolidates the directory management in the same fashion as that for the base directory. That is, there are 2 folders that may already exist and are required - temp folder - for snapshots and image uploading and the base folder for cache management\n3. save a call to the backend. that is, the original code would first need to read the datastore browser then check if the patch exists. Now this will just do 1 call - create directory.\n\nI have change the method name which i hope will be better and self explanatory.","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        vm_folder_ref \u003d dc_objs.objects[0].propSet[0].val"},{"line_number":1551,"context_line":"        return vm_folder_ref"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _create_folder(self, ds_name, ds_ref, folder):"},{"line_number":1554,"context_line":"        path \u003d ds_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1555,"context_line":"        try:"},{"line_number":1556,"context_line":"            ds_util.mkdir(self._session, path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Faas%3D","line":1553,"updated":"2014-02-26 19:37:20.000000000","message":"-1 here I anticipate same objection Dan Smith raised and asked me rewrite the move command so that it continued to raise error_util.FileAlreadyExistsException would apply. The create_cache_folder is a special circumstance.\n\nAs far as I can tell \u0027folder\u0027 is unused.","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        vm_folder_ref \u003d dc_objs.objects[0].propSet[0].val"},{"line_number":1551,"context_line":"        return vm_folder_ref"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _create_folder(self, ds_name, ds_ref, folder):"},{"line_number":1554,"context_line":"        path \u003d ds_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1555,"context_line":"        try:"},{"line_number":1556,"context_line":"            ds_util.mkdir(self._session, path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8H8%3D","line":1553,"in_reply_to":"AAAAU3%2F%2FaEQ%3D","updated":"2014-02-27 09:17:24.000000000","message":"The create folder is used in two cases:\n1. base folder - used for storing the cached images\n2. temp folder - used for snapshots and image uploading\n\nI have changed the method name and have hopefully provided a good enough reason in the docstring on why this is needed. In general this is as follows:\n1. consolidate the treatment of these folder that are required. In both cases they can have races and this addresses those issues\n2. simplifies and makes the code more manageable.\n\nI hope that the new name is more acceptable.","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1cc326f752490edebbaf4bac7a73adb02a99e571","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        vm_folder_ref \u003d dc_objs.objects[0].propSet[0].val"},{"line_number":1551,"context_line":"        return vm_folder_ref"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _create_folder(self, ds_name, ds_ref, folder):"},{"line_number":1554,"context_line":"        path \u003d ds_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1555,"context_line":"        try:"},{"line_number":1556,"context_line":"            ds_util.mkdir(self._session, path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FaEQ%3D","line":1553,"in_reply_to":"AAAAU3%2F%2Faas%3D","updated":"2014-02-26 20:17:45.000000000","message":"Agreed, I don\u0027t understand why we would want a generic method called \"_create_folder\" that ignores errors. If it\u0027s clearly just for the cache folder creation, I can see it, but otherwise this should be called:\n\n _maybe_create_folder_not_sure_might_fail_but_dunno_be_careful()","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ba7a059daf690df64c4fbde6149b4ef977ac0523","unresolved":false,"context_lines":[{"line_number":1562,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1563,"context_line":"                                     folder_name, file_name):"},{"line_number":1564,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1565,"context_line":"        self._create_folder(ds_name, ds_ref, self._base_folder)"},{"line_number":1566,"context_line":"        ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":1567,"context_line":"        # Check if the file exists or not."},{"line_number":1568,"context_line":"        folder_path \u003d ds_util.build_datastore_path(ds_name, folder_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FaZI%3D","line":1565,"updated":"2014-02-26 19:37:20.000000000","message":"I don\u0027t understand why you feel you need to rename this method. This also confuses the purpose of the original patch.","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4225c5ba26de02926448ab215312a0ac089993ff","unresolved":false,"context_lines":[{"line_number":1562,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1563,"context_line":"                                     folder_name, file_name):"},{"line_number":1564,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1565,"context_line":"        self._create_folder(ds_name, ds_ref, self._base_folder)"},{"line_number":1566,"context_line":"        ds_browser \u003d self._get_ds_browser(ds_ref)"},{"line_number":1567,"context_line":"        # Check if the file exists or not."},{"line_number":1568,"context_line":"        folder_path \u003d ds_util.build_datastore_path(ds_name, folder_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVX%2F%2F8Kk%3D","line":1565,"in_reply_to":"AAAAU3%2F%2FaZI%3D","updated":"2014-02-27 09:17:24.000000000","message":"the reason the name was changed is that it is used by the management of the base cache folder and the temp folder.\nthe same races may exist for the temp folder. please see explanation above","commit_id":"492f86ab50f549298b8c1242df35d90145987657"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae7fb7b3d89424b54f9edd2696ab7539d4403657","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                error_util.FileFaultException,"},{"line_number":163,"context_line":"                error_util.FileLockedException,"},{"line_number":164,"context_line":"                error_util.FileNotFoundException) as e:"},{"line_number":165,"context_line":"            # There may be more than one process or thread that tries"},{"line_number":166,"context_line":"            # to delete the file."},{"line_number":167,"context_line":"            LOG.debug(_(\"Unable to delete %(ds)s. There may be more than \""},{"line_number":168,"context_line":"                        \"one process or thread that tries to delete the file. \""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7Zc%3D","line":165,"updated":"2014-02-27 10:21:17.000000000","message":"delete this comment; the log message below says it all","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"910baf04c738b93553c99037d3a3621061e2d2b7","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                error_util.FileFaultException,"},{"line_number":163,"context_line":"                error_util.FileLockedException,"},{"line_number":164,"context_line":"                error_util.FileNotFoundException) as e:"},{"line_number":165,"context_line":"            # There may be more than one process or thread that tries"},{"line_number":166,"context_line":"            # to delete the file."},{"line_number":167,"context_line":"            LOG.debug(_(\"Unable to delete %(ds)s. There may be more than \""},{"line_number":168,"context_line":"                        \"one process or thread that tries to delete the file. \""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7P4%3D","line":165,"in_reply_to":"AAAAVX%2F%2F7Zc%3D","updated":"2014-02-27 10:35:36.000000000","message":"Done","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae7fb7b3d89424b54f9edd2696ab7539d4403657","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                        \"datastore %(datastore)s.\"),"},{"line_number":337,"context_line":"                      {\u0027folder\u0027: folder, \u0027datastore\u0027: data_store_name})"},{"line_number":338,"context_line":"            ds_util.mkdir(self._session,"},{"line_number":339,"context_line":"                          ds_util.build_datastore_path(data_store_name,"},{"line_number":340,"context_line":"                                                       folder),"},{"line_number":341,"context_line":"                          dc_info.ref)"},{"line_number":342,"context_line":"            LOG.debug(_(\"Creating Virtual Disk of size  \""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7WI%3D","line":339,"updated":"2014-02-27 10:21:17.000000000","message":"nit: you can extract this to a variable and use it in the log statement above; this will make both code and log messages more readable","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"910baf04c738b93553c99037d3a3621061e2d2b7","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                        \"datastore %(datastore)s.\"),"},{"line_number":337,"context_line":"                      {\u0027folder\u0027: folder, \u0027datastore\u0027: data_store_name})"},{"line_number":338,"context_line":"            ds_util.mkdir(self._session,"},{"line_number":339,"context_line":"                          ds_util.build_datastore_path(data_store_name,"},{"line_number":340,"context_line":"                                                       folder),"},{"line_number":341,"context_line":"                          dc_info.ref)"},{"line_number":342,"context_line":"            LOG.debug(_(\"Creating Virtual Disk of size  \""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F7Og%3D","line":339,"in_reply_to":"AAAAVX%2F%2F7WI%3D","updated":"2014-02-27 10:35:36.000000000","message":"Done","commit_id":"71e6e4a6d9df36711a962ce4d42351bcf9beb8ab"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"65ccba39d150071ec0261f166e2ae92633e28b1c","unresolved":false,"context_lines":[{"line_number":1539,"context_line":"        return vm_folder_ref"},{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    def _create_folder_if_missing(self, ds_name, ds_ref, folder):"},{"line_number":1542,"context_line":"        \"\"\"Create a folder if it does not exist."},{"line_number":1543,"context_line":""},{"line_number":1544,"context_line":"        Currently there are two folder that are required on the datastore"},{"line_number":1545,"context_line":"         - base folder - the folder to store cached images"}],"source_content_type":"text/x-python","patch_set":45,"id":"AAAAVn%2F%2F4Ec%3D","line":1542,"updated":"2014-03-03 17:33:32.000000000","message":"can you perhaps change the name to something like create_folder_ignore_alreadyexists?   The reason i am asking is that the name of this sounds like a nice generic method, but we are actually handling 1 exception specially.  The reason for this is that the tmp or cache folder can have a race condition and that\u0027s fine.    Someone else coming along may just grab it and use it without knowing of this special handling.","commit_id":"b526fc5318af435d802543e1d69b3404c7c06760"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"134312b907557cffa0ff8b25accd66331f280e52","unresolved":false,"context_lines":[{"line_number":1539,"context_line":"        return vm_folder_ref"},{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    def _create_folder_if_missing(self, ds_name, ds_ref, folder):"},{"line_number":1542,"context_line":"        \"\"\"Create a folder if it does not exist."},{"line_number":1543,"context_line":""},{"line_number":1544,"context_line":"        Currently there are two folder that are required on the datastore"},{"line_number":1545,"context_line":"         - base folder - the folder to store cached images"}],"source_content_type":"text/x-python","patch_set":45,"id":"AAAAVn%2F%2F3Gk%3D","line":1542,"in_reply_to":"AAAAVn%2F%2F4Ec%3D","updated":"2014-03-03 18:55:58.000000000","message":"Not sure that the alternative name makes that much of a different. They both convey that this function is supposed to be an idempotent mkdir. Perhaps adding a note in the docstring that we catch/ignore is sufficient?","commit_id":"b526fc5318af435d802543e1d69b3404c7c06760"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"acf0d0583a8405c4039864dfe545f9209d634c50","unresolved":false,"context_lines":[{"line_number":1539,"context_line":"        return vm_folder_ref"},{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    def _create_folder_if_missing(self, ds_name, ds_ref, folder):"},{"line_number":1542,"context_line":"        \"\"\"Create a folder if it does not exist."},{"line_number":1543,"context_line":""},{"line_number":1544,"context_line":"        Currently there are two folder that are required on the datastore"},{"line_number":1545,"context_line":"         - base folder - the folder to store cached images"}],"source_content_type":"text/x-python","patch_set":45,"id":"AAAAVn%2F%2F22Y%3D","line":1542,"in_reply_to":"AAAAVn%2F%2F4Ec%3D","updated":"2014-03-03 19:29:33.000000000","message":"i have updated the doctring to indicate that we get an exception if the folder already exists on the datastore. I hope that this will help clarify things","commit_id":"b526fc5318af435d802543e1d69b3404c7c06760"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"65ccba39d150071ec0261f166e2ae92633e28b1c","unresolved":false,"context_lines":[{"line_number":1553,"context_line":"            ds_util.mkdir(self._session, path, ds_ref)"},{"line_number":1554,"context_line":"        except error_util.FileAlreadyExistsException:"},{"line_number":1555,"context_line":"            # NOTE(hartsocks): if the folder already exists, that"},{"line_number":1556,"context_line":"            # just means the folder was prepped by another process."},{"line_number":1557,"context_line":"            pass"},{"line_number":1558,"context_line":""},{"line_number":1559,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"}],"source_content_type":"text/x-python","patch_set":45,"id":"AAAAVn%2F%2F4DY%3D","line":1556,"updated":"2014-03-03 17:33:32.000000000","message":"still on the fence here about if this exception should be logged regardless of the fact that it may be ok - something like you have done in other places (i think)","commit_id":"b526fc5318af435d802543e1d69b3404c7c06760"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"acf0d0583a8405c4039864dfe545f9209d634c50","unresolved":false,"context_lines":[{"line_number":1553,"context_line":"            ds_util.mkdir(self._session, path, ds_ref)"},{"line_number":1554,"context_line":"        except error_util.FileAlreadyExistsException:"},{"line_number":1555,"context_line":"            # NOTE(hartsocks): if the folder already exists, that"},{"line_number":1556,"context_line":"            # just means the folder was prepped by another process."},{"line_number":1557,"context_line":"            pass"},{"line_number":1558,"context_line":""},{"line_number":1559,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"}],"source_content_type":"text/x-python","patch_set":45,"id":"AAAAVn%2F%2F2yU%3D","line":1556,"in_reply_to":"AAAAVn%2F%2F4DY%3D","updated":"2014-03-03 19:29:33.000000000","message":"I have added a log message indicating that the folder is created.","commit_id":"b526fc5318af435d802543e1d69b3404c7c06760"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d652826d36488a27cd33a6ee98e60ed66bde6392","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1627,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1628,"context_line":""},{"line_number":1629,"context_line":"    def create_cache_folder(self, ds_name, ds_ref):"},{"line_number":1630,"context_line":"        try:"},{"line_number":1631,"context_line":"            path \u003d vm_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1632,"context_line":"            self._mkdir(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2FqN0%3D","side":"PARENT","line":1629,"updated":"2014-03-04 19:57:22.000000000","message":"try this, make the method:\n\n  def check_cache_folder(self, ds_name, ds_ref):\n      _create_folder_if_missing(ds_name, ds_ref, self._base_folder)\n\n  def check_temp_folder(self, ds_name, ds_ref):\n      _create_folder_if_missing(ds_name, ds_ref, self._tmp_folder)\n\npublic names are not mistakes here. I\u0027m deliberately declaring these to be \"safe\" utility methods.","commit_id":"e3e049f8a28b9d5ee9c112ef7e7aaec7706401f5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"937d08001aec62f43ea4980187daaa26b7eea87c","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1627,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1628,"context_line":""},{"line_number":1629,"context_line":"    def create_cache_folder(self, ds_name, ds_ref):"},{"line_number":1630,"context_line":"        try:"},{"line_number":1631,"context_line":"            path \u003d vm_util.build_datastore_path(ds_name, self._base_folder)"},{"line_number":1632,"context_line":"            self._mkdir(path, ds_ref)"}],"source_content_type":"text/x-python","patch_set":46,"id":"AAAAVn%2F%2Fp7M%3D","side":"PARENT","line":1629,"in_reply_to":"AAAAVn%2F%2FqN0%3D","updated":"2014-03-04 21:32:23.000000000","message":"Done","commit_id":"e3e049f8a28b9d5ee9c112ef7e7aaec7706401f5"}]}
