)]}'
{"nova/tests/test_powervm.py":[{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"95b99735d169830d91752811a4894c2025e15ed9","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        self.instance \u003d create_instance(self)"},{"line_number":689,"context_line":"        self.image_id \u003d self.instance[\u0027image_ref\u0027]"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def test_create_volume_from_image_fails_no_disk_name(self):"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"        def fake_create_logical_volume(size):"},{"line_number":694,"context_line":"            raise exception.PowerVMNoSpaceLeftOnVolumeGroup()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2Fo%3D","line":691,"updated":"2013-05-21 20:50:55.000000000","message":"maybe add a description/note that we are looking for delete_volume not being called after the volume creation fails","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86bdc5199c97caf8aa1114ef29a81d3039558689","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        self.instance \u003d create_instance(self)"},{"line_number":689,"context_line":"        self.image_id \u003d self.instance[\u0027image_ref\u0027]"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def test_create_volume_from_image_fails_no_disk_name(self):"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"        def fake_create_logical_volume(size):"},{"line_number":694,"context_line":"            raise exception.PowerVMNoSpaceLeftOnVolumeGroup()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2Co%3D","line":691,"in_reply_to":"AAAAPH%2F%2F2Fo%3D","updated":"2013-05-21 21:00:17.000000000","message":"Done","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"95b99735d169830d91752811a4894c2025e15ed9","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                          self.context, self.instance, self.image_id)"},{"line_number":711,"context_line":"        self.assertFalse(self.delete_volume_called)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def test_create_volume_from_image_fails_with_disk_name(self):"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        disk_name \u003d \u0027lvm_disk_name\u0027"},{"line_number":716,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2F4%3D","line":713,"updated":"2013-05-21 20:50:55.000000000","message":"maybe add a description/note that we are looking for delete_volume being called to cleanup if copying to the volume fails","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86bdc5199c97caf8aa1114ef29a81d3039558689","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                          self.context, self.instance, self.image_id)"},{"line_number":711,"context_line":"        self.assertFalse(self.delete_volume_called)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def test_create_volume_from_image_fails_with_disk_name(self):"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        disk_name \u003d \u0027lvm_disk_name\u0027"},{"line_number":716,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2CI%3D","line":713,"in_reply_to":"AAAAPH%2F%2F2F4%3D","updated":"2013-05-21 21:00:17.000000000","message":"Done","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"95b99735d169830d91752811a4894c2025e15ed9","unresolved":false,"context_lines":[{"line_number":722,"context_line":""},{"line_number":723,"context_line":"        self.delete_volume_called \u003d False"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":"        def fake_delete_volume(volume_info):"},{"line_number":726,"context_line":"            self.assertEquals(disk_name, volume_info)"},{"line_number":727,"context_line":"            self.delete_volume_called \u003d True"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2Gk%3D","line":725,"updated":"2013-05-21 20:50:55.000000000","message":"usually this would be a great use of mox.StubOutWithMock, but this works as well.","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d475da422dcbdbdc1cd9031e636dedf06143a5d3","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_copy_image_file\u0027,"},{"line_number":704,"context_line":"                       fake_copy_image_file)"},{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyiY%3D","line":706,"updated":"2013-05-22 23:31:09.000000000","message":"You know you can do this, right?\n\n  self.mox.StubOutWithMock(self.powervm_adapter, \u0027_create_logical_volume\u0027)\n  self.powervm_adapter._create_logical_volume(whatever).AndRaise(exception.PowerVMNoSpaceLeftOnVolumeGroup)\n\nright? Much more succinct and nicer to look at, IMHO.","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"77b5bdcef99a6542579884b548818323f9b180ea","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_copy_image_file\u0027,"},{"line_number":704,"context_line":"                       fake_copy_image_file)"},{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyNs%3D","line":706,"in_reply_to":"AAAAPH%2F%2FyTw%3D","updated":"2013-05-23 03:26:19.000000000","message":"Yeah, the rest of the tests really should use self.mox as well. They\u0027d be a heckuva lot cleaner if they did.","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5c14c7534af7d33f1a28b9e1ee577c2da5bf5856","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_copy_image_file\u0027,"},{"line_number":704,"context_line":"                       fake_copy_image_file)"},{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyTw%3D","line":706,"in_reply_to":"AAAAPH%2F%2FyiY%3D","updated":"2013-05-23 02:07:32.000000000","message":"This is all pretty new to me and the first tests I wrote were based on what\u0027s already in the test_powervm module, so I haven\u0027t used mox yet, but I agree this looks cleaner, I just don\u0027t have the experience.","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d475da422dcbdbdc1cd9031e636dedf06143a5d3","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        self.assertRaises(exception.PowerVMNoSpaceLeftOnVolumeGroup,"},{"line_number":711,"context_line":"                          self.powervm_adapter.create_volume_from_image,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyiQ%3D","line":708,"updated":"2013-05-22 23:31:09.000000000","message":"If you use mox, and stub it out, but never call it, then if it gets called, mox will complain during tearDown. Easier than stubbing it out to fail like this, IMHO.","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"77b5bdcef99a6542579884b548818323f9b180ea","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        self.assertRaises(exception.PowerVMNoSpaceLeftOnVolumeGroup,"},{"line_number":711,"context_line":"                          self.powervm_adapter.create_volume_from_image,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyNY%3D","line":708,"in_reply_to":"AAAAPH%2F%2FyTU%3D","updated":"2013-05-23 03:26:19.000000000","message":"Just call self.mox.ReplayAll() after you\u0027ve set up your call sequences. The VerifyAll() is called automatically during tearDown() so you don\u0027t have to do it.","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5c14c7534af7d33f1a28b9e1ee577c2da5bf5856","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027_create_logical_volume\u0027,"},{"line_number":706,"context_line":"                       fake_create_logical_volume)"},{"line_number":707,"context_line":"        self.stubs.Set(self.powervm_adapter, \u0027delete_volume\u0027,"},{"line_number":708,"context_line":"                       fake_delete_volume)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        self.assertRaises(exception.PowerVMNoSpaceLeftOnVolumeGroup,"},{"line_number":711,"context_line":"                          self.powervm_adapter.create_volume_from_image,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyTU%3D","line":708,"in_reply_to":"AAAAPH%2F%2FyiQ%3D","updated":"2013-05-23 02:07:32.000000000","message":"So like this? self.mox.StubOutWithMock(self.powervm_adapter, \u0027delete_volume\u0027)?  When doing self.mox, do you have to deal with the ReplayAll() / VerifyAll() stuff?","commit_id":"83b3d5ca68006b4c1c05d089376ee8e6740afbc9"}],"nova/virt/powervm/blockdev.py":[{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"95b99735d169830d91752811a4894c2025e15ed9","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self._copy_file_to_device(remote_file_name, disk_name)"},{"line_number":191,"context_line":"        except Exception:"},{"line_number":192,"context_line":"            LOG.error(_(\"Error while creating logical volume from image. \""},{"line_number":193,"context_line":"                        \"Will attempt cleanup.\"))"},{"line_number":194,"context_line":"            # attempt cleanup of logical volume before re-raising exception"},{"line_number":195,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":196,"context_line":"                if disk_name is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2EU%3D","line":193,"updated":"2013-05-21 20:50:55.000000000","message":"Technically we aren\u0027t attempting cleanup all the time now like the message says, but I guess if there isn\u0027t anything to clean up (disk_name is None) then we already did cleanup... Not sure if we need to do anything here.","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86bdc5199c97caf8aa1114ef29a81d3039558689","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self._copy_file_to_device(remote_file_name, disk_name)"},{"line_number":191,"context_line":"        except Exception:"},{"line_number":192,"context_line":"            LOG.error(_(\"Error while creating logical volume from image. \""},{"line_number":193,"context_line":"                        \"Will attempt cleanup.\"))"},{"line_number":194,"context_line":"            # attempt cleanup of logical volume before re-raising exception"},{"line_number":195,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":196,"context_line":"                if disk_name is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F2DA%3D","line":193,"in_reply_to":"AAAAPH%2F%2F2EU%3D","updated":"2013-05-21 21:00:17.000000000","message":"Yeah, I saw the message and thought about the same thing, I didn\u0027t feel the need to change it.","commit_id":"e5d6e474fb7df0ea92d4dcf34f4e3f8ee8624166"}]}
