)]}'
{"nova/tests/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"6cdab1208f16618f091eb2d798fb4a9573c7d894","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        self._create_vm(uuid\u003duuid)"},{"line_number":435,"context_line":"        info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":436,"context_line":"                                   \u0027node\u0027: self.instance_node})"},{"line_number":437,"context_line":"        self._check_vm_info(info, power_state.RUNNING)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def test_spawn(self):"},{"line_number":440,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BZT4%3D","line":437,"updated":"2014-01-27 12:24:25.000000000","message":"Is this creating a duplicate directory? I\u0027d have thought a simpler test would be to call mkdir twice with the same arguments.","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ad504c38564551199d571c942243f0eedef1f1d6","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        self._create_vm(uuid\u003duuid)"},{"line_number":435,"context_line":"        info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":436,"context_line":"                                   \u0027node\u0027: self.instance_node})"},{"line_number":437,"context_line":"        self._check_vm_info(info, power_state.RUNNING)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def test_spawn(self):"},{"line_number":440,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BYwU%3D","line":437,"in_reply_to":"AAAAUH%2F%2BZT4%3D","updated":"2014-01-27 13:58:07.000000000","message":"The driver has a emulation of the backend. The datastore is not a file directory locally but it is an array in memory. This is interfaced using vmwareapi_fake._add_file. So the directory is actually created by using this command","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52d5a18f3a506ca166f9989ecaf34f973b2a9274","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        def fake_path_file_exists(browser, folder_path, file_name):"},{"line_number":426,"context_line":"            return False, False"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        self.stubs.Set(self.conn._vmops, \"_path_file_exists\","},{"line_number":429,"context_line":"                       fake_path_file_exists)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKsk%3D","line":428,"updated":"2014-01-29 14:33:18.000000000","message":"Can\u0027t we use mock here?","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f917e1ddaf00f85110ebc73dec36499f72328d1b","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        def fake_path_file_exists(browser, folder_path, file_name):"},{"line_number":426,"context_line":"            return False, False"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        self.stubs.Set(self.conn._vmops, \"_path_file_exists\","},{"line_number":429,"context_line":"                       fake_path_file_exists)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKpg%3D","line":428,"in_reply_to":"AAAAUH%2F%2BKsk%3D","updated":"2014-01-29 14:39:32.000000000","message":"Done","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52d5a18f3a506ca166f9989ecaf34f973b2a9274","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                       fake_path_file_exists)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":432,"context_line":"        uuid \u003d uuidutils.generate_uuid()"},{"line_number":433,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":434,"context_line":"        self._create_vm(uuid\u003duuid)"},{"line_number":435,"context_line":"        info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKsU%3D","line":432,"updated":"2014-01-29 14:33:18.000000000","message":"Why is this needed?","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f917e1ddaf00f85110ebc73dec36499f72328d1b","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                       fake_path_file_exists)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":432,"context_line":"        uuid \u003d uuidutils.generate_uuid()"},{"line_number":433,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":434,"context_line":"        self._create_vm(uuid\u003duuid)"},{"line_number":435,"context_line":"        info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKpo%3D","line":432,"in_reply_to":"AAAAUH%2F%2BKsU%3D","updated":"2014-01-29 14:39:32.000000000","message":"my bad. copy/paste","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e318394eac7bac349de76fcf8195cc70cec5596e","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":429,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        with contextlib.nested("},{"line_number":432,"context_line":"            mock.patch.object(self.conn._vmops, \u0027_path_file_exists\u0027,"},{"line_number":433,"context_line":"                              fake_path_file_exists)"},{"line_number":434,"context_line":"        ) as (_path_file_exists):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BKWc%3D","line":431,"updated":"2014-01-29 15:33:39.000000000","message":"You don\u0027t need a nested context, just do:\n\nwith mock.patch.object(...):","commit_id":"7800c4efaa4b33fb59b2ec6c6e7a2a85cf888985"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"06a71affa4a8f09c50e1e8a9949735fcd0b7087b","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":429,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        with contextlib.nested("},{"line_number":432,"context_line":"            mock.patch.object(self.conn._vmops, \u0027_path_file_exists\u0027,"},{"line_number":433,"context_line":"                              fake_path_file_exists)"},{"line_number":434,"context_line":"        ) as (_path_file_exists):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BJ48%3D","line":431,"in_reply_to":"AAAAUH%2F%2BKWc%3D","updated":"2014-01-29 16:34:42.000000000","message":"Done","commit_id":"7800c4efaa4b33fb59b2ec6c6e7a2a85cf888985"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b99d7d77766ab6a2c23fedc454ba20abccbf0c42","unresolved":false,"context_lines":[{"line_number":431,"context_line":"        with ("},{"line_number":432,"context_line":"            mock.patch.object(self.conn._vmops, \u0027_path_file_exists\u0027,"},{"line_number":433,"context_line":"                              fake_path_file_exists)"},{"line_number":434,"context_line":"        ) as (_path_file_exists):"},{"line_number":435,"context_line":"            self._create_vm()"},{"line_number":436,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":437,"context_line":"                                       \u0027node\u0027: self.instance_node})"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BJ28%3D","line":434,"updated":"2014-01-29 16:38:54.000000000","message":"nit: don\u0027t really need this since you\u0027re not using it","commit_id":"db547f41613a5da23d25b3da1abe6ff62be2ebab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e55e40cd72ae2d93e1505e7d60bb0e06a9f7261c","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        self.assertTrue(vmwareapi_fake.get_file(file))"},{"line_number":444,"context_line":"        self.assertTrue(vmwareapi_fake.get_file(root))"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"    def test_spawn_with_existing_directory(self):"},{"line_number":447,"context_line":"        def fake_path_file_exists(browser, folder_path, file_name):"},{"line_number":448,"context_line":"            return False, False"},{"line_number":449,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9yqo%3D","line":446,"updated":"2014-02-03 21:53:00.000000000","message":"nit: @mock.patch.object(self.conn._vmops, \u0027_path_file_exists\u0027, return_value\u003d(False, False))","commit_id":"700d32abf4ba18e008659ac892e924d82bb30d43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b82c3860d7193444222bee8bcf435366d9a853f3","unresolved":false,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_path_file_exists\u0027,"},{"line_number":446,"context_line":"                       return_value\u003d(False, False))"},{"line_number":447,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":448,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":449,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":450,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FplY%3D","line":447,"updated":"2014-02-11 18:47:44.000000000","message":"nit: maybe add a comment in the test case that this is testing that the code is handling the file already exists vmware exception and shows that it doesn\u0027t kill the spawn.","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f8c68cba2f8eb7a55672377359491bf533fdad94","unresolved":false,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_path_file_exists\u0027,"},{"line_number":446,"context_line":"                       return_value\u003d(False, False))"},{"line_number":447,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":448,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":449,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":450,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FlVA%3D","line":447,"in_reply_to":"AAAAUX%2F%2FplY%3D","updated":"2014-02-12 07:39:36.000000000","message":"Done","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"eee6204d35bc03d501e4e1db21e09d340f05802f","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                       return_value\u003d(False, False))"},{"line_number":472,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":473,"context_line":"        # The test will validate that the spawn succeeds when"},{"line_number":474,"context_line":"        # base folder alreday exists."},{"line_number":475,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":476,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":477,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2FI%2Bs%3D","line":474,"updated":"2014-02-16 09:17:54.000000000","message":"s/alreday/already/","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5da152b82b532a4eff993015ee38b92bada4a928","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                       return_value\u003d(False, False))"},{"line_number":472,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":473,"context_line":"        # The test will validate that the spawn succeeds when"},{"line_number":474,"context_line":"        # base folder alreday exists."},{"line_number":475,"context_line":"        self.flags(use_linked_clone\u003dTrue, group\u003d\u0027vmware\u0027)"},{"line_number":476,"context_line":"        vmwareapi_fake._add_file(\u0027[%s] vmware_base\u0027 % self.ds)"},{"line_number":477,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2BxFM%3D","line":474,"in_reply_to":"AAAAUX%2F%2FI%2Bs%3D","updated":"2014-02-19 07:31:38.000000000","message":"Done","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"907f2a68cde055f5d6487e983bbbeddcc7e7e119","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        self.assertTrue(vmwareapi_fake.get_file(root))"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_path_file_exists\u0027,"},{"line_number":483,"context_line":"                       return_value\u003d(False, False))"},{"line_number":484,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":485,"context_line":"        # The test will validate that the spawn succeeds when"},{"line_number":486,"context_line":"        # base folder already exists."}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F4Es%3D","line":483,"updated":"2014-02-24 10:51:55.000000000","message":"Ummmm doesn\u0027t this check if the whole thing works when path DOES NOT exitst?\n\nKinda makes the name of the test wrong, no?","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"82cc79ca9e13389fba65b40ec1666f9d0797f4b9","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        self.assertTrue(vmwareapi_fake.get_file(root))"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_path_file_exists\u0027,"},{"line_number":483,"context_line":"                       return_value\u003d(False, False))"},{"line_number":484,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":485,"context_line":"        # The test will validate that the spawn succeeds when"},{"line_number":486,"context_line":"        # base folder already exists."}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F2ak%3D","line":483,"in_reply_to":"AAAAU3%2F%2F3nc%3D","updated":"2014-02-24 14:47:36.000000000","message":"Ah right - sorry about that","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3c781d30dd32268c59a7cf19f4c1f927ac0694fe","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        self.assertTrue(vmwareapi_fake.get_file(root))"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_path_file_exists\u0027,"},{"line_number":483,"context_line":"                       return_value\u003d(False, False))"},{"line_number":484,"context_line":"    def test_spawn_with_existing_directory(self, fake_path_file):"},{"line_number":485,"context_line":"        # The test will validate that the spawn succeeds when"},{"line_number":486,"context_line":"        # base folder already exists."}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F3nc%3D","line":483,"in_reply_to":"AAAAU3%2F%2F4Es%3D","updated":"2014-02-24 11:56:00.000000000","message":"In order for us to test that the mkdir returns FileAlreadyExistsException we need to make sure that it is actually called. The test here simulates the case when the mkdir is called and the file actually exists. The file exists as we add it in line 488. In order for the mkdir to be called we need that the _path_file_exists be overridden and returns False. I hope that this make sense.","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"}],"nova/virt/vmwareapi/fake.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b82c3860d7193444222bee8bcf435366d9a853f3","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        if _db_content.get(\"files\", None) is None:"},{"line_number":1101,"context_line":"            raise exception.NoFilesFound()"},{"line_number":1102,"context_line":"        if get_file(ds_path):"},{"line_number":1103,"context_line":"            raise error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS)"},{"line_number":1104,"context_line":"        _db_content[\"files\"].append(ds_path)"},{"line_number":1105,"context_line":""},{"line_number":1106,"context_line":"    def _set_power_state(self, method, vm_ref, pwr_state\u003d\"poweredOn\"):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FpmI%3D","line":1103,"updated":"2014-02-11 18:47:44.000000000","message":"Raise your specific exception type class now rather than use the mapping utility.","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f8c68cba2f8eb7a55672377359491bf533fdad94","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        if _db_content.get(\"files\", None) is None:"},{"line_number":1101,"context_line":"            raise exception.NoFilesFound()"},{"line_number":1102,"context_line":"        if get_file(ds_path):"},{"line_number":1103,"context_line":"            raise error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS)"},{"line_number":1104,"context_line":"        _db_content[\"files\"].append(ds_path)"},{"line_number":1105,"context_line":""},{"line_number":1106,"context_line":"    def _set_power_state(self, method, vm_ref, pwr_state\u003d\"poweredOn\"):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FlSI%3D","line":1103,"in_reply_to":"AAAAUX%2F%2FpmI%3D","updated":"2014-02-12 07:39:36.000000000","message":"Done","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"b5786194902df26d3ff7a3d7aa8a8a1ffc90c80f","unresolved":false,"context_lines":[{"line_number":1581,"context_line":"                    self._session._get_vim().get_service_content().fileManager,"},{"line_number":1582,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1583,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1584,"context_line":"        except Exception as e:"},{"line_number":1585,"context_line":"            LOG.warning(_(\"Directory with path \u0027%s\u0027 alteady exists\"), ds_path)"},{"line_number":1586,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1587,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2B%2BiY%3D","line":1584,"updated":"2014-01-20 07:33:52.000000000","message":"seems like an obvious question so maybe it was explained already, but can this be a more specific exception  class, since it seems from the commit message that you have a particular error scenario in mind?  The risk with this generic statement is that it will catch and swallow any exception, potentially incorrectly reporting that the path already exists.","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":8302,"name":"Ryan Hsu","email":"hryan@vmware.com","username":"rhsu"},"change_message_id":"c49748aca85cec9b1f06aa7ccd9bd079655a5258","unresolved":false,"context_lines":[{"line_number":1581,"context_line":"                    self._session._get_vim().get_service_content().fileManager,"},{"line_number":1582,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1583,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1584,"context_line":"        except Exception as e:"},{"line_number":1585,"context_line":"            LOG.warning(_(\"Directory with path \u0027%s\u0027 alteady exists\"), ds_path)"},{"line_number":1586,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1587,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bfwc%3D","line":1584,"in_reply_to":"AAAAUH%2F%2B%2BiY%3D","updated":"2014-01-24 23:46:33.000000000","message":"Gary, is it possible to check against the FileAlreadyExists fault [1]? If not, what about checking against the VimFaultException message pattern in the bug report [2].\n\n[1] https://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.fault.FileAlreadyExists.html\n\n[2] https://bugs.launchpad.net/nova/+bug/1266579","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ad504c38564551199d571c942243f0eedef1f1d6","unresolved":false,"context_lines":[{"line_number":1581,"context_line":"                    self._session._get_vim().get_service_content().fileManager,"},{"line_number":1582,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1583,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1584,"context_line":"        except Exception as e:"},{"line_number":1585,"context_line":"            LOG.warning(_(\"Directory with path \u0027%s\u0027 alteady exists\"), ds_path)"},{"line_number":1586,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1587,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BYv0%3D","line":1584,"in_reply_to":"AAAAUH%2F%2Bfwc%3D","updated":"2014-01-27 13:58:07.000000000","message":"Sadly that exception is not passed to the code from SUDS. This is certainly something that we should look at improving, that is, we should elevate the backend exception and then treat accordingly.\nIt is something that I think that we should work on in the future.","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"6cdab1208f16618f091eb2d798fb4a9573c7d894","unresolved":false,"context_lines":[{"line_number":1582,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1583,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1584,"context_line":"        except Exception as e:"},{"line_number":1585,"context_line":"            LOG.warning(_(\"Directory with path \u0027%s\u0027 alteady exists\"), ds_path)"},{"line_number":1586,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1587,"context_line":""},{"line_number":1588,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BZVo%3D","line":1585,"updated":"2014-01-27 12:24:25.000000000","message":"In case you missed it, \u0027already\u0027.","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ad504c38564551199d571c942243f0eedef1f1d6","unresolved":false,"context_lines":[{"line_number":1582,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1583,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1584,"context_line":"        except Exception as e:"},{"line_number":1585,"context_line":"            LOG.warning(_(\"Directory with path \u0027%s\u0027 alteady exists\"), ds_path)"},{"line_number":1586,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1587,"context_line":""},{"line_number":1588,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BYvw%3D","line":1585,"in_reply_to":"AAAAUH%2F%2BZVo%3D","updated":"2014-01-27 13:58:07.000000000","message":"Done","commit_id":"fbdc4147566f1441c1c2bd70e671799ebbdbabc5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52d5a18f3a506ca166f9989ecaf34f973b2a9274","unresolved":false,"context_lines":[{"line_number":1609,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1610,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1611,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1614,"context_line":"                                     folder_name, file_name):"},{"line_number":1615,"context_line":"        ds_browser \u003d self._session._call_method("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKs8%3D","line":1612,"updated":"2014-01-29 14:33:18.000000000","message":"Why don\u0027t we synchronize this method?","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc149ff235a7f65e45f0d8bc5b37cda016a1a21f","unresolved":false,"context_lines":[{"line_number":1609,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1610,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1611,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1614,"context_line":"                                     folder_name, file_name):"},{"line_number":1615,"context_line":"        ds_browser \u003d self._session._call_method("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKo4%3D","line":1612,"in_reply_to":"AAAAUH%2F%2BKrE%3D","updated":"2014-01-29 14:41:48.000000000","message":"Should we have a comment in the code explaining that?","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f917e1ddaf00f85110ebc73dec36499f72328d1b","unresolved":false,"context_lines":[{"line_number":1609,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1610,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1611,"context_line":"        LOG.debug(_(\"Created directory with path %s\") % ds_path)"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1614,"context_line":"                                     folder_name, file_name):"},{"line_number":1615,"context_line":"        ds_browser \u003d self._session._call_method("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKrE%3D","line":1612,"in_reply_to":"AAAAUH%2F%2BKs8%3D","updated":"2014-01-29 14:39:32.000000000","message":"this is the same as the previous patch set (https://review.openstack.org/#/c/69622/). There may be more than one nova-compute checking this opertaion","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d8a6e879b8aaf362962c01793cec3ce8f088407a","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1627,"context_line":"                                                         self._base_folder),"},{"line_number":1628,"context_line":"                            ds_ref)"},{"line_number":1629,"context_line":"            except Exception as e:"},{"line_number":1630,"context_line":"                # TODO(garyk): ensure that _call_method raises an exception"},{"line_number":1631,"context_line":"                # that can be specifically treated here."},{"line_number":1632,"context_line":"                LOG.warning(_(\"Directory with path \u0027%(folder)s\u0027 already \""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BKZ0%3D","line":1629,"updated":"2014-01-29 15:25:27.000000000","message":"Again, why is there not a more specific exception to catch here?","commit_id":"234666a7db22eb9e16160720711de643c8b27ddc"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"412f98b09bcf44df1a6bf99f144510c1837aa2b1","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1635,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1636,"context_line":"                # TODO(garyk): ensure that _call_method raises an exception"},{"line_number":1637,"context_line":"                # that can be specifically treated here."},{"line_number":1638,"context_line":"                LOG.warning(_(\"Directory with path \u0027%(folder)s\u0027 already \""},{"line_number":1639,"context_line":"                              \"exists. Exception: %(ex)s.\"),"},{"line_number":1640,"context_line":"                            {\u0027folder\u0027: self._base_folder, \u0027ex\u0027: e})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2BCCA%3D","line":1637,"updated":"2014-01-30 20:17:20.000000000","message":"It would be really nice to fix this TODO so that this doesn\u0027t swallow unexpected exceptions.","commit_id":"12b6b032df32fad8af35dba19bab4c5a0136273a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"68eeff7368ff48c5c8b33af86be300acc00ffc61","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1635,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1636,"context_line":"                # TODO(garyk): ensure that _call_method raises an exception"},{"line_number":1637,"context_line":"                # that can be specifically treated here."},{"line_number":1638,"context_line":"                LOG.warning(_(\"Directory with path \u0027%(folder)s\u0027 already \""},{"line_number":1639,"context_line":"                              \"exists. Exception: %(ex)s.\"),"},{"line_number":1640,"context_line":"                            {\u0027folder\u0027: self._base_folder, \u0027ex\u0027: e})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F99JQ%3D","line":1637,"in_reply_to":"AAAAUH%2F%2BCCA%3D","updated":"2014-01-31 17:49:13.000000000","message":"i am currently working on that - it is wip https://review.openstack.org/#/c/70137/","commit_id":"12b6b032df32fad8af35dba19bab4c5a0136273a"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3bdd04a5aa3bde4ca3b5a2e68c0e1d3dc61b9ea9","unresolved":false,"context_lines":[{"line_number":1622,"context_line":"                                                            folder_path,"},{"line_number":1623,"context_line":"                                                            file_name)"},{"line_number":1624,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1625,"context_line":"        if not folder_exists:"},{"line_number":1626,"context_line":"            try:"},{"line_number":1627,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1628,"context_line":"                                                         self._base_folder),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F9oRk%3D","line":1625,"updated":"2014-02-05 14:51:55.000000000","message":"why do we make this check at all? why not simply always do mkdir and catch FileAlreadyExists? this will also save one remote call in the case when the folder doesn\u0027t exist","commit_id":"419fcd03ae7f56e8eed8a70da1d9058f93d0ea7f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"afe3b6ca4c5c24888df80a423dbecf0b5508d8eb","unresolved":false,"context_lines":[{"line_number":1622,"context_line":"                                                            folder_path,"},{"line_number":1623,"context_line":"                                                            file_name)"},{"line_number":1624,"context_line":"        # Ensure that the cache folder exists"},{"line_number":1625,"context_line":"        if not folder_exists:"},{"line_number":1626,"context_line":"            try:"},{"line_number":1627,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1628,"context_line":"                                                         self._base_folder),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F9ick%3D","line":1625,"in_reply_to":"AAAAUH%2F9oRk%3D","updated":"2014-02-06 07:35:15.000000000","message":"that is a good idea. i would prefer to do that in a different patch as it is outside of the scope of this one","commit_id":"419fcd03ae7f56e8eed8a70da1d9058f93d0ea7f"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"64019cfa7e2ed8c38bcaa7f544aa6511f4c6e533","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1636,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1637,"context_line":"                LOG.warning(_(\"Directory with path \u0027%s\u0027 already exists.\"),"},{"line_number":1638,"context_line":"                            self._base_folder)"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"        return file_exists"},{"line_number":1641,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F9km4%3D","line":1638,"updated":"2014-02-05 23:25:42.000000000","message":"Is this warning really needed?  I don\u0027t think it\u0027s a problem if someone else created it.","commit_id":"419fcd03ae7f56e8eed8a70da1d9058f93d0ea7f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"afe3b6ca4c5c24888df80a423dbecf0b5508d8eb","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1636,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1637,"context_line":"                LOG.warning(_(\"Directory with path \u0027%s\u0027 already exists.\"),"},{"line_number":1638,"context_line":"                            self._base_folder)"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"        return file_exists"},{"line_number":1641,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F9icg%3D","line":1638,"in_reply_to":"AAAAUH%2F9km4%3D","updated":"2014-02-06 07:35:15.000000000","message":"Done","commit_id":"419fcd03ae7f56e8eed8a70da1d9058f93d0ea7f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b82c3860d7193444222bee8bcf435366d9a853f3","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1630,"context_line":"                                                         self._base_folder),"},{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":1633,"context_line":"                # There may be more than one process or thread that tries"},{"line_number":1634,"context_line":"                # to create the directory. This is due to the fact that"},{"line_number":1635,"context_line":"                # the folder check returned that it did not exist. Another"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FpmM%3D","line":1632,"updated":"2014-02-11 18:47:44.000000000","message":"Can we catch the actual FileAlreadyExists VMwareDriverException now rather than using this conversion/mapping utility?","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f8c68cba2f8eb7a55672377359491bf533fdad94","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1630,"context_line":"                                                         self._base_folder),"},{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":1633,"context_line":"                # There may be more than one process or thread that tries"},{"line_number":1634,"context_line":"                # to create the directory. This is due to the fact that"},{"line_number":1635,"context_line":"                # the folder check returned that it did not exist. Another"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FlRs%3D","line":1632,"in_reply_to":"AAAAUX%2F%2FpmM%3D","updated":"2014-02-12 07:39:36.000000000","message":"I would prefer that we use the get_fault_class. The reason for this is that soon this will be maintained in OSLO. If we have a generic API then it will be easier to port the code.","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b82c3860d7193444222bee8bcf435366d9a853f3","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"File already exists\"))"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        return file_exists"},{"line_number":1642,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FpmY%3D","line":1639,"updated":"2014-02-11 18:47:44.000000000","message":"Let\u0027s put the path in the debug message for context.","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f8c68cba2f8eb7a55672377359491bf533fdad94","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"File already exists\"))"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        return file_exists"},{"line_number":1642,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAUX%2F%2FlR0%3D","line":1639,"in_reply_to":"AAAAUX%2F%2FpmY%3D","updated":"2014-02-12 07:39:36.000000000","message":"Done","commit_id":"35336c0986288ae58ebf922325b7339f3b153ea2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"03450e483b34e4ff16dfdfb8c94b015539ab01cb","unresolved":false,"context_lines":[{"line_number":1630,"context_line":"                                                         self._base_folder),"},{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.FileAlreadyExistsException:"},{"line_number":1633,"context_line":"                # There may be more than one process or thread that tries"},{"line_number":1634,"context_line":"                # to create the directory. This is due to the fact that"},{"line_number":1635,"context_line":"                # the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2FIE0%3D","line":1633,"updated":"2014-02-16 20:23:18.000000000","message":"nit: prefix with NOTE(garyk):","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"03450e483b34e4ff16dfdfb8c94b015539ab01cb","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"File %(folder)s already exists on %(ds)s.\"),"},{"line_number":1640,"context_line":"                          {\u0027folder\u0027: self._base_folder, \u0027ds\u0027: ds_name})"},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"        return file_exists"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2FIE4%3D","line":1640,"updated":"2014-02-16 20:23:18.000000000","message":"Should this be subbing with fold_path instead of _base_folder?","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5da152b82b532a4eff993015ee38b92bada4a928","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"File %(folder)s already exists on %(ds)s.\"),"},{"line_number":1640,"context_line":"                          {\u0027folder\u0027: self._base_folder, \u0027ds\u0027: ds_name})"},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"        return file_exists"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2BxDA%3D","line":1640,"in_reply_to":"AAAAUX%2F%2B6NI%3D","updated":"2014-02-19 07:31:38.000000000","message":"The folder in question here is self._base_folder. The folder_path is the full path.\nI will add both to the log message. I guess that they are both useful.","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"c5ace978695ff02678e03e1d9ccd43e135418a77","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"File %(folder)s already exists on %(ds)s.\"),"},{"line_number":1640,"context_line":"                          {\u0027folder\u0027: self._base_folder, \u0027ds\u0027: ds_name})"},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"        return file_exists"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAUX%2F%2B6NI%3D","line":1640,"in_reply_to":"AAAAUX%2F%2FIE4%3D","updated":"2014-02-18 09:11:00.000000000","message":"Hi Matt, I feel it should not be folder_path. folder_path is the child directory name which contains image id. This piece of code is to ensure its parent directory exists. The folder_path will be created by the \"moving folder\" task, after calling this checking.","commit_id":"cb28e7f7df7f9428f8ba64b42281cb3f7aa3acaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74a44aad3b43312f5436268c27bcfb935498b68f","unresolved":false,"context_lines":[{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.FileAlreadyExistsException:"},{"line_number":1633,"context_line":"                # NOTE(garyk): There may be more than one process or thread"},{"line_number":1634,"context_line":"                # that triesi to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAUX%2F%2BqpQ%3D","line":1634,"updated":"2014-02-19 22:17:47.000000000","message":"s/triesi/tries/","commit_id":"e6674dd3caae629461dd12deb99740d9c7d68c6b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"243e4af0a173149508cf7e11f978cf3e1707f7fb","unresolved":false,"context_lines":[{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.FileAlreadyExistsException:"},{"line_number":1633,"context_line":"                # NOTE(garyk): There may be more than one process or thread"},{"line_number":1634,"context_line":"                # that triesi to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAUX%2F%2BnYQ%3D","line":1634,"in_reply_to":"AAAAUX%2F%2BqpQ%3D","updated":"2014-02-20 07:47:17.000000000","message":"Done","commit_id":"e6674dd3caae629461dd12deb99740d9c7d68c6b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74a44aad3b43312f5436268c27bcfb935498b68f","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"Base folder %(base)s already exists on %(ds)s. \""},{"line_number":1640,"context_line":"                            \"Continuuing with treatment of %(folder)s.\"),"},{"line_number":1641,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"},{"line_number":1642,"context_line":"                           \u0027folder\u0027: folder_path})"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAUX%2F%2Bqos%3D","line":1640,"updated":"2014-02-19 22:17:47.000000000","message":"s/Continuuing/Continuing/\n\nBTW, what does \u0027treatment\u0027 mean here?","commit_id":"e6674dd3caae629461dd12deb99740d9c7d68c6b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"243e4af0a173149508cf7e11f978cf3e1707f7fb","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"Base folder %(base)s already exists on %(ds)s. \""},{"line_number":1640,"context_line":"                            \"Continuuing with treatment of %(folder)s.\"),"},{"line_number":1641,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"},{"line_number":1642,"context_line":"                           \u0027folder\u0027: folder_path})"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAUX%2F%2BnYM%3D","line":1640,"in_reply_to":"AAAAUX%2F%2Bqos%3D","updated":"2014-02-20 07:47:17.000000000","message":"Done","commit_id":"e6674dd3caae629461dd12deb99740d9c7d68c6b"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ef0fdb4541261ad04ee037acbfbfb06a299c0931","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"Folder %(folder)s does not exist. Base folder \""},{"line_number":1640,"context_line":"                            \"%(base)s already exists on %(ds)s.\"),"},{"line_number":1641,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUX%2F%2Blxo%3D","line":1638,"updated":"2014-02-20 10:25:13.000000000","message":"we are not catching the general exception any more but the specific one, right? I think this is a left-over from previous revisions of the patch","commit_id":"0bae5d32fcf0fdba9349b10e1c0e5f2bd12eba9d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a978d4e396b5da608e35573aac21aa939d1de374","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore. Currently the only way of detecting that"},{"line_number":1638,"context_line":"                # the folder exists is to catch the general exception."},{"line_number":1639,"context_line":"                LOG.debug(_(\"Folder %(folder)s does not exist. Base folder \""},{"line_number":1640,"context_line":"                            \"%(base)s already exists on %(ds)s.\"),"},{"line_number":1641,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUX%2F%2Ble8%3D","line":1638,"in_reply_to":"AAAAUX%2F%2Blxo%3D","updated":"2014-02-20 11:02:09.000000000","message":"Done","commit_id":"0bae5d32fcf0fdba9349b10e1c0e5f2bd12eba9d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a88b5ec916bd286c6072ebff491b81050906eeb0","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore."},{"line_number":1638,"context_line":"                LOG.debug(_(\"Folder %(folder)s does not exist. Parent folder \""},{"line_number":1639,"context_line":"                            \"%(base)s already exists on %(ds)s.\"),"},{"line_number":1640,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"},{"line_number":1641,"context_line":"                           \u0027folder\u0027: folder_path})"}],"source_content_type":"text/x-python","patch_set":40,"id":"AAAAUX%2F%2BkfM%3D","line":1638,"updated":"2014-02-20 13:16:10.000000000","message":"Talked with Gary a bit in IRC, I think if we leave this debug message in we need to reword it because \"folder does not exist\" when you\u0027re in an exception block because the folder already exists, is confusing.  So we should word it somehow that makes it useful (and not confusing) for debugging (but I\u0027m not sure what you\u0027re debugging if you don\u0027t fail), or just remove the log message since the comment explains what\u0027s going on (and then just pass).\n\nMaybe take out the \"folder does not exist\" and instead have something like, \"Multiple processes/threads are trying to create cache %(folder_path)s concurrently within parent directory %(base)s on %(ds)s.\"","commit_id":"54330ecb716d79cd3e9972fc254110e622df2742"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cb8613a8b0adec4aace603164c786d4741abc925","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore."},{"line_number":1638,"context_line":"                LOG.debug(_(\"Folder %(folder)s does not exist. Parent folder \""},{"line_number":1639,"context_line":"                            \"%(base)s already exists on %(ds)s.\"),"},{"line_number":1640,"context_line":"                          {\u0027base\u0027: self._base_folder, \u0027ds\u0027: ds_name,"},{"line_number":1641,"context_line":"                           \u0027folder\u0027: folder_path})"}],"source_content_type":"text/x-python","patch_set":40,"id":"AAAAUX%2F%2Bkcw%3D","line":1638,"in_reply_to":"AAAAUX%2F%2BkfM%3D","updated":"2014-02-20 13:21:11.000000000","message":"Done","commit_id":"54330ecb716d79cd3e9972fc254110e622df2742"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0c1c166e46bbcb3be08b9072d37e6fc3ea6a7789","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1630,"context_line":"                                                         self._base_folder),"},{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.FileAlreadyExistsException:"},{"line_number":1633,"context_line":"                # NOTE(garyk): There may be more than one process or thread"},{"line_number":1634,"context_line":"                # that tries to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAUX%2F%2BaxU%3D","line":1632,"updated":"2014-02-21 09:31:21.000000000","message":"I know this was added in a different patch that is already merged but shouldn\u0027t it really be - Directory(Folder)AlreadyExists ??","commit_id":"25d608411aee5d5c4da6852d7543be1da0f60996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a505dde3aa325d34f53b25a6c4f18be4384582c6","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                self._mkdir(vm_util.build_datastore_path(ds_name,"},{"line_number":1630,"context_line":"                                                         self._base_folder),"},{"line_number":1631,"context_line":"                            ds_ref)"},{"line_number":1632,"context_line":"            except error_util.FileAlreadyExistsException:"},{"line_number":1633,"context_line":"                # NOTE(garyk): There may be more than one process or thread"},{"line_number":1634,"context_line":"                # that tries to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAUX%2F%2BYME%3D","line":1632,"in_reply_to":"AAAAUX%2F%2BaxU%3D","updated":"2014-02-21 14:42:57.000000000","message":"The exception that is raised from the VC is \u0027FileAlreadyExists\u0027","commit_id":"25d608411aee5d5c4da6852d7543be1da0f60996"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0c1c166e46bbcb3be08b9072d37e6fc3ea6a7789","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                # that tries to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore."},{"line_number":1638,"context_line":"                LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1639,"context_line":"                            \"cache %(folder_path)s concurrently within parent \""},{"line_number":1640,"context_line":"                            \"directory %(base)s on %(ds)s.\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAUX%2F%2BaoY%3D","line":1637,"updated":"2014-02-21 09:31:21.000000000","message":"So why bother with the check at all? \n\nAlso the name of the method is sort of bad since it no way tells us about the sideffect of always creating a folder.\n\nAll that aside - there is really no point in the if not folder_exists: anymore afaict.","commit_id":"25d608411aee5d5c4da6852d7543be1da0f60996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f2882e7b166754e8dec89bcc5fe83ba84cb09450","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                # that tries to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore."},{"line_number":1638,"context_line":"                LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1639,"context_line":"                            \"cache %(folder_path)s concurrently within parent \""},{"line_number":1640,"context_line":"                            \"directory %(base)s on %(ds)s.\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAUX%2F%2BYGI%3D","line":1637,"in_reply_to":"AAAAUX%2F%2BYLk%3D","updated":"2014-02-21 14:54:00.000000000","message":"the folder exists is a result of a remote call. another process could have created the folder between the time that result was received and now. the mkdir is the only way that we can actially validate that the file does not exist","commit_id":"25d608411aee5d5c4da6852d7543be1da0f60996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a505dde3aa325d34f53b25a6c4f18be4384582c6","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                # that tries to create the directory. This is due to the fact"},{"line_number":1635,"context_line":"                # that the folder check returned that it did not exist. Another"},{"line_number":1636,"context_line":"                # process or thread could have created the folder"},{"line_number":1637,"context_line":"                # on the datastore."},{"line_number":1638,"context_line":"                LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1639,"context_line":"                            \"cache %(folder_path)s concurrently within parent \""},{"line_number":1640,"context_line":"                            \"directory %(base)s on %(ds)s.\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAUX%2F%2BYLk%3D","line":1637,"in_reply_to":"AAAAUX%2F%2BaoY%3D","updated":"2014-02-21 14:42:57.000000000","message":"Agreed. I have addressed that in a better way in https://review.openstack.org/#/c/63933/","commit_id":"25d608411aee5d5c4da6852d7543be1da0f60996"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"87dab93ba165400de690d115fc922c49fbd8dcbe","unresolved":false,"context_lines":[{"line_number":1639,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1640,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1641,"context_line":"        except error_util.FileAlreadyExistsException:"},{"line_number":1642,"context_line":"            # NOTE(garyk): There may be more than one process or thread"},{"line_number":1643,"context_line":"            # that tries to create the directory."},{"line_number":1644,"context_line":"            LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1645,"context_line":"                        \"directory %(ds_path)s on %(ds)s.\"),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAU3%2F%2F4hY%3D","line":1642,"updated":"2014-02-24 09:56:26.000000000","message":"nit: I think this comment is redundant given the log statement below","commit_id":"f2179fc8d88e8e3f337af669aad5f6d6a138d015"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9c186c8e82cba4db38bec4a837e9b2f8986d939c","unresolved":false,"context_lines":[{"line_number":1639,"context_line":"                    name\u003dds_path, datacenter\u003ddc_info.ref,"},{"line_number":1640,"context_line":"                    createParentDirectories\u003dTrue)"},{"line_number":1641,"context_line":"        except error_util.FileAlreadyExistsException:"},{"line_number":1642,"context_line":"            # NOTE(garyk): There may be more than one process or thread"},{"line_number":1643,"context_line":"            # that tries to create the directory."},{"line_number":1644,"context_line":"            LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1645,"context_line":"                        \"directory %(ds_path)s on %(ds)s.\"),"}],"source_content_type":"text/x-python","patch_set":42,"id":"AAAAU3%2F%2F4bY%3D","line":1642,"in_reply_to":"AAAAU3%2F%2F4hY%3D","updated":"2014-02-24 10:09:45.000000000","message":"Done","commit_id":"f2179fc8d88e8e3f337af669aad5f6d6a138d015"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"907f2a68cde055f5d6487e983bbbeddcc7e7e119","unresolved":false,"context_lines":[{"line_number":1630,"context_line":"        then a directory with this name is created at the topmost level of the"},{"line_number":1631,"context_line":"        DataStore."},{"line_number":1632,"context_line":"        \"\"\""},{"line_number":1633,"context_line":"        LOG.debug(_(\"Creating directory with path %s\"), ds_path)"},{"line_number":1634,"context_line":"        dc_info \u003d self.get_datacenter_ref_and_name(ds_ref)"},{"line_number":1635,"context_line":"        try:"},{"line_number":1636,"context_line":"            self._session._call_method("}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F4Fk%3D","line":1633,"updated":"2014-02-24 10:51:55.000000000","message":"Bah... cleanup in the same patch... but I guess we can let it slide since it\u0027s kind of related....","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"834a365497b555e285115593a2ac0f96fa2eb0f0","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"            LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1643,"context_line":"                        \"directory %(ds_path)s on %(ds)s.\"),"},{"line_number":1644,"context_line":"                          {\u0027ds_path\u0027: ds_path, \u0027ds\u0027: dc_info.name})"},{"line_number":1645,"context_line":"        LOG.debug(_(\"Created directory with path %s\"), ds_path)"},{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1648,"context_line":"                                     folder_name, file_name):"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F0tM%3D","line":1645,"updated":"2014-02-24 16:23:16.000000000","message":"I\u0027d move this up to after the _call_method call within the try block in case you hit a FileAlreadyExistsException, otherwise it could be misleading in the logs.","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bb0f3666df55b30b50f4acfa7268fdde2661cfc6","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"            LOG.debug(_(\"Multiple processes/threads are trying to create \""},{"line_number":1643,"context_line":"                        \"directory %(ds_path)s on %(ds)s.\"),"},{"line_number":1644,"context_line":"                          {\u0027ds_path\u0027: ds_path, \u0027ds\u0027: dc_info.name})"},{"line_number":1645,"context_line":"        LOG.debug(_(\"Created directory with path %s\"), ds_path)"},{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"    def _check_if_folder_file_exists(self, ds_ref, ds_name,"},{"line_number":1648,"context_line":"                                     folder_name, file_name):"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAU3%2F%2F0n4%3D","line":1645,"in_reply_to":"AAAAU3%2F%2F0tM%3D","updated":"2014-02-24 16:31:14.000000000","message":"Done","commit_id":"8f70ae2cfada8e92630d3e4f1c7f87ffdd42fe32"}]}
