)]}'
{"nova/tests/virt/vmwareapi/test_vmwareapi.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"c1479be2326d07a79acc7adfd0d3778d2348aff7","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                          lambda *args, **kwargs: None)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def test_snapshot_delete(self):"},{"line_number":424,"context_line":"        snapshot_ref \u003d vmwareapi_fake.ManagedObjectReference("},{"line_number":425,"context_line":"                               value\u003d\"Snapshot-123\","},{"line_number":426,"context_line":"                               name\u003d\"VirtualMachineSnapshot\")"},{"line_number":427,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bi0w%3D","line":424,"updated":"2013-11-24 15:42:25.000000000","message":"Suggest use mock for new unit test case.","commit_id":"583e0607fdfaeef7c989313fefe978249bf75056"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"dd763e8b6d4bb6b607c82acb96745a809004bf46","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                          lambda *args, **kwargs: None)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def test_snapshot_delete(self):"},{"line_number":424,"context_line":"        snapshot_ref \u003d vmwareapi_fake.ManagedObjectReference("},{"line_number":425,"context_line":"                               value\u003d\"Snapshot-123\","},{"line_number":426,"context_line":"                               name\u003d\"VirtualMachineSnapshot\")"},{"line_number":427,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BhYw%3D","line":424,"in_reply_to":"AAAATn%2F%2BhbI%3D","updated":"2013-11-25 06:45:43.000000000","message":"Thanks Vui, no problem, we can fix this later.","commit_id":"583e0607fdfaeef7c989313fefe978249bf75056"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"382d28f1fb7be4f9bc717f279d65aa3fc846588b","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                          lambda *args, **kwargs: None)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def test_snapshot_delete(self):"},{"line_number":424,"context_line":"        snapshot_ref \u003d vmwareapi_fake.ManagedObjectReference("},{"line_number":425,"context_line":"                               value\u003d\"Snapshot-123\","},{"line_number":426,"context_line":"                               name\u003d\"VirtualMachineSnapshot\")"},{"line_number":427,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BhbI%3D","line":424,"in_reply_to":"AAAATn%2F%2Bi0w%3D","updated":"2013-11-25 06:20:13.000000000","message":"This test is closely related to handful of other test cases that are implemented using mox, I will like to keep the same mockup structure for this case if that is alright.","commit_id":"583e0607fdfaeef7c989313fefe978249bf75056"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                               value\u003d\"Snapshot-123\","},{"line_number":427,"context_line":"                               name\u003d\"VirtualMachineSnapshot\")"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        self.mox.StubOutWithMock(vmops.VMwareVMOps,"},{"line_number":430,"context_line":"                                 \u0027_create_vm_snapshot\u0027)"},{"line_number":431,"context_line":"        self.conn._vmops._create_vm_snapshot("},{"line_number":432,"context_line":"                mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(snapshot_ref)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoFY%3D","line":429,"updated":"2014-01-10 11:22:35.000000000","message":"New tests should use mock:\nhttps://wiki.openstack.org/wiki/ReviewChecklist\n\nHowever this change has been up here ages, and as such, I will overlook that requirement.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        self.mox.StubOutWithMock(vmops.VMwareVMOps,"},{"line_number":430,"context_line":"                                 \u0027_create_vm_snapshot\u0027)"},{"line_number":431,"context_line":"        self.conn._vmops._create_vm_snapshot("},{"line_number":432,"context_line":"                mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(snapshot_ref)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        self.mox.StubOutWithMock(vmops.VMwareVMOps,"},{"line_number":435,"context_line":"                                 \u0027_delete_vm_snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoB8%3D","line":432,"updated":"2014-01-10 11:22:35.000000000","message":"IgnoreArg is a cop out here, why not check the params passed, since this is what you are trying to test?\n\nself.instance should be in here as a minimum I feel.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"137af0e31e050ec1bfb5d9a45e048fb2e2cdaf7b","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        self.mox.StubOutWithMock(vmops.VMwareVMOps,"},{"line_number":430,"context_line":"                                 \u0027_create_vm_snapshot\u0027)"},{"line_number":431,"context_line":"        self.conn._vmops._create_vm_snapshot("},{"line_number":432,"context_line":"                mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(snapshot_ref)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        self.mox.StubOutWithMock(vmops.VMwareVMOps,"},{"line_number":435,"context_line":"                                 \u0027_delete_vm_snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FwMM%3D","line":432,"in_reply_to":"AAAAUH%2F%2FoB8%3D","updated":"2014-02-24 23:31:50.000000000","message":"Done","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"c1479be2326d07a79acc7adfd0d3778d2348aff7","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                   snapshot_task, \"Task\", \"info\")"},{"line_number":680,"context_line":"        return task_info.result"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"},{"line_number":683,"context_line":"        delete_snapshot_task \u003d self._session._call_method("},{"line_number":684,"context_line":"                    self._session._get_vim(),"},{"line_number":685,"context_line":"                    \"RemoveSnapshot_Task\", snapshot,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bi0k%3D","line":682,"updated":"2013-11-24 15:42:25.000000000","message":"Do you want to add a debug log to indicate \"deleting\"?","commit_id":"583e0607fdfaeef7c989313fefe978249bf75056"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"382d28f1fb7be4f9bc717f279d65aa3fc846588b","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                   snapshot_task, \"Task\", \"info\")"},{"line_number":680,"context_line":"        return task_info.result"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"},{"line_number":683,"context_line":"        delete_snapshot_task \u003d self._session._call_method("},{"line_number":684,"context_line":"                    self._session._get_vim(),"},{"line_number":685,"context_line":"                    \"RemoveSnapshot_Task\", snapshot,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bhbg%3D","line":682,"in_reply_to":"AAAATn%2F%2Bi0k%3D","updated":"2013-11-25 06:20:13.000000000","message":"Done. I also cleaned up some unncessary line breaks and indents.","commit_id":"583e0607fdfaeef7c989313fefe978249bf75056"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":696,"context_line":"        (vmdk_file_path_before_snapshot, adapter_type, disk_type,"},{"line_number":697,"context_line":"         datastore_name, os_type) \u003d _get_vm_and_vmdk_attribs()"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        def _create_vm_snapshot():"},{"line_number":700,"context_line":"            # Create a snapshot of the VM"},{"line_number":701,"context_line":"            LOG.debug(_(\"Creating Snapshot of the VM instance\"),"},{"line_number":702,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoEw%3D","side":"PARENT","line":699,"updated":"2014-01-10 11:22:35.000000000","message":"Ideally refactoring would be in a separate commit, this is much harder to review.\n\nBut lets leave it for now, its not too bad.","commit_id":"f567a1146002fb39107bcbe636cdba0be9a2c87a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":749,"context_line":"                   \"vmware-tmp/%s-flat.vmdk\" % random_name)"},{"line_number":750,"context_line":"        dc_ref \u003d self._get_datacenter_ref_and_name()[0]"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"        def _copy_vmdk_content():"},{"line_number":753,"context_line":"            # Copy the contents of the disk (or disks, if there were snapshots"},{"line_number":754,"context_line":"            # done earlier) to a temporary vmdk file."},{"line_number":755,"context_line":"            copy_spec \u003d self.get_copy_virtual_disk_spec(client_factory,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoDk%3D","side":"PARENT","line":752,"updated":"2014-01-10 11:22:35.000000000","message":"For consistency, in a prior change, I would have pulled out this method into its own method too. But lets not hold back the change for this minor nit.","commit_id":"f567a1146002fb39107bcbe636cdba0be9a2c87a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":669,"context_line":"                    quiesce\u003dTrue)"},{"line_number":670,"context_line":"        self._session._wait_for_task(instance[\u0027uuid\u0027], snapshot_task)"},{"line_number":671,"context_line":"        LOG.debug(_(\"Created Snapshot of the VM instance\"), instance\u003dinstance)"},{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoC0%3D","line":672,"updated":"2014-01-10 11:22:35.000000000","message":"I think its probably worth a self._session._wait_for_task_and_get_info method.\n\nBut anyways, that can be done in a follow up.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"137af0e31e050ec1bfb5d9a45e048fb2e2cdaf7b","unresolved":false,"context_lines":[{"line_number":669,"context_line":"                    quiesce\u003dTrue)"},{"line_number":670,"context_line":"        self._session._wait_for_task(instance[\u0027uuid\u0027], snapshot_task)"},{"line_number":671,"context_line":"        LOG.debug(_(\"Created Snapshot of the VM instance\"), instance\u003dinstance)"},{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FwKw%3D","line":672,"in_reply_to":"AAAAUH%2F%2FoC0%3D","updated":"2014-02-24 23:31:50.000000000","message":"wait_for_task in the common library code that was recently factored out is already returning the task info, so I have decided not to do it here.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        LOG.debug(_(\"Created Snapshot of the VM instance\"), instance\u003dinstance)"},{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Fn%2BI%3D","line":674,"updated":"2014-01-10 11:22:35.000000000","message":"Do we have unit tests that cover this new code, its not very clear to me?","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"137af0e31e050ec1bfb5d9a45e048fb2e2cdaf7b","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        LOG.debug(_(\"Created Snapshot of the VM instance\"), instance\u003dinstance)"},{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FwLs%3D","line":674,"in_reply_to":"AAAAUH%2F%2Fn%2BI%3D","updated":"2014-02-24 23:31:50.000000000","message":"Added","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"},{"line_number":678,"context_line":"        LOG.debug(_(\"Deleting Snapshot of the VM instance\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoEQ%3D","line":675,"updated":"2014-01-10 11:22:35.000000000","message":"snapshot \u003d test_info.result\n\nreturn snapshot\n\nwould be easier to read, but its a very minor nit.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"137af0e31e050ec1bfb5d9a45e048fb2e2cdaf7b","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        task_info \u003d self._session._call_method(vim_util,"},{"line_number":673,"context_line":"                                               \"get_dynamic_property\","},{"line_number":674,"context_line":"                                               snapshot_task, \"Task\", \"info\")"},{"line_number":675,"context_line":"        return task_info.result"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):"},{"line_number":678,"context_line":"        LOG.debug(_(\"Deleting Snapshot of the VM instance\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FwL4%3D","line":675,"in_reply_to":"AAAAUH%2F%2FoEQ%3D","updated":"2014-02-24 23:31:50.000000000","message":"Done","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"88f77f41428e0a9e0c32fc277dcd6daaa928dd64","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                      instance\u003dinstance)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        _copy_vmdk_content()"},{"line_number":786,"context_line":"        self._delete_vm_snapshot(instance, vm_ref, snapshot)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"        cookies \u003d self._session._get_vim().client.options.transport.cookiejar"},{"line_number":789,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FoEE%3D","line":786,"updated":"2014-01-10 11:22:35.000000000","message":"I assume you want to delete the snapshot even if the copy_disk_task were to fail? Maybe this should be in some finally clause?\n\nWe can fix that up in a follow up change, please raise a bug if you want that to happen, so we don\u0027t forget.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"137af0e31e050ec1bfb5d9a45e048fb2e2cdaf7b","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                      instance\u003dinstance)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        _copy_vmdk_content()"},{"line_number":786,"context_line":"        self._delete_vm_snapshot(instance, vm_ref, snapshot)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"        cookies \u003d self._session._get_vim().client.options.transport.cookiejar"},{"line_number":789,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FwIw%3D","line":786,"in_reply_to":"AAAAUH%2F%2FoEE%3D","updated":"2014-02-24 23:31:50.000000000","message":"Good point. This was addressed in another patch where we changed and generally simplified the way we do image snapshots. So for this I will just put a comment to note the issue.","commit_id":"583ae676ed0ef4a503698ce7c8b72f57810e8dd9"}]}
