)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"would be handled too broadly. This patch elevates the backend exception"},{"line_number":11,"context_line":"to the application so that it can treat specific errors."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In the application we can now handle the following specific exceptions:"},{"line_number":14,"context_line":" - FileAlreadyExists - for example when moving a directory to a directory"},{"line_number":15,"context_line":"                       that already exists"},{"line_number":16,"context_line":" - InvalidProperty - for example when using neutron and opaque networks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"AAAAUX%2F%2Frjg%3D","line":13,"updated":"2014-02-11 14:54:45.000000000","message":"NotAuthenticated doesn\u0027t fall into this list?  Guessing \u0027no\u0027 since it was already being used in error_util.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":10,"context_line":"would be handled too broadly. This patch elevates the backend exception"},{"line_number":11,"context_line":"to the application so that it can treat specific errors."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In the application we can now handle the following specific exceptions:"},{"line_number":14,"context_line":" - FileAlreadyExists - for example when moving a directory to a directory"},{"line_number":15,"context_line":"                       that already exists"},{"line_number":16,"context_line":" - InvalidProperty - for example when using neutron and opaque networks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"AAAAUX%2F%2FrdY%3D","line":13,"in_reply_to":"AAAAUX%2F%2Frjg%3D","updated":"2014-02-11 15:33:28.000000000","message":"NotAuthenticated has already been handled previously. I will update the commit message to provide an example.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"}],"nova/tests/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                              stubs, \u0027fake_temp_session_exception\u0027,"},{"line_number":182,"context_line":"                              *args, **kwargs)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test_call_method_session_file_exists_exception(self):"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        def _fake_create_session(self):"},{"line_number":187,"context_line":"            session \u003d vmwareapi_fake.DataObject()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90hw%3D","line":184,"updated":"2014-02-03 16:55:26.000000000","message":"This won\u0027t test an exception raise by vim.Method().","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                              stubs, \u0027fake_temp_session_exception\u0027,"},{"line_number":182,"context_line":"                              *args, **kwargs)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test_call_method_session_file_exists_exception(self):"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        def _fake_create_session(self):"},{"line_number":187,"context_line":"            session \u003d vmwareapi_fake.DataObject()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90IQ%3D","line":184,"in_reply_to":"AAAAUH%2F90hw%3D","updated":"2014-02-03 17:46:43.000000000","message":"This is meant to test error_util.get_fault_class(\u0027FileAlreadyExists\u0027).\nThis is when _call_method is invoked by the spawn method","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        self.assertRaises(exception.InstanceUnacceptable,"},{"line_number":526,"context_line":"                          self._create_vm)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    def test_spawn_with_move_file_exists_exception(self):"},{"line_number":529,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":530,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":531,"context_line":"        self.task_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90Xg%3D","line":528,"updated":"2014-02-03 16:55:26.000000000","message":"I think this test and test_spawn_with_move_general_exception() are redundant, as the other 2 tests have much better coverage.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        self.assertRaises(exception.InstanceUnacceptable,"},{"line_number":526,"context_line":"                          self._create_vm)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    def test_spawn_with_move_file_exists_exception(self):"},{"line_number":529,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":530,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":531,"context_line":"        self.task_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90H8%3D","line":528,"in_reply_to":"AAAAUH%2F90Xg%3D","updated":"2014-02-03 17:46:43.000000000","message":"No, this actually checks all of the lines of code that are added.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":611,"context_line":"            if method \u003d\u003d \"MoveDatastoreFile_Task\":"},{"line_number":612,"context_line":"                self.exception_raised \u003d True"},{"line_number":613,"context_line":"                task_mdo \u003d vmwareapi_fake.create_task(method, \"error\","},{"line_number":614,"context_line":"                        error_fault\u003dvmwareapi_fake.FileAlreadyExists())"},{"line_number":615,"context_line":"                return task_mdo.obj"},{"line_number":616,"context_line":"            return task_ref"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90YE%3D","line":614,"updated":"2014-02-03 16:55:26.000000000","message":"Should be error_util.get_fault_class(\u0027FileAlreadyExists\u0027)","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":611,"context_line":"            if method \u003d\u003d \"MoveDatastoreFile_Task\":"},{"line_number":612,"context_line":"                self.exception_raised \u003d True"},{"line_number":613,"context_line":"                task_mdo \u003d vmwareapi_fake.create_task(method, \"error\","},{"line_number":614,"context_line":"                        error_fault\u003dvmwareapi_fake.FileAlreadyExists())"},{"line_number":615,"context_line":"                return task_mdo.obj"},{"line_number":616,"context_line":"            return task_ref"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90H0%3D","line":614,"in_reply_to":"AAAAUH%2F90YE%3D","updated":"2014-02-03 17:46:43.000000000","message":"Nope. The _poll_task has a reference to a class. This is enasuring that the correct class is there","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5aae42ca623319ae6436e1c28fd75f55fe2492ab","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        self.task_ref \u003d None"},{"line_number":530,"context_line":"        self.exception_raised \u003d False"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":533,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":534,"context_line":"                self.task_ref \u003d None"},{"line_number":535,"context_line":"                self.exception_raised \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9v5U%3D","line":532,"updated":"2014-02-04 12:39:06.000000000","message":"This never enters _poll_task in a manner which will raise \u0027FileAlreadyExists\u0027, so it isn\u0027t testing it.\n\nNit: I misread these last time. Might be better if it was called \u0027wrap_wait_for_task\u0027.","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8aed4c71ce3932418ac526714d0ea6307a81293b","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        self.task_ref \u003d None"},{"line_number":530,"context_line":"        self.exception_raised \u003d False"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":533,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":534,"context_line":"                self.task_ref \u003d None"},{"line_number":535,"context_line":"                self.exception_raised \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9vCU%3D","line":532,"in_reply_to":"AAAAUH%2F9v5U%3D","updated":"2014-02-04 15:09:09.000000000","message":"Yes, this enters the poll for task. The vmops code calls https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L376\nThe mocking raises the expected exception","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5aae42ca623319ae6436e1c28fd75f55fe2492ab","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        self.task_ref \u003d None"},{"line_number":561,"context_line":"        self.exception_raised \u003d False"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":564,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":565,"context_line":"                self.task_ref \u003d None"},{"line_number":566,"context_line":"                self.exception_raised \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9v4w%3D","line":563,"updated":"2014-02-04 12:39:06.000000000","message":"Not testing _poll_task()","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8aed4c71ce3932418ac526714d0ea6307a81293b","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        self.task_ref \u003d None"},{"line_number":561,"context_line":"        self.exception_raised \u003d False"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":564,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":565,"context_line":"                self.task_ref \u003d None"},{"line_number":566,"context_line":"                self.exception_raised \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9vCQ%3D","line":563,"in_reply_to":"AAAAUH%2F9v4w%3D","updated":"2014-02-04 15:09:09.000000000","message":"Ditto","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":7948,"name":"Subbu","email":"subramanian.neelakantan@gmail.com","username":"subbu"},"change_message_id":"1c270bac915b36e32c606058f6931c72bd77442b","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def test_call_method_session_file_exists_exception(self):"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        def _fake_create_session(self):"},{"line_number":185,"context_line":"            session \u003d vmwareapi_fake.DataObject()"},{"line_number":186,"context_line":"            session.key \u003d \u0027fake_key\u0027"},{"line_number":187,"context_line":"            session.userName \u003d \u0027fake_username\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9ZfQ%3D","line":184,"updated":"2014-02-07 07:03:02.000000000","message":"Suggestion: You could consider moving _fake_create_session() to a class level method. It is being repeated several times.","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1e565aaf30174d36a8a2c4915f2ac3fba95900e0","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def test_call_method_session_file_exists_exception(self):"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        def _fake_create_session(self):"},{"line_number":185,"context_line":"            session \u003d vmwareapi_fake.DataObject()"},{"line_number":186,"context_line":"            session.key \u003d \u0027fake_key\u0027"},{"line_number":187,"context_line":"            session.userName \u003d \u0027fake_username\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9XY4%3D","line":184,"in_reply_to":"AAAAUH%2F9ZfQ%3D","updated":"2014-02-07 12:38:16.000000000","message":"good point. i would prefer if possible to do that in another patch set","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":529,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":530,"context_line":"        self.task_ref \u003d None"},{"line_number":531,"context_line":"        self.exception_raised \u003d False"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":534,"context_line":"            if task_ref \u003d\u003d self.task_ref:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VRA%3D","line":531,"updated":"2014-02-07 17:16:12.000000000","message":"Is there a better way to do this?  Can\u0027t assertRaises be used?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":529,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":530,"context_line":"        self.task_ref \u003d None"},{"line_number":531,"context_line":"        self.exception_raised \u003d False"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":534,"context_line":"            if task_ref \u003d\u003d self.task_ref:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F%2BC8%3D","line":531,"in_reply_to":"AAAAUH%2F9VRA%3D","updated":"2014-02-08 07:23:52.000000000","message":"The purpose of this flag was to show that the \u0027FileAlreadyExists\u0027 exception was returned by the VC. The variable name that I have used here is not good and I will change it. The purpose of setting the variable was to show that the exception has actually been swallowed in the code and there is no exception thrown by the spawn method","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":529,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":530,"context_line":"        self.task_ref \u003d None"},{"line_number":531,"context_line":"        self.exception_raised \u003d False"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":534,"context_line":"            if task_ref \u003d\u003d self.task_ref:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzV4%3D","line":531,"in_reply_to":"AAAAUX%2F%2F%2BC8%3D","updated":"2014-02-10 18:28:09.000000000","message":"Maybe the test code needs some comments to explain what\u0027s going on, like a description of the test (setup and expected results, etc).","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":529,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":530,"context_line":"        self.task_ref \u003d None"},{"line_number":531,"context_line":"        self.exception_raised \u003d False"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        def fake_wait_for_task(instance_uuid, task_ref):"},{"line_number":534,"context_line":"            if task_ref \u003d\u003d self.task_ref:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzKY%3D","line":531,"in_reply_to":"AAAAUX%2F%2FzV4%3D","updated":"2014-02-11 07:18:41.000000000","message":"Done","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":554,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":555,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VRw%3D","line":557,"updated":"2014-02-07 17:16:12.000000000","message":"Shouldn\u0027t you be asserting it\u0027s a FILE_ALREADY_EXISTS fault?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":554,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":555,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F%2BCI%3D","line":557,"in_reply_to":"AAAAUH%2F9VRw%3D","updated":"2014-02-08 07:23:52.000000000","message":"No. The spawn method should complete and the instance should be running. The algorithm is as follows:\nIf two instances are spawned at the same time and they are using an image that has not been cached then each spawn process will upload the image to: /tmp/unique-id-for-upload/image-id/image.vmdk. When they complete the operation they move the file /imgaeid/image.vmdk to the cache directory and clean up the unique-id-for-upload. The second one to move the image will fail as it already exists.\nAt the moment this is what we are using for the locking. The cost is for the multiple upload. But we do not need to use locking in the compute node and when using mutiple compute nodes this works.\nWe are in the process of proving a solution for locking so that we will not need to upload more than one image at the same time.\nPlease not that this is not related to this patch set - here we are only working on the exception handling.\n\nThe reason that th self.exception_raise is checked is to show that we treat the raised exception accordingly in the code and continue..","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":554,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":555,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzVs%3D","line":557,"in_reply_to":"AAAAUX%2F%2F%2BCI%3D","updated":"2014-02-10 18:28:09.000000000","message":"Let\u0027s add a short description of the test then to make this easier to understand/review/maintain.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":554,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":555,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzKU%3D","line":557,"in_reply_to":"AAAAUX%2F%2FzVs%3D","updated":"2014-02-11 07:18:41.000000000","message":"Done","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":561,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":562,"context_line":"        self.task_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VP4%3D","line":559,"updated":"2014-02-07 17:16:12.000000000","message":"Wondering if the common code between this test and the previous one can be consolidated into a private method since most of it is the same.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":557,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":560,"context_line":"        self.wait_task \u003d self.conn._session._wait_for_task"},{"line_number":561,"context_line":"        self.call_method \u003d self.conn._session._call_method"},{"line_number":562,"context_line":"        self.task_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F%2BAY%3D","line":559,"in_reply_to":"AAAAUH%2F9VP4%3D","updated":"2014-02-08 07:23:52.000000000","message":"Done","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":624,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":625,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":626,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _spawn_attach_volume_vmdk(self, set_image_ref\u003dTrue):"},{"line_number":629,"context_line":"        self._create_instance_in_the_db(set_image_ref\u003dset_image_ref)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VPI%3D","line":626,"updated":"2014-02-07 17:16:12.000000000","message":"Can\u0027t we use assertRaises here?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":624,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":625,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":626,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _spawn_attach_volume_vmdk(self, set_image_ref\u003dTrue):"},{"line_number":629,"context_line":"        self._create_instance_in_the_db(set_image_ref\u003dset_image_ref)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F%2BAQ%3D","line":626,"in_reply_to":"AAAAUH%2F9VPI%3D","updated":"2014-02-08 07:23:52.000000000","message":"No, we do not raise an exception, we swallow the specific exception in the code and continue with the flow","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            info \u003d self.conn.get_info({\u0027uuid\u0027: self.uuid,"},{"line_number":624,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":625,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":626,"context_line":"            self.assertTrue(self.exception_raised)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _spawn_attach_volume_vmdk(self, set_image_ref\u003dTrue):"},{"line_number":629,"context_line":"        self._create_instance_in_the_db(set_image_ref\u003dset_image_ref)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2Fumo%3D","line":626,"in_reply_to":"AAAAUX%2F%2F%2BAQ%3D","updated":"2014-02-11 07:18:41.000000000","message":"I have added in a comment here to explain","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        # The test will validate that the spawn completes"},{"line_number":535,"context_line":"        # successfully. The \"MoveDatastoreFile_Task\" will"},{"line_number":536,"context_line":"        # raise an file exists exception. The flag"},{"line_number":537,"context_line":"        # self.move_exceptioni will be checked to see that"},{"line_number":538,"context_line":"        # the exception has indeed been raised."},{"line_number":539,"context_line":"        self._set_move_exception_vars()"},{"line_number":540,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrpE%3D","line":537,"updated":"2014-02-11 14:54:45.000000000","message":"s/move_exceptioni/move_exception/","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        # The test will validate that the spawn completes"},{"line_number":535,"context_line":"        # successfully. The \"MoveDatastoreFile_Task\" will"},{"line_number":536,"context_line":"        # raise an file exists exception. The flag"},{"line_number":537,"context_line":"        # self.move_exceptioni will be checked to see that"},{"line_number":538,"context_line":"        # the exception has indeed been raised."},{"line_number":539,"context_line":"        self._set_move_exception_vars()"},{"line_number":540,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrbA%3D","line":537,"in_reply_to":"AAAAUX%2F%2FrpE%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":591,"context_line":"            mock.patch.object(self.conn._session, \u0027_call_method\u0027,"},{"line_number":592,"context_line":"                              fake_call_method)"},{"line_number":593,"context_line":"        ) as (_wait_for_task, _call_method):"},{"line_number":594,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":595,"context_line":"                              self._create_vm)"},{"line_number":596,"context_line":"            self.assertTrue(self.move_exception)"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Frog%3D","line":594,"updated":"2014-02-11 14:54:45.000000000","message":"Don\u0027t you have a more specific exception to check against now?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":591,"context_line":"            mock.patch.object(self.conn._session, \u0027_call_method\u0027,"},{"line_number":592,"context_line":"                              fake_call_method)"},{"line_number":593,"context_line":"        ) as (_wait_for_task, _call_method):"},{"line_number":594,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":595,"context_line":"                              self._create_vm)"},{"line_number":596,"context_line":"            self.assertTrue(self.move_exception)"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrW0%3D","line":594,"in_reply_to":"AAAAUX%2F%2Frog%3D","updated":"2014-02-11 15:33:28.000000000","message":"We will now raise VMwareDriverException here. Please see - http://pubs.vmware.com/vsphere-51/index.jsp?topic\u003d%2Fcom.vmware.wssdk.apiref.doc%2Fvim.FileManager.html\nThis cane be the case where MoveDatastoreFile_Task raises NoDiskSpace for example.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":609,"context_line":"            mock.patch.object(self.conn._session, \u0027_call_method\u0027,"},{"line_number":610,"context_line":"                              fake_call_method)"},{"line_number":611,"context_line":"        ):"},{"line_number":612,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":613,"context_line":"                              self._create_vm)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def test_spawn_with_move_file_exists_poll_exception(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FroU%3D","line":612,"updated":"2014-02-11 14:54:45.000000000","message":"use your more specific exception here?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":609,"context_line":"            mock.patch.object(self.conn._session, \u0027_call_method\u0027,"},{"line_number":610,"context_line":"                              fake_call_method)"},{"line_number":611,"context_line":"        ):"},{"line_number":612,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":613,"context_line":"                              self._create_vm)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def test_spawn_with_move_file_exists_poll_exception(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrWg%3D","line":612,"in_reply_to":"AAAAUX%2F%2FroU%3D","updated":"2014-02-11 15:33:28.000000000","message":"Same as above","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1ee1640ff33c5c07b4814a2d2812067db065e73f","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                                       \u0027node\u0027: self.instance_node})"},{"line_number":564,"context_line":"            self._check_vm_info(info, power_state.RUNNING)"},{"line_number":565,"context_line":"            self.assertTrue(self.move_exception)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def test_spawn_with_move_general_exception(self):"},{"line_number":568,"context_line":"        # The test will validate that the spawn completes"},{"line_number":569,"context_line":"        # successfully. The \"MoveDatastoreFile_Task\" will"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2Fqww%3D","line":566,"updated":"2014-02-11 16:24:42.000000000","message":"i really like your use of mock in this patch!","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec652893d6bc0553ff8bf7354d230239993e5876","unresolved":false,"context_lines":[{"line_number":567,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":568,"context_line":"                self.task_ref \u003d None"},{"line_number":569,"context_line":"                self.move_exception \u003d True"},{"line_number":570,"context_line":"                raise error_util.get_fault_class("},{"line_number":571,"context_line":"                        error_util.FILE_ALREADY_EXISTS)"},{"line_number":572,"context_line":"            return self.wait_task(instance_uuid, task_ref)"},{"line_number":573,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FIFQ%3D","line":570,"updated":"2014-02-16 20:18:36.000000000","message":"Could just raise your FileAlreadyExistsException here.","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a82c758bd83ef0ba9d21355f659c9f49fea2a94f","unresolved":false,"context_lines":[{"line_number":567,"context_line":"            if task_ref \u003d\u003d self.task_ref:"},{"line_number":568,"context_line":"                self.task_ref \u003d None"},{"line_number":569,"context_line":"                self.move_exception \u003d True"},{"line_number":570,"context_line":"                raise error_util.get_fault_class("},{"line_number":571,"context_line":"                        error_util.FILE_ALREADY_EXISTS)"},{"line_number":572,"context_line":"            return self.wait_task(instance_uuid, task_ref)"},{"line_number":573,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B3sg%3D","line":570,"in_reply_to":"AAAAUX%2F%2FIFQ%3D","updated":"2014-02-18 14:16:40.000000000","message":"Done","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"}],"nova/tests/virt/vmwareapi/test_vif.py":[{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1ee1640ff33c5c07b4814a2d2812067db065e73f","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        ) as (_add_vswitch, _get_host, _call_method):"},{"line_number":291,"context_line":"            network_util.create_port_group(self.session, \u0027pg_name\u0027,"},{"line_number":292,"context_line":"                                           \u0027vswitch_name\u0027, vlan_id\u003d0,"},{"line_number":293,"context_line":"                                           cluster\u003dNone)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_create_port_group_exception(self):"},{"line_number":296,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2Fqys%3D","line":293,"updated":"2014-02-11 16:24:42.000000000","message":"don\u0027t we need an assertRaises here?","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e4261b047ccb3b8e911e5bf7d804eaa6b623c4fc","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        ) as (_add_vswitch, _get_host, _call_method):"},{"line_number":291,"context_line":"            network_util.create_port_group(self.session, \u0027pg_name\u0027,"},{"line_number":292,"context_line":"                                           \u0027vswitch_name\u0027, vlan_id\u003d0,"},{"line_number":293,"context_line":"                                           cluster\u003dNone)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_create_port_group_exception(self):"},{"line_number":296,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2Fqkc%3D","line":293,"in_reply_to":"AAAAUX%2F%2Fqys%3D","updated":"2014-02-11 16:53:26.000000000","message":"I think the point is that it doesn\u0027t fail since the specific exception is now handled.","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1ee1640ff33c5c07b4814a2d2812067db065e73f","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            mock.patch.object(network_util, \u0027get_network_with_the_name\u0027)"},{"line_number":322,"context_line":"        ) as (_get_host, _call_method, _get_name):"},{"line_number":323,"context_line":"            vif.get_neutron_network(self.session, \u0027network_name\u0027,"},{"line_number":324,"context_line":"                                    \u0027cluster\u0027, \u0027vif\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2FqyE%3D","line":324,"updated":"2014-02-11 16:24:42.000000000","message":"seems like we need an assertRaises here too","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e4261b047ccb3b8e911e5bf7d804eaa6b623c4fc","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            mock.patch.object(network_util, \u0027get_network_with_the_name\u0027)"},{"line_number":322,"context_line":"        ) as (_get_host, _call_method, _get_name):"},{"line_number":323,"context_line":"            vif.get_neutron_network(self.session, \u0027network_name\u0027,"},{"line_number":324,"context_line":"                                    \u0027cluster\u0027, \u0027vif\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2FqkY%3D","line":324,"in_reply_to":"AAAAUX%2F%2FqyE%3D","updated":"2014-02-11 16:53:26.000000000","message":"I think the same as above....","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec652893d6bc0553ff8bf7354d230239993e5876","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def test_create_port_group_already_exists(self):"},{"line_number":281,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":282,"context_line":"            if method \u003d\u003d \u0027AddPortGroup\u0027:"},{"line_number":283,"context_line":"                raise error_util.get_fault_class(error_util.ALREADY_EXISTS)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        with contextlib.nested("},{"line_number":286,"context_line":"            mock.patch.object(vm_util, \u0027get_add_vswitch_port_group_spec\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FIFI%3D","line":283,"updated":"2014-02-16 20:18:36.000000000","message":"Could raise FileAlreadyExistsException right?","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2254a809a21c58765dcb8b61720040e51ee67836","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def test_create_port_group_already_exists(self):"},{"line_number":281,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":282,"context_line":"            if method \u003d\u003d \u0027AddPortGroup\u0027:"},{"line_number":283,"context_line":"                raise error_util.get_fault_class(error_util.ALREADY_EXISTS)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        with contextlib.nested("},{"line_number":286,"context_line":"            mock.patch.object(vm_util, \u0027get_add_vswitch_port_group_spec\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2Bylk%3D","line":283,"in_reply_to":"AAAAUX%2F%2B3rk%3D","updated":"2014-02-19 02:07:39.000000000","message":"Oh right, AlreadyExistsException, I had those confused or my eyes weren\u0027t working. :)","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a82c758bd83ef0ba9d21355f659c9f49fea2a94f","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def test_create_port_group_already_exists(self):"},{"line_number":281,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":282,"context_line":"            if method \u003d\u003d \u0027AddPortGroup\u0027:"},{"line_number":283,"context_line":"                raise error_util.get_fault_class(error_util.ALREADY_EXISTS)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        with contextlib.nested("},{"line_number":286,"context_line":"            mock.patch.object(vm_util, \u0027get_add_vswitch_port_group_spec\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B3rk%3D","line":283,"in_reply_to":"AAAAUX%2F%2FIFI%3D","updated":"2014-02-18 14:16:40.000000000","message":"Done - AlreadyExistsException should be raised here","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec652893d6bc0553ff8bf7354d230239993e5876","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    def test_create_port_group_exception(self):"},{"line_number":296,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":297,"context_line":"            if method \u003d\u003d \u0027AddPortGroup\u0027:"},{"line_number":298,"context_line":"                raise exception.NovaException(\u0027Exception!\u0027)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        with contextlib.nested("},{"line_number":301,"context_line":"            mock.patch.object(vm_util, \u0027get_add_vswitch_port_group_spec\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FIFM%3D","line":298,"updated":"2014-02-16 20:18:36.000000000","message":"Should this be VMwareDriverException?","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a82c758bd83ef0ba9d21355f659c9f49fea2a94f","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    def test_create_port_group_exception(self):"},{"line_number":296,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":297,"context_line":"            if method \u003d\u003d \u0027AddPortGroup\u0027:"},{"line_number":298,"context_line":"                raise exception.NovaException(\u0027Exception!\u0027)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        with contextlib.nested("},{"line_number":301,"context_line":"            mock.patch.object(vm_util, \u0027get_add_vswitch_port_group_spec\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B3q4%3D","line":298,"in_reply_to":"AAAAUX%2F%2FIFM%3D","updated":"2014-02-18 14:16:40.000000000","message":"Done","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec652893d6bc0553ff8bf7354d230239993e5876","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    def test_get_neutron_network_invalid_property(self):"},{"line_number":313,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":314,"context_line":"            if method \u003d\u003d \u0027get_dynamic_property\u0027:"},{"line_number":315,"context_line":"                raise error_util.get_fault_class(error_util.INVALID_PROPERTY)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        with contextlib.nested("},{"line_number":318,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2FIFE%3D","line":315,"updated":"2014-02-16 20:18:36.000000000","message":"Could raise InvalidPropertyException, any reason not to?","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a82c758bd83ef0ba9d21355f659c9f49fea2a94f","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    def test_get_neutron_network_invalid_property(self):"},{"line_number":313,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":314,"context_line":"            if method \u003d\u003d \u0027get_dynamic_property\u0027:"},{"line_number":315,"context_line":"                raise error_util.get_fault_class(error_util.INVALID_PROPERTY)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        with contextlib.nested("},{"line_number":318,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B3q0%3D","line":315,"in_reply_to":"AAAAUX%2F%2FIFE%3D","updated":"2014-02-18 14:16:40.000000000","message":"Done","commit_id":"e69c7603f1c3e9295ef5815ad441ac4a619ff1ee"}],"nova/virt/vmwareapi/driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90jI%3D","line":842,"updated":"2014-02-03 16:55:26.000000000","message":"For better or for worse, there are places where vim.Method() is called directly in the code outside of _call_method. Consequently, we need to raise the specific exceptions in Vim.__getattr__.vim_request_handler() rather than here.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6068336ac453022a6a79a48eb2094187d2e940a8","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9zK8%3D","line":842,"in_reply_to":"AAAAUH%2F90Ho%3D","updated":"2014-02-03 20:16:36.000000000","message":"It\u0027s debatable if we should force all calls to pass through session (this is what I was considering with a context manager) or if we should roll the session into the vim object ... which causes problems with the vim object getting *really* smart.\n\nEither way, with the current code base I agree with Matthew, we need to address the exceptions here as well:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vim.py#L165\n\n... I am also concerned with handling exceptions in such a way that you lose information. Will I loose information using this?","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90Ho%3D","line":842,"in_reply_to":"AAAAUH%2F90jI%3D","updated":"2014-02-03 17:46:43.000000000","message":"Not sure I follow you. Here we catch those exceptions. We are treating them and raising a more specific exception that the application can deal with","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9dd4e809e7f5b8002425b975039bd376f1663a55","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9wmw%3D","line":842,"in_reply_to":"AAAAUH%2F9zK8%3D","updated":"2014-02-04 10:02:41.000000000","message":"Good point. \nI have dealt with this for the _call_method and the _pool task - which is the scope of this patch set.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"},{"line_number":846,"context_line":"                # we retry"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90tc%3D","line":843,"updated":"2014-02-03 16:55:26.000000000","message":"Redundant break following unconditional raise.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":840,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":841,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":842,"context_line":"                    raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":843,"context_line":"                    break"},{"line_number":844,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":845,"context_line":"                # For exceptions which may come because of session overload,"},{"line_number":846,"context_line":"                # we retry"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90Hw%3D","line":843,"in_reply_to":"AAAAUH%2F90tc%3D","updated":"2014-02-03 17:46:43.000000000","message":"Done","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":910,"context_line":"                # Check if we can raise a specific exception"},{"line_number":911,"context_line":"                error \u003d task_info.error"},{"line_number":912,"context_line":"                name \u003d error.fault.__class__.__name__"},{"line_number":913,"context_line":"                task_ex \u003d error_util.get_fault_class(name)"},{"line_number":914,"context_line":"                done.send_exception(task_ex)"},{"line_number":915,"context_line":"        except Exception as excep:"},{"line_number":916,"context_line":"            LOG.warn(_(\"In vmwareapi:_poll_task, Got this error %s\") % excep)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90rg%3D","line":913,"updated":"2014-02-03 16:55:26.000000000","message":"Note that task_ex is the exception class here, rather than an instance of it. You might want to do:\n\ntask_ex \u003d error_util.get_fault_class(name)(error_info)\n\nwhich would also preserve error_info in the exception.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":910,"context_line":"                # Check if we can raise a specific exception"},{"line_number":911,"context_line":"                error \u003d task_info.error"},{"line_number":912,"context_line":"                name \u003d error.fault.__class__.__name__"},{"line_number":913,"context_line":"                task_ex \u003d error_util.get_fault_class(name)"},{"line_number":914,"context_line":"                done.send_exception(task_ex)"},{"line_number":915,"context_line":"        except Exception as excep:"},{"line_number":916,"context_line":"            LOG.warn(_(\"In vmwareapi:_poll_task, Got this error %s\") % excep)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90Hk%3D","line":913,"in_reply_to":"AAAAUH%2F90rg%3D","updated":"2014-02-03 17:46:43.000000000","message":"Done","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5aae42ca623319ae6436e1c28fd75f55fe2492ab","unresolved":false,"context_lines":[{"line_number":837,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":838,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":839,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":840,"context_line":"                    if excep.fault_list:"},{"line_number":841,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":842,"context_line":"                break"},{"line_number":843,"context_line":"            except error_util.SessionOverLoadException as excep:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9v%2B4%3D","line":840,"updated":"2014-02-04 12:39:06.000000000","message":"This needs to be done in vim_request_handler, not here.","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8aed4c71ce3932418ac526714d0ea6307a81293b","unresolved":false,"context_lines":[{"line_number":837,"context_line":"                    # and is the caller\u0027s fault. Caller should handle these"},{"line_number":838,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":839,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":840,"context_line":"                    if excep.fault_list:"},{"line_number":841,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":842,"context_line":"                break"},{"line_number":843,"context_line":"            except error_util.SessionOverLoadException as excep:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9vDI%3D","line":840,"in_reply_to":"AAAAUH%2F9v%2B4%3D","updated":"2014-02-04 15:09:09.000000000","message":"I think that this is too risky to be done in the this patch set and would prefer that we do it in an additional patch set - more specifically in code that we are doing in OSLO","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1ee1640ff33c5c07b4814a2d2812067db065e73f","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"},{"line_number":856,"context_line":"                # we retry"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2Fq2A%3D","line":853,"updated":"2014-02-11 16:24:42.000000000","message":"i feel really uncomfortable with hard coded indices.  Is there any way to get around that?","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e4261b047ccb3b8e911e5bf7d804eaa6b623c4fc","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"},{"line_number":856,"context_line":"                # we retry"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUX%2F%2FqkA%3D","line":853,"in_reply_to":"AAAAUX%2F%2Fq2A%3D","updated":"2014-02-11 16:53:26.000000000","message":"Well doesn\u0027t len(excep.fault_list) \u003d\u003d 0 \u003d\u003d False so you wouldn\u0027t get here if that was the case?","commit_id":"4a98394473e14dd60535e8750dbca10cd404a7a4"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"615ee639761c573e7043c1df772d1c9472fbf3f3","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FQPs%3D","line":852,"updated":"2014-02-14 14:16:53.000000000","message":"I wonder if there is case when len(excep.fault_list) \u003e 1","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"765b6fdf8faf17d0f0b9cf7ef195fe38e0b404ef","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FKiI%3D","line":852,"in_reply_to":"AAAAUX%2F%2FK4A%3D","updated":"2014-02-15 12:05:36.000000000","message":"Yes, we will always raise the first one.","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"4e322c17ee79c4fbe864292f20017286cf86e363","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FK4A%3D","line":852,"in_reply_to":"AAAAUX%2F%2FPKQ%3D","updated":"2014-02-15 07:59:30.000000000","message":"My question was if there are several faults how to decide which one to raise. I guess raising always the first one is fine.","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"41dcbda8665946f8555f785e9258f2e1bd5ef645","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":850,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":851,"context_line":"                    if excep.fault_list:"},{"line_number":852,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":853,"context_line":"                    break"},{"line_number":854,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":855,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FPKQ%3D","line":852,"in_reply_to":"AAAAUX%2F%2FQPs%3D","updated":"2014-02-14 16:33:49.000000000","message":"You mean \u003e\u003d 1? This has already been asked a few times.  This is fine in python.  If fault_list is None or empty, the condition fails.","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c50bf9b5179b24c6f342452c48d49b90e7baac39","unresolved":false,"context_lines":[{"line_number":821,"context_line":"                    # errors. e.g, InvalidArgument fault."},{"line_number":822,"context_line":"                    # Raise specific exceptions here if possible"},{"line_number":823,"context_line":"                    if excep.fault_list:"},{"line_number":824,"context_line":"                        raise error_util.get_fault_class(excep.fault_list[0])"},{"line_number":825,"context_line":"                    break"},{"line_number":826,"context_line":"            except error_util.SessionOverLoadException as excep:"},{"line_number":827,"context_line":"                # For exceptions which may come because of session overload,"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAUX%2F%2BkNo%3D","line":824,"updated":"2014-02-20 13:48:57.000000000","message":"As disscussed - if this is a list of things - we might want to at least log them and not raise only the first one and drop all the rest. Can be done as a separate patch.","commit_id":"fb12fa03ad21c4c8924175ae77bc6bd30139f089"}],"nova/virt/vmwareapi/error_util.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6068336ac453022a6a79a48eb2094187d2e940a8","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"FAULT_NOT_AUTHENTICATED \u003d \"NotAuthenticated\""},{"line_number":27,"context_line":"FAULT_ALREADY_EXISTS \u003d \"AlreadyExists\""},{"line_number":28,"context_line":"_fault_classes \u003d {}"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class VimException(Exception):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9zNo%3D","line":28,"updated":"2014-02-03 20:16:36.000000000","message":"consider:\n  _fault_classes_registry\n\nI get the sense that this is a registry of all possible fault classes that should be built up over time. This is another long-lived variable and I\u0027m going to want its role to be clear.\n\nThe name _fault_classes \u003c- makes me question what it is supposed to be.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9dd4e809e7f5b8002425b975039bd376f1663a55","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"FAULT_NOT_AUTHENTICATED \u003d \"NotAuthenticated\""},{"line_number":27,"context_line":"FAULT_ALREADY_EXISTS \u003d \"AlreadyExists\""},{"line_number":28,"context_line":"_fault_classes \u003d {}"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class VimException(Exception):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9wms%3D","line":28,"in_reply_to":"AAAAUH%2F9zNo%3D","updated":"2014-02-04 10:02:41.000000000","message":"Done","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6068336ac453022a6a79a48eb2094187d2e940a8","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return str(self.exception_obj)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def get_fault_class(name):"},{"line_number":71,"context_line":"    \u0027\u0027\u0027Get a named subclass of NovaException.\u0027\u0027\u0027"},{"line_number":72,"context_line":"    if name in _fault_classes:"},{"line_number":73,"context_line":"        return _fault_classes[name]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9zNc%3D","line":70,"updated":"2014-02-03 20:16:36.000000000","message":"consider:\n  def lookup_fault_class(name):","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9dd4e809e7f5b8002425b975039bd376f1663a55","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return str(self.exception_obj)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def get_fault_class(name):"},{"line_number":71,"context_line":"    \u0027\u0027\u0027Get a named subclass of NovaException.\u0027\u0027\u0027"},{"line_number":72,"context_line":"    if name in _fault_classes:"},{"line_number":73,"context_line":"        return _fault_classes[name]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9wks%3D","line":70,"in_reply_to":"AAAAUH%2F9zNc%3D","updated":"2014-02-04 10:02:41.000000000","message":"i think that the get_fault_class is more intuitive, especially where we are treating the exceptions in the application code","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6068336ac453022a6a79a48eb2094187d2e940a8","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"    _fault_classes[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class FaultCheckers(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9zM4%3D","line":77,"updated":"2014-02-03 20:16:36.000000000","message":"consider:\n\n    klass \u003d _fault_classes.get(name)\n\n    if not klass:\n        klass \u003d type(name, (exception.NovaException, ), {})\n        _fault_classes[name] \u003d klass\n    return klass","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9dd4e809e7f5b8002425b975039bd376f1663a55","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"    _fault_classes[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class FaultCheckers(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9wlY%3D","line":77,"in_reply_to":"AAAAUH%2F9zM4%3D","updated":"2014-02-04 10:02:41.000000000","message":"Done","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5aae42ca623319ae6436e1c28fd75f55fe2492ab","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":69,"context_line":"    name \u003d str(name)"},{"line_number":70,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":71,"context_line":"    if not klass:"},{"line_number":72,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":73,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":74,"context_line":"    return klass"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9v%2BY%3D","line":71,"updated":"2014-02-04 12:39:06.000000000","message":"if klass is None","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8aed4c71ce3932418ac526714d0ea6307a81293b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":69,"context_line":"    name \u003d str(name)"},{"line_number":70,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":71,"context_line":"    if not klass:"},{"line_number":72,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":73,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":74,"context_line":"    return klass"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9vDE%3D","line":71,"in_reply_to":"AAAAUH%2F9v%2BY%3D","updated":"2014-02-04 15:09:09.000000000","message":"Done","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"78d1899b66c89e041c0978c475802fdf357b5bb0","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_fault_class(name):"},{"line_number":68,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":69,"context_line":"    name \u003d str(name)"},{"line_number":70,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":71,"context_line":"    if klass is None:"},{"line_number":72,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F9uHo%3D","line":69,"updated":"2014-02-04 17:32:38.000000000","message":"Why shouldn\u0027t it be a string already ?. May be am missing something.","commit_id":"a8b02d3d0c31995e9d96319562c2b7bed28b9fe4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7a175aa5856a90f38194c89c9b1d2c76cf915a63","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_fault_class(name):"},{"line_number":68,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":69,"context_line":"    name \u003d str(name)"},{"line_number":70,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":71,"context_line":"    if klass is None:"},{"line_number":72,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F9t1Q%3D","line":69,"in_reply_to":"AAAAUH%2F9uHo%3D","updated":"2014-02-04 18:18:56.000000000","message":"There are 2 flows. The one is string and the other is Text. The latter causes an exception. Hence we need to convert it to a string","commit_id":"a8b02d3d0c31995e9d96319562c2b7bed28b9fe4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"7196e970e86fea4f69be9fe8f3794e7861c41544","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Exception classes and SOAP response error checking module."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from nova import exception"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9okQ%3D","side":"PARENT","line":20,"updated":"2014-02-05 14:07:53.000000000","message":"whoops.","commit_id":"4df50909322c35eee32837e9ccd01f757817901d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VO4%3D","line":24,"updated":"2014-02-07 17:16:12.000000000","message":"I\u0027m not sure that this is tested.  I see that FileAlreadyExists is tested though.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9U%2BI%3D","line":24,"in_reply_to":"AAAAUH%2F9VO4%3D","updated":"2014-02-08 07:23:52.000000000","message":"Done","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VYA%3D","line":25,"updated":"2014-02-07 17:16:12.000000000","message":"Would be nice if FILE_ALREADY_EXISTS somehow extended ALREADY_EXISTS because I can see that being confusing in the future.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07d1b1ae4b93b2240ba0ab697927a27b1e1696ac","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F%2BaY%3D","line":25,"in_reply_to":"AAAAUH%2F9VYA%3D","updated":"2014-02-08 01:49:51.000000000","message":"Actually, why are we even doing it this way?  Why don\u0027t we just define actual exception classes that extend NovaException, set the proper msg_fmt and code values, and then FileAlreadyExists could extend AlreadyExists - and we wouldn\u0027t need the utility method to convert the fault by name to a NovaException.  That would be much cleaner.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F9v4%3D","line":25,"in_reply_to":"AAAAUX%2F%2F%2BaY%3D","updated":"2014-02-08 07:23:52.000000000","message":"There are two cases here:\n1. The fault will just return a string from the backend indicating the name of the error fault\n2. The task info will contain a backend class with the whose name is the fault exception\nThe purpose of this was to have the names defined in one place so that we will be able to do the following:\n1. Ensure that we are less error prone with typos\n2. Have conventient lookups for IDE\u0027s\n3. We are in the process of arranging all of these in one file that will make support easier in the future - please see https://review.openstack.org/#/c/71610/","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzW4%3D","line":25,"in_reply_to":"AAAAUX%2F%2F9v4%3D","updated":"2014-02-10 18:28:09.000000000","message":"So just map the information you get back from the vmware API and map to your NovaException-derived vmware-driver-specific exceptions.  What\u0027s wrong with that?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VPA%3D","line":26,"updated":"2014-02-07 17:16:12.000000000","message":"I don\u0027t see any tests for this new fault.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"},{"line_number":25,"context_line":"FILE_ALREADY_EXISTS \u003d \u0027FileAlreadyExists\u0027"},{"line_number":26,"context_line":"INVALID_PROPERTY \u003d \u0027InvalidProperty\u0027"},{"line_number":27,"context_line":"NOT_AUTHENTICATED \u003d \u0027NotAuthenticated\u0027"},{"line_number":28,"context_line":"_fault_classes_registry \u003d {}"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9U%2BA%3D","line":26,"in_reply_to":"AAAAUH%2F9VPA%3D","updated":"2014-02-08 07:23:52.000000000","message":"Done","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    name \u003d str(name)"},{"line_number":73,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":74,"context_line":"    if klass is None:"},{"line_number":75,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VYY%3D","line":75,"updated":"2014-02-07 17:16:12.000000000","message":"First time I\u0027ve seen something like this used but makes sense given this:\n\nhttp://docs.python.org/2/library/functions.html#type\n\nThe only question I have is NovaException has these fields also:\n\n    msg_fmt \u003d _(\"An unknown exception occurred.\")\n    code \u003d 500\n\nFrom the known fault definitions above, the exceptions aren\u0027t really \u0027unknown\u0027, right?  Should you be overriding msg_fmt with something more specific per-fault?\n\nMaybe more important than the msg_fmt is the code.  For example, the two \"already exists\" faults should be 409 errors right?  The no-auth is a 403 and \u0027invalid property\u0027 is a 400.\n\nSo shouldn\u0027t we go a bit further with the global fault definitions?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    name \u003d str(name)"},{"line_number":73,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":74,"context_line":"    if klass is None:"},{"line_number":75,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F9vA%3D","line":75,"in_reply_to":"AAAAUH%2F9VYY%3D","updated":"2014-02-08 07:23:52.000000000","message":"I think that we need to differentiate between nova exceptions and the VC.ESX exceptions. That is, these exceptions will enable us to treat specific errors from the backend and then act accoringly - that is, we can decide to swallow them and continue with the operations or we can raise a more specific nova exception if relevant.\nI think that the general nova exception here is ok.\nThis is something that we can address moving forwards but I hope that it would not block this","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    name \u003d str(name)"},{"line_number":73,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":74,"context_line":"    if klass is None:"},{"line_number":75,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzXo%3D","line":75,"in_reply_to":"AAAAUX%2F%2F9vA%3D","updated":"2014-02-10 18:28:09.000000000","message":"I\u0027m confused:\n\n\"I think that we need to differentiate between nova exceptions and the VC.ESX exceptions.\"\n\nand then:\n\n\"I think that the general nova exception here is ok\"\n\nSo right now this is a NovaException.  If you want to make them VMware-specific, I\u0027m fine with that, just throw them into the vmware virt driver somewhere and they can extend NovaException, call them VCFaultFileAlreadyExistsException(NovaException) or whatever, that\u0027s fine.  The powervm driver used to have powervm-driver specific exceptions which extended NovaException within it\u0027s own module, why can\u0027t we do that here?  I don\u0027t like all the reflection and string/type magic going on.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    name \u003d str(name)"},{"line_number":73,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":74,"context_line":"    if klass is None:"},{"line_number":75,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2Fuos%3D","line":75,"in_reply_to":"AAAAUX%2F%2FzRo%3D","updated":"2014-02-11 07:18:41.000000000","message":"I originally started doing it like you suggested in patch set 2. There may be a variety of different fault error messages so we decide to take a generic approach. In retrospect we are only hand;ling a few specific exceptions. So I have combined the two ideas into something more simple. I really hope that suffices as this is a very important fix for us.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38d02bae655ddd0caa546426f89e5e6492271d34","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    name \u003d str(name)"},{"line_number":73,"context_line":"    klass \u003d _fault_classes_registry.get(name)"},{"line_number":74,"context_line":"    if klass is None:"},{"line_number":75,"context_line":"        klass \u003d type(name, (exception.NovaException, ), {})"},{"line_number":76,"context_line":"        _fault_classes_registry[name] \u003d klass"},{"line_number":77,"context_line":"    return klass"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzRo%3D","line":75,"in_reply_to":"AAAAUX%2F%2FzXo%3D","updated":"2014-02-10 18:29:59.000000000","message":"Looks like you were actually doing it the way I suggested in patch set 2, but I\u0027m not sure why it was changed (haven\u0027t gone through all of the comments in all of the patch sets leading up to this).  If this is a critical design point, let\u0027s call it out in the commit message as to why it has to be this way.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    msg_fmt \u003d _(\"No default value for use_linked_clone found.\")"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class AlreadyExists(VMwareDriverException):"},{"line_number":127,"context_line":"    msg_fmt \u003d _(\"Resource already exists.\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Frs4%3D","line":126,"updated":"2014-02-11 14:54:45.000000000","message":"Yes! Thank you - this is much better.\n\nSuggest to name them with \u0027Exception\u0027 in the suffix though to be explicit and consistent with other exceptions.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    msg_fmt \u003d _(\"No default value for use_linked_clone found.\")"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class AlreadyExists(VMwareDriverException):"},{"line_number":127,"context_line":"    msg_fmt \u003d _(\"Resource already exists.\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Fras%3D","line":126,"in_reply_to":"AAAAUX%2F%2Frs4%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class AlreadyExists(VMwareDriverException):"},{"line_number":127,"context_line":"    msg_fmt \u003d _(\"Resource already exists.\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class FileAlreadyExists(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrsU%3D","line":127,"updated":"2014-02-11 14:54:45.000000000","message":"Should this also set the code to 409?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class AlreadyExists(VMwareDriverException):"},{"line_number":127,"context_line":"    msg_fmt \u003d _(\"Resource already exists.\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class FileAlreadyExists(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FraI%3D","line":127,"in_reply_to":"AAAAUX%2F%2FrsU%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class FileAlreadyExists(VMwareDriverException):"},{"line_number":131,"context_line":"    msg_fmt \u003d _(\"File already exists.\")"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class InvalidProperty(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrsI%3D","line":131,"updated":"2014-02-11 14:54:45.000000000","message":"Set the code to 409?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"class FileAlreadyExists(VMwareDriverException):"},{"line_number":131,"context_line":"    msg_fmt \u003d _(\"File already exists.\")"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class InvalidProperty(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FraE%3D","line":131,"in_reply_to":"AAAAUX%2F%2FrsI%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class InvalidProperty(VMwareDriverException):"},{"line_number":135,"context_line":"    msg_fmt \u003d _(\"Invalid property.\")"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"class NotAuthenticated(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrsE%3D","line":135,"updated":"2014-02-11 14:54:45.000000000","message":"Set the code to 400?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class InvalidProperty(VMwareDriverException):"},{"line_number":135,"context_line":"    msg_fmt \u003d _(\"Invalid property.\")"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"class NotAuthenticated(VMwareDriverException):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrZ0%3D","line":135,"in_reply_to":"AAAAUX%2F%2FrsE%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"class NotAuthenticated(VMwareDriverException):"},{"line_number":139,"context_line":"    msg_fmt \u003d _(\"Not Authenticated.\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Frrw%3D","line":139,"updated":"2014-02-11 14:54:45.000000000","message":"Set the code to 403?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"class NotAuthenticated(VMwareDriverException):"},{"line_number":139,"context_line":"    msg_fmt \u003d _(\"Not Authenticated.\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"ALREADY_EXISTS \u003d \u0027AlreadyExists\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrZw%3D","line":139,"in_reply_to":"AAAAUX%2F%2Frrw%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    name \u003d str(name)"},{"line_number":159,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":160,"context_line":"    if not fault_class:"},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Fault %s not matched.\u0027), name)"},{"line_number":162,"context_line":"        fault_class \u003d exception.NovaException"},{"line_number":163,"context_line":"    return fault_class"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Frs8%3D","line":161,"updated":"2014-02-11 14:54:45.000000000","message":"This should be a warning right?  Means someone missed something (or needs to address something) with the code.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    name \u003d str(name)"},{"line_number":159,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":160,"context_line":"    if not fault_class:"},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Fault %s not matched.\u0027), name)"},{"line_number":162,"context_line":"        fault_class \u003d exception.NovaException"},{"line_number":163,"context_line":"    return fault_class"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrY4%3D","line":161,"in_reply_to":"AAAAUX%2F%2Frs8%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done\nGood idea","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":160,"context_line":"    if not fault_class:"},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Fault %s not matched.\u0027), name)"},{"line_number":162,"context_line":"        fault_class \u003d exception.NovaException"},{"line_number":163,"context_line":"    return fault_class"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Frps%3D","line":162,"updated":"2014-02-11 14:54:45.000000000","message":"Why not default to VMwareDriverException here as the generic fault?","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":160,"context_line":"    if not fault_class:"},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Fault %s not matched.\u0027), name)"},{"line_number":162,"context_line":"        fault_class \u003d exception.NovaException"},{"line_number":163,"context_line":"    return fault_class"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrYw%3D","line":162,"in_reply_to":"AAAAUX%2F%2Frps%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"615ee639761c573e7043c1df772d1c9472fbf3f3","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"def get_fault_class(name):"},{"line_number":161,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":162,"context_line":"    name \u003d str(name)"},{"line_number":163,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":164,"context_line":"    if not fault_class:"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FQS8%3D","line":161,"updated":"2014-02-14 14:16:53.000000000","message":"this doc string is wrong, should be VMwareDriverException","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"765b6fdf8faf17d0f0b9cf7ef195fe38e0b404ef","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"def get_fault_class(name):"},{"line_number":161,"context_line":"    \"\"\"Get a named subclass of NovaException.\"\"\""},{"line_number":162,"context_line":"    name \u003d str(name)"},{"line_number":163,"context_line":"    fault_class \u003d _fault_classes_registry.get(name)"},{"line_number":164,"context_line":"    if not fault_class:"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAUX%2F%2FKiU%3D","line":161,"in_reply_to":"AAAAUX%2F%2FQS8%3D","updated":"2014-02-15 12:05:36.000000000","message":"Done","commit_id":"0d8ce00ac2fa174c64395b9e71b03249df9b8a9b"}],"nova/virt/vmwareapi/fake.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8f1bf6fa88a92e19014224584a28f38ced19b9eb","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.key \u003d \u0027key-vmhba33\u0027"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class FileAlreadyExists(DataObject):"},{"line_number":274,"context_line":"    \"\"\"File already exists class.\"\"\""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90p8%3D","line":273,"updated":"2014-02-03 16:55:26.000000000","message":"No longer required.","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526c0d0039ec68b21728ccc902621a65c20480e","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.key \u003d \u0027key-vmhba33\u0027"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class FileAlreadyExists(DataObject):"},{"line_number":274,"context_line":"    \"\"\"File already exists class.\"\"\""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F90HU%3D","line":273,"in_reply_to":"AAAAUH%2F90p8%3D","updated":"2014-02-03 17:46:43.000000000","message":"This is needed - this is used by the task to provide the information - please see _poll_task\nLook below at the error_falt - line 757","commit_id":"3b6a7017fe31b2579159f0c0b013ad34e138ec4e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":759,"context_line":"        info.state \u003d state"},{"line_number":760,"context_line":"        if state \u003d\u003d \u0027error\u0027:"},{"line_number":761,"context_line":"            error \u003d DataObject()"},{"line_number":762,"context_line":"            error.localizedMessage \u003d \"Error message\""},{"line_number":763,"context_line":"            if not error_fault:"},{"line_number":764,"context_line":"                error.fault \u003d DataObject()"},{"line_number":765,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VXk%3D","line":762,"updated":"2014-02-07 17:16:12.000000000","message":"Pretty generic...and shouldn\u0027t this be wrapped in _()?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":759,"context_line":"        info.state \u003d state"},{"line_number":760,"context_line":"        if state \u003d\u003d \u0027error\u0027:"},{"line_number":761,"context_line":"            error \u003d DataObject()"},{"line_number":762,"context_line":"            error.localizedMessage \u003d \"Error message\""},{"line_number":763,"context_line":"            if not error_fault:"},{"line_number":764,"context_line":"                error.fault \u003d DataObject()"},{"line_number":765,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F920%3D","line":762,"in_reply_to":"AAAAUH%2F9VXk%3D","updated":"2014-02-08 07:23:52.000000000","message":"No, this is the string that is received from the VC. Adding a translation here would be problematic and not mirror the correct data returned.","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":759,"context_line":"        info.state \u003d state"},{"line_number":760,"context_line":"        if state \u003d\u003d \u0027error\u0027:"},{"line_number":761,"context_line":"            error \u003d DataObject()"},{"line_number":762,"context_line":"            error.localizedMessage \u003d \"Error message\""},{"line_number":763,"context_line":"            if not error_fault:"},{"line_number":764,"context_line":"                error.fault \u003d DataObject()"},{"line_number":765,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzT4%3D","line":762,"in_reply_to":"AAAAUX%2F%2F920%3D","updated":"2014-02-10 18:28:09.000000000","message":"Maybe a dumb questions, but this doesn\u0027t look like a fake but it\u0027s in fake.py, what am I missing?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":759,"context_line":"        info.state \u003d state"},{"line_number":760,"context_line":"        if state \u003d\u003d \u0027error\u0027:"},{"line_number":761,"context_line":"            error \u003d DataObject()"},{"line_number":762,"context_line":"            error.localizedMessage \u003d \"Error message\""},{"line_number":763,"context_line":"            if not error_fault:"},{"line_number":764,"context_line":"                error.fault \u003d DataObject()"},{"line_number":765,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2Fyr8%3D","line":762,"in_reply_to":"AAAAUX%2F%2FzT4%3D","updated":"2014-02-11 07:18:41.000000000","message":"This is certainly not a dumb question. The file fake.py contains the VMware fake driver. This is where we create a fake interface that reflects the ESX/VC API\u0027s. In this specific case it is the Fake task object that is returned. In the past this object was not defined correctly and was missing the actual error information - which is used in the application for checking the specific fault from the VC","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"}],"nova/virt/vmwareapi/vim.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c64ff2a0ae10c6965a6680c78aacfe4a9c11056b","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                doc \u003d excep.document"},{"line_number":195,"context_line":"                detail \u003d doc.childAtPath(\"/Envelope/Body/Fault/detail\")"},{"line_number":196,"context_line":"                fault_list \u003d []"},{"line_number":197,"context_line":"                if detail:"},{"line_number":198,"context_line":"                    for child in detail.getChildren():"},{"line_number":199,"context_line":"                        fault_list.append(child.get(\"type\"))"},{"line_number":200,"context_line":"                raise error_util.VimFaultException(fault_list, excep)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9VV0%3D","line":197,"updated":"2014-02-07 17:16:12.000000000","message":"Why is this needed now?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a6d8887cfef03edc1e625743aed3152dc800666","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                doc \u003d excep.document"},{"line_number":195,"context_line":"                detail \u003d doc.childAtPath(\"/Envelope/Body/Fault/detail\")"},{"line_number":196,"context_line":"                fault_list \u003d []"},{"line_number":197,"context_line":"                if detail:"},{"line_number":198,"context_line":"                    for child in detail.getChildren():"},{"line_number":199,"context_line":"                        fault_list.append(child.get(\"type\"))"},{"line_number":200,"context_line":"                raise error_util.VimFaultException(fault_list, excep)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2F9t8%3D","line":197,"in_reply_to":"AAAAUH%2F9VV0%3D","updated":"2014-02-08 07:23:52.000000000","message":"The handling below would thrown an exception if the detail is None","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74bab3c223bd4466a69c143b4c74dd04664ac298","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                doc \u003d excep.document"},{"line_number":195,"context_line":"                detail \u003d doc.childAtPath(\"/Envelope/Body/Fault/detail\")"},{"line_number":196,"context_line":"                fault_list \u003d []"},{"line_number":197,"context_line":"                if detail:"},{"line_number":198,"context_line":"                    for child in detail.getChildren():"},{"line_number":199,"context_line":"                        fault_list.append(child.get(\"type\"))"},{"line_number":200,"context_line":"                raise error_util.VimFaultException(fault_list, excep)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FzTQ%3D","line":197,"in_reply_to":"AAAAUX%2F%2F9t8%3D","updated":"2014-02-10 18:28:09.000000000","message":"OK, but why is detail None now and not before this change?","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d107f71cfd2edc453a0bc8a2e68c6cd65eea6d88","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                doc \u003d excep.document"},{"line_number":195,"context_line":"                detail \u003d doc.childAtPath(\"/Envelope/Body/Fault/detail\")"},{"line_number":196,"context_line":"                fault_list \u003d []"},{"line_number":197,"context_line":"                if detail:"},{"line_number":198,"context_line":"                    for child in detail.getChildren():"},{"line_number":199,"context_line":"                        fault_list.append(child.get(\"type\"))"},{"line_number":200,"context_line":"                raise error_util.VimFaultException(fault_list, excep)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2Fyrc%3D","line":197,"in_reply_to":"AAAAUX%2F%2FzTQ%3D","updated":"2014-02-11 07:18:41.000000000","message":"In this change we saw thah the childAtPath can return None. If it is None then it raises another exception. Hence this addition","commit_id":"a89fd2d2c71eddc7172d1fb99e019581bc3a638d"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5aae42ca623319ae6436e1c28fd75f55fe2492ab","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                destinationDatacenter\u003ddc_info.ref)"},{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(\u0027FileAlreadyExists\u0027):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9v7k%3D","line":376,"updated":"2014-02-04 12:39:06.000000000","message":"Nice. You\u0027ll presumably want to delete the original image here, though.","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8aed4c71ce3932418ac526714d0ea6307a81293b","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                destinationDatacenter\u003ddc_info.ref)"},{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(\u0027FileAlreadyExists\u0027):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9vEE%3D","line":376,"in_reply_to":"AAAAUH%2F9v7k%3D","updated":"2014-02-04 15:09:09.000000000","message":"No. The reason for this is as follows:\nIf a nova image is not cached then a spawn will first try and cache the image. If a spawn is done on more than one compute node then there is no way of syncing the image cache.\nThe algorithm is as follows:\nUpload new image to a unique temo directory\nWhen that is complete move the image directory to the cache directory.\nIf more than once process tries to do that then the File existence indicates that the image already exists.\nNo locking is required","commit_id":"ad9e75e4afbc175ea04609111dac43ffdb659a2b"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"13baa9695568919dfdc4cc1419212fda689201f4","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                destinationDatacenter\u003ddc_info.ref)"},{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(\u0027FileAlreadyExists\u0027):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9gv4%3D","line":376,"updated":"2014-02-06 12:14:06.000000000","message":"using string literals is error prone in places like this;\nI suggest to add string constant for each type of exception in error_util.py and have something like:\n  try:\n    ...\n  except error_util.get_fault_class(FILE_ALREADY_EXIST)\n\nthis will also allow to find all places where FILE_ALREADY_EXIST is handled (especially if you are using a Python IDE)","commit_id":"b2a010733e8efb38cece70fb9fee3d1c0ecab2ed"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c12cb7478af967d3349c3b2029e487347f9f798f","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                destinationDatacenter\u003ddc_info.ref)"},{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(\u0027FileAlreadyExists\u0027):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9gcU%3D","line":376,"in_reply_to":"AAAAUH%2F9gv4%3D","updated":"2014-02-06 12:53:48.000000000","message":"Done","commit_id":"b2a010733e8efb38cece70fb9fee3d1c0ecab2ed"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"db3c505b6c5aca19ab428cb339d2f9d4f0241db3","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9eTU%3D","line":377,"updated":"2014-02-06 17:06:41.000000000","message":"nit: Think the log noting that the we see an existing file is still useful here.","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"309c6e5c9629e65d409f1da364fcf3eb8dc98704","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9aZw%3D","line":377,"in_reply_to":"AAAAUH%2F9a%2B4%3D","updated":"2014-02-07 03:37:25.000000000","message":"I think it\u0027s okay not to log this as the requested caching operation has already succeeded. But up to Gary :).","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1e565aaf30174d36a8a2c4915f2ac3fba95900e0","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9XV8%3D","line":377,"in_reply_to":"AAAAUH%2F9aZw%3D","updated":"2014-02-07 12:38:16.000000000","message":"This was removed following https://review.openstack.org/#/c/65306/19/nova/virt/vmwareapi/vmops.py. I prefer to leave it as is at the moment","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"a69e9769ce05a8ca83d4829123b11ee9714ec8b4","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            try:"},{"line_number":375,"context_line":"                self._session._wait_for_task(instance[\u0027uuid\u0027], vmdk_move_task)"},{"line_number":376,"context_line":"            except error_util.get_fault_class(error_util.FILE_ALREADY_EXISTS):"},{"line_number":377,"context_line":"                # File move has failed. This may be due to the fact that a"},{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9a%2B4%3D","line":377,"in_reply_to":"AAAAUH%2F9eTU%3D","updated":"2014-02-07 01:08:25.000000000","message":"could we see that log entry restored as a LOG.debug entry instead of a LOG.warn?","commit_id":"218d34b3d2de2a22f14015cd52078fb79f786e1e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbd58795e1e70f258970987003df65f290f28e0d","unresolved":false,"context_lines":[{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."},{"line_number":381,"context_line":"                LOG.debug(_(\"File already exists\"))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        def _fetch_image_on_datastore():"},{"line_number":384,"context_line":"            \"\"\"Fetch image from Glance to datastore.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrlE%3D","line":381,"updated":"2014-02-11 14:54:45.000000000","message":"Put the path that already exists into the message for context.","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1adb8cda08af7f8326689b653c52d7d4ddb632ca","unresolved":false,"context_lines":[{"line_number":378,"context_line":"                # process or thread has already completed the opertaion."},{"line_number":379,"context_line":"                # In the event of a FileAlreadyExists we continue, all other"},{"line_number":380,"context_line":"                # exceptions will be raised."},{"line_number":381,"context_line":"                LOG.debug(_(\"File already exists\"))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        def _fetch_image_on_datastore():"},{"line_number":384,"context_line":"            \"\"\"Fetch image from Glance to datastore.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FrPM%3D","line":381,"in_reply_to":"AAAAUX%2F%2FrlE%3D","updated":"2014-02-11 15:33:28.000000000","message":"Done","commit_id":"c5e2c70a43459c4f64f3e07313cd3a90be995db1"}]}
