)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f661434d68c9dc509044a0c2f1f182966bfe96cf","unresolved":false,"context_lines":[{"line_number":19,"context_line":"of host down."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I614714676bab4986564b236d74f2c0d77400e48c"},{"line_number":22,"context_line":"Closes-bug: #124330"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FH%2FI%3D","line":22,"updated":"2013-10-22 20:24:07.000000000","message":"I think you meant bug 1243301.","commit_id":"f516789ab069a45fe273b2f50117eec5349f091e"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"ad21b1cbe66a7754ba4101e08a319660eea1a3e6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"of host down."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I614714676bab4986564b236d74f2c0d77400e48c"},{"line_number":22,"context_line":"Closes-bug: #124330"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FHxY%3D","line":22,"in_reply_to":"AAAATH%2F%2FH%2FI%3D","updated":"2013-10-23 03:44:05.000000000","message":"Done","commit_id":"f516789ab069a45fe273b2f50117eec5349f091e"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f661434d68c9dc509044a0c2f1f182966bfe96cf","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1330,"context_line":"                            self.notifier, context, instance,"},{"line_number":1331,"context_line":"                            \"%s.start\" % delete_type)"},{"line_number":1332,"context_line":"                    instance.destroy()"},{"line_number":1333,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1334,"context_line":"                            self.notifier, context, instance,"},{"line_number":1335,"context_line":"                            \"%s.end\" % delete_type,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FH9k%3D","side":"PARENT","line":1332,"updated":"2013-10-22 20:24:07.000000000","message":"Could just removing instance.destroy() fix your problem?  Seems bad to be removing the notification and quota code here.","commit_id":"19ea0c8c83b20692ee1e7572079388cbd9d8681a"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"ad21b1cbe66a7754ba4101e08a319660eea1a3e6","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1330,"context_line":"                            self.notifier, context, instance,"},{"line_number":1331,"context_line":"                            \"%s.start\" % delete_type)"},{"line_number":1332,"context_line":"                    instance.destroy()"},{"line_number":1333,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1334,"context_line":"                            self.notifier, context, instance,"},{"line_number":1335,"context_line":"                            \"%s.end\" % delete_type,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FHwk%3D","side":"PARENT","line":1332,"in_reply_to":"AAAATH%2F%2FH9k%3D","updated":"2013-10-23 03:44:05.000000000","message":"Hi Matt, This code is still executed. The notification part is done in 1466 and 1497, and the quota commit in 1346.","commit_id":"19ea0c8c83b20692ee1e7572079388cbd9d8681a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad6ca6e4171eca58f8ed7baf35fa71f0d664dffd","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1330,"context_line":"                            self.notifier, context, instance,"},{"line_number":1331,"context_line":"                            \"%s.start\" % delete_type)"},{"line_number":1332,"context_line":"                    instance.destroy()"},{"line_number":1333,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1334,"context_line":"                            self.notifier, context, instance,"},{"line_number":1335,"context_line":"                            \"%s.end\" % delete_type,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATX%2F%2F%2BTo%3D","side":"PARENT","line":1332,"in_reply_to":"AAAATH%2F%2FHwk%3D","updated":"2013-10-23 13:22:27.000000000","message":"OK, I see the notifications and the quota commit should be hit because on line 1332 the instance.host value should be None and a ComputeHostNotFound should be raised, which would keep is_up as False.","commit_id":"19ea0c8c83b20692ee1e7572079388cbd9d8681a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d263deb06dd2387e70420bd3dde78a21ee47422c","unresolved":false,"context_lines":[{"line_number":1459,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1460,"context_line":"                          \"database\") % host, instance\u003dinstance)"},{"line_number":1461,"context_line":"        else:"},{"line_number":1462,"context_line":"            LOG.debug(_(\"instance was never allocated on a host, \""},{"line_number":1463,"context_line":"                        \"deleting from database only\"), instance\u003dinstance)"},{"line_number":1464,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":1465,"context_line":"        instance.info_cache.delete()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BTc%3D","line":1462,"updated":"2013-10-23 13:24:58.000000000","message":"nit: s/instance/Instance/\n\nI realize the existing warning uses \u0027instance\u0027 but it should be \u0027Instance\u0027.","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"7d6f69b50faf681d40f8fa6b7c16c83d95bf2653","unresolved":false,"context_lines":[{"line_number":1459,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1460,"context_line":"                          \"database\") % host, instance\u003dinstance)"},{"line_number":1461,"context_line":"        else:"},{"line_number":1462,"context_line":"            LOG.debug(_(\"instance was never allocated on a host, \""},{"line_number":1463,"context_line":"                        \"deleting from database only\"), instance\u003dinstance)"},{"line_number":1464,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":1465,"context_line":"        instance.info_cache.delete()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BCI%3D","line":1462,"in_reply_to":"AAAATX%2F%2F%2BTc%3D","updated":"2013-10-23 15:27:14.000000000","message":"Done","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"c014457ff94f20d0107785941f757839f5db4d25","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1457,"context_line":"        host \u003d instance[\u0027host\u0027]"},{"line_number":1458,"context_line":"        if host:"},{"line_number":1459,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1460,"context_line":"                          \"database\") % host, instance\u003dinstance)"},{"line_number":1461,"context_line":"        else:"},{"line_number":1462,"context_line":"            LOG.debug(_(\"Instance was never allocated on a host, \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FokM%3D","line":1459,"updated":"2013-10-31 06:08:25.000000000","message":"nit: Instance\u0027s","commit_id":"cb71ad4ee54076720e94050070111713bfa2180f"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"a5213ee27fa23d88d477924f86e6deea5473cc97","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1457,"context_line":"        host \u003d instance[\u0027host\u0027]"},{"line_number":1458,"context_line":"        if host:"},{"line_number":1459,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1460,"context_line":"                          \"database\") % host, instance\u003dinstance)"},{"line_number":1461,"context_line":"        else:"},{"line_number":1462,"context_line":"            LOG.debug(_(\"Instance was never allocated on a host, \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fm68%3D","line":1459,"in_reply_to":"AAAATn%2F%2FokM%3D","updated":"2013-10-31 14:09:06.000000000","message":"Hi GuoHui, \nThis message is not part of my change, but I think the use of the possessive \u0027s here is correct.\nThank you,","commit_id":"cb71ad4ee54076720e94050070111713bfa2180f"}],"nova/tests/api/openstack/compute/plugins/v3/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d263deb06dd2387e70420bd3dde78a21ee47422c","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"        super(ServersControllerDeleteTest, self).setUp()"},{"line_number":1094,"context_line":"        self.server_delete_called \u003d False"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"        def deallocate_for_instance_mock(self, context, instance):"},{"line_number":1097,"context_line":"            return"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        self.stubs.Set(network_api.API,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BTM%3D","line":1096,"updated":"2013-10-23 13:24:58.000000000","message":"I would rather see this done in the tests that need it and then you can verify what\u0027s passed to it using mock and checking the calls.","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"7d6f69b50faf681d40f8fa6b7c16c83d95bf2653","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"        super(ServersControllerDeleteTest, self).setUp()"},{"line_number":1094,"context_line":"        self.server_delete_called \u003d False"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"        def deallocate_for_instance_mock(self, context, instance):"},{"line_number":1097,"context_line":"            return"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        self.stubs.Set(network_api.API,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F9xk%3D","line":1096,"in_reply_to":"AAAATX%2F%2F%2BTM%3D","updated":"2013-10-23 15:27:14.000000000","message":"They all need it now.","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d263deb06dd2387e70420bd3dde78a21ee47422c","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"        def deallocate_for_instance_mock(self, context, instance):"},{"line_number":1097,"context_line":"            return"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        self.stubs.Set(network_api.API,"},{"line_number":1100,"context_line":"                       \u0027deallocate_for_instance\u0027,"},{"line_number":1101,"context_line":"                       deallocate_for_instance_mock)"},{"line_number":1102,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BTU%3D","line":1099,"updated":"2013-10-23 13:24:58.000000000","message":"Prefer using mock now if possible.","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"7d6f69b50faf681d40f8fa6b7c16c83d95bf2653","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"        def deallocate_for_instance_mock(self, context, instance):"},{"line_number":1097,"context_line":"            return"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        self.stubs.Set(network_api.API,"},{"line_number":1100,"context_line":"                       \u0027deallocate_for_instance\u0027,"},{"line_number":1101,"context_line":"                       deallocate_for_instance_mock)"},{"line_number":1102,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F9xg%3D","line":1099,"in_reply_to":"AAAATX%2F%2F%2BTU%3D","updated":"2013-10-23 15:27:14.000000000","message":"Done","commit_id":"190627f9aedc2f88c3e0abd73a6ed69ff3b560e6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"382ebe93c3436924ab8d8a81702dcf50c9093e1e","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"    def setUp(self):"},{"line_number":1097,"context_line":"        network_api_patcher \u003d mock.patch(\u0027nova.compute.api.network.API\u0027)"},{"line_number":1098,"context_line":"        network_api_mock \u003d network_api_patcher.start()"},{"line_number":1099,"context_line":"        network_api_mock.deallocate_for_instance \u003d mock.Mock()"},{"line_number":1100,"context_line":"        self.addCleanup(network_api_patcher.stop)"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"        super(ServersControllerDeleteTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Funo%3D","line":1099,"updated":"2013-10-29 20:06:09.000000000","message":"I\u0027m having a hard time figuring out why this is needed - I don\u0027t see what changes in the code to warrant the need for this, plus it\u0027s not really asserting anything, it\u0027s just completely taking deallocate_for_instance out of the test coverage.\n\nIs this here because these tests are getting into the _local_delete method now?  If that\u0027s the case, I guess the problem with validating the mock call is that the instance is created in the test case after the test setup, so you can\u0027t validate the instance (unless you made it a class variable?) - or the context for that matter.  This is probably a case where mox is better mock because it would fail if the mocked deallocate_for_instance isn\u0027t called.","commit_id":"6c75a0e719ed116cec1d403826e5e92662ec3316"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"a4ca71029dd55320763b36debfc834c0c01a01e5","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"    def setUp(self):"},{"line_number":1097,"context_line":"        network_api_patcher \u003d mock.patch(\u0027nova.compute.api.network.API\u0027)"},{"line_number":1098,"context_line":"        network_api_mock \u003d network_api_patcher.start()"},{"line_number":1099,"context_line":"        network_api_mock.deallocate_for_instance \u003d mock.Mock()"},{"line_number":1100,"context_line":"        self.addCleanup(network_api_patcher.stop)"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"        super(ServersControllerDeleteTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FppU%3D","line":1099,"in_reply_to":"AAAATn%2F%2Funo%3D","updated":"2013-10-30 21:25:17.000000000","message":"Hi Matt, That is exactly why this is needed now, because we are going through local_delete now. We unified the path of instance deletion (to not have a special case for when an instance\u0027s host is None). So, deallocate_for_instance was not being invoked before, and they were not testing that, I don\u0027t think that is part of the test, they are just testing the API ultimate results in the db destroy call, and not the deletion internals. I can also check that deallocate was called if you think it\u0027s necessary using mock. Thank you.","commit_id":"6c75a0e719ed116cec1d403826e5e92662ec3316"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0680dde514ac6cb572ef6e966ddc7e78a53f37e","unresolved":false,"context_lines":[{"line_number":2833,"context_line":"        output \u003d self.view_builder.show(self.request, self.instance)"},{"line_number":2834,"context_line":"        self.assertThat(output, matchers.DictMatches(expected_server))"},{"line_number":2835,"context_line":""},{"line_number":2836,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":2837,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":2838,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":2839,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F%2FlF0%3D","line":2836,"updated":"2013-11-01 00:20:42.000000000","message":"Would be nice to make a protected common method for both this test and test_build_server_detail_with_fault so you can avoid the 95% copy here, looks like the only differences are the status check and message in the fake fault object, so seems like you could toggle a common test with wither or not it\u0027s status should be deleted or not (default to the error case for the existing test).","commit_id":"a43d72b288d27499f33f9241fe966d8d0654e83e"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"e2b6e2421d14474aac7afaa04a54cc63093c54b9","unresolved":false,"context_lines":[{"line_number":2833,"context_line":"        output \u003d self.view_builder.show(self.request, self.instance)"},{"line_number":2834,"context_line":"        self.assertThat(output, matchers.DictMatches(expected_server))"},{"line_number":2835,"context_line":""},{"line_number":2836,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":2837,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":2838,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":2839,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F%2FfBU%3D","line":2836,"in_reply_to":"AAAATn%2F%2FlF0%3D","updated":"2013-11-04 23:15:42.000000000","message":"Actually I just double-checked all the other test_build_server_detail_with_fault_* methods here, and they all just test the dictionary differences, instead of re-creating/testing the whole details dictionary like I am doing here. \n\nIn the next patch I remove all the verbosity due to that, and make this test match all the others.","commit_id":"a43d72b288d27499f33f9241fe966d8d0654e83e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0e191fb6ecb0e847655aac60dc3d41f8b653a00","unresolved":false,"context_lines":[{"line_number":2834,"context_line":"        self.assertThat(output, matchers.DictMatches(expected_server))"},{"line_number":2835,"context_line":""},{"line_number":2836,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":2837,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":2838,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":2839,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"},{"line_number":2840,"context_line":"                                             message\u003d\"No valid host was found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2Fe7Y%3D","line":2837,"updated":"2013-11-05 00:46:03.000000000","message":"This should be an integer:\n\nhttps://github.com/openstack/nova/blob/master/nova/openstack/common/db/sqlalchemy/models.py#L102","commit_id":"0f3c15fc11003cb68559e044aee9f84954283857"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"cbcbae0ee5969a4a173f63485e09c7ab944bf17c","unresolved":false,"context_lines":[{"line_number":2834,"context_line":"        self.assertThat(output, matchers.DictMatches(expected_server))"},{"line_number":2835,"context_line":""},{"line_number":2836,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":2837,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":2838,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":2839,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"},{"line_number":2840,"context_line":"                                             message\u003d\"No valid host was found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2Fe6Y%3D","line":2837,"in_reply_to":"AAAATn%2F%2Fe7Y%3D","updated":"2013-11-05 00:59:40.000000000","message":"Done","commit_id":"0f3c15fc11003cb68559e044aee9f84954283857"}],"nova/tests/api/openstack/compute/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0e191fb6ecb0e847655aac60dc3d41f8b653a00","unresolved":false,"context_lines":[{"line_number":3817,"context_line":"                matchers.DictMatches(self.expected_detailed_server))"},{"line_number":3818,"context_line":""},{"line_number":3819,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":3820,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":3821,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":3822,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"},{"line_number":3823,"context_line":"                                             message\u003d\"No valid host was found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2Fe7M%3D","line":3820,"updated":"2013-11-05 00:46:03.000000000","message":"This should be an integer:\n\nhttps://github.com/openstack/nova/blob/master/nova/openstack/common/db/sqlalchemy/models.py#L102","commit_id":"0f3c15fc11003cb68559e044aee9f84954283857"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"cbcbae0ee5969a4a173f63485e09c7ab944bf17c","unresolved":false,"context_lines":[{"line_number":3817,"context_line":"                matchers.DictMatches(self.expected_detailed_server))"},{"line_number":3818,"context_line":""},{"line_number":3819,"context_line":"    def test_build_server_detail_with_fault_that_has_been_deleted(self):"},{"line_number":3820,"context_line":"        self.instance[\u0027deleted\u0027] \u003d True"},{"line_number":3821,"context_line":"        self.instance[\u0027vm_state\u0027] \u003d vm_states.ERROR"},{"line_number":3822,"context_line":"        fault \u003d fake_instance.fake_fault_obj(self.uuid, code\u003d500,"},{"line_number":3823,"context_line":"                                             message\u003d\"No valid host was found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2Fe6Q%3D","line":3820,"in_reply_to":"AAAATn%2F%2Fe7M%3D","updated":"2013-11-05 00:59:40.000000000","message":"Done","commit_id":"0f3c15fc11003cb68559e044aee9f84954283857"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"382ebe93c3436924ab8d8a81702dcf50c9093e1e","unresolved":false,"context_lines":[{"line_number":8557,"context_line":"    def test_wrapped_method(self):"},{"line_number":8558,"context_line":"        instance \u003d self._create_fake_instance(params\u003d{\u0027host\u0027: None,"},{"line_number":8559,"context_line":"                                                      \u0027cell_name\u0027: \u0027foo\u0027})"},{"line_number":8560,"context_line":""},{"line_number":8561,"context_line":"        # force delete to fail"},{"line_number":8562,"context_line":"        rules \u003d {\"compute:delete\": [[\"false:false\"]]}"},{"line_number":8563,"context_line":"        self.policy.set_rules(rules)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FunI%3D","side":"PARENT","line":8560,"updated":"2013-10-29 20:06:09.000000000","message":"Why was this line removed? Shouldn\u0027t have an unnecessary whitespace change in here.","commit_id":"ee06a032e4571f2a8612c8efa3d4f4a569c4e8a2"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"a4ca71029dd55320763b36debfc834c0c01a01e5","unresolved":false,"context_lines":[{"line_number":8557,"context_line":"    def test_wrapped_method(self):"},{"line_number":8558,"context_line":"        instance \u003d self._create_fake_instance(params\u003d{\u0027host\u0027: None,"},{"line_number":8559,"context_line":"                                                      \u0027cell_name\u0027: \u0027foo\u0027})"},{"line_number":8560,"context_line":""},{"line_number":8561,"context_line":"        # force delete to fail"},{"line_number":8562,"context_line":"        rules \u003d {\"compute:delete\": [[\"false:false\"]]}"},{"line_number":8563,"context_line":"        self.policy.set_rules(rules)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FppI%3D","side":"PARENT","line":8560,"in_reply_to":"AAAATn%2F%2FunI%3D","updated":"2013-10-30 21:25:17.000000000","message":"Done","commit_id":"ee06a032e4571f2a8612c8efa3d4f4a569c4e8a2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"382ebe93c3436924ab8d8a81702dcf50c9093e1e","unresolved":false,"context_lines":[{"line_number":8555,"context_line":"        compute_api.check_policy(self.context, \u0027reboot\u0027, {})"},{"line_number":8556,"context_line":""},{"line_number":8557,"context_line":"    @mock.patch(\u0027nova.network.api.API.deallocate_for_instance\u0027)"},{"line_number":8558,"context_line":"    def test_wrapped_method(self, mock_network_api):"},{"line_number":8559,"context_line":"        instance \u003d self._create_fake_instance(params\u003d{\u0027host\u0027: None,"},{"line_number":8560,"context_line":"                                                      \u0027cell_name\u0027: \u0027foo\u0027})"},{"line_number":8561,"context_line":"        # force delete to fail"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fum0%3D","line":8558,"updated":"2013-10-29 20:06:09.000000000","message":"Where is mock_network_api defined?  I just haven\u0027t used mock in this way so does this just completely mock out nova.network.api.API.deallocate_for_instance so it doesn\u0027t do anything?  I think you should do the mock within the test case and make sure it\u0027s actually called with the instance you expect, otherwise it\u0027s just a noop.","commit_id":"6c75a0e719ed116cec1d403826e5e92662ec3316"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"a4ca71029dd55320763b36debfc834c0c01a01e5","unresolved":false,"context_lines":[{"line_number":8555,"context_line":"        compute_api.check_policy(self.context, \u0027reboot\u0027, {})"},{"line_number":8556,"context_line":""},{"line_number":8557,"context_line":"    @mock.patch(\u0027nova.network.api.API.deallocate_for_instance\u0027)"},{"line_number":8558,"context_line":"    def test_wrapped_method(self, mock_network_api):"},{"line_number":8559,"context_line":"        instance \u003d self._create_fake_instance(params\u003d{\u0027host\u0027: None,"},{"line_number":8560,"context_line":"                                                      \u0027cell_name\u0027: \u0027foo\u0027})"},{"line_number":8561,"context_line":"        # force delete to fail"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fpng%3D","line":8558,"in_reply_to":"AAAATn%2F%2Fum0%3D","updated":"2013-10-30 21:25:17.000000000","message":"mock_network_api is injected by mock...\n\nIt needs to be mocked otherwise the real one was invoked, and it fails since it tries to do actual deallocation, but we really just want to test that it gets called.\n\nAnyway, I think what you suggest here makes sense, it should be more legible now. Thanks.","commit_id":"6c75a0e719ed116cec1d403826e5e92662ec3316"}]}
