)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"951a5263b1f4d0f1d1ef6ed93fbfa2bba363a98c","unresolved":false,"context_lines":[{"line_number":1906,"context_line":"                        image, filter_properties, admin_password,"},{"line_number":1907,"context_line":"                        injected_files, requested_networks, security_groups,"},{"line_number":1908,"context_line":"                        block_device_mapping)"},{"line_number":1909,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":1910,"context_line":"                    exception.UnexpectedDeletingTaskStateError):"},{"line_number":1911,"context_line":"                msg \u003d _(\u0027Instance disappeared during build.\u0027)"},{"line_number":1912,"context_line":"                LOG.debug(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_b9ba4f6c","line":1909,"updated":"2014-06-01 12:22:26.000000000","message":"Consider having a\n\nfinally:\n    self._cleanup_allocated_networks(context, instance, requested_networks)\n\nThe code is starting to look a little messy","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8e6be5593a321248450f33e23289ddf1a2182a16","unresolved":false,"context_lines":[{"line_number":1906,"context_line":"                        image, filter_properties, admin_password,"},{"line_number":1907,"context_line":"                        injected_files, requested_networks, security_groups,"},{"line_number":1908,"context_line":"                        block_device_mapping)"},{"line_number":1909,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":1910,"context_line":"                    exception.UnexpectedDeletingTaskStateError):"},{"line_number":1911,"context_line":"                msg \u003d _(\u0027Instance disappeared during build.\u0027)"},{"line_number":1912,"context_line":"                LOG.debug(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_823c25e4","line":1909,"in_reply_to":"1ae5cdf2_b9ba4f6c","updated":"2014-06-02 15:00:03.000000000","message":"I like that idea, but that would cause it to run even in the case of no exception being raised, which wouldn\u0027t be correct.","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"951a5263b1f4d0f1d1ef6ed93fbfa2bba363a98c","unresolved":false,"context_lines":[{"line_number":2080,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":2081,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2082,"context_line":"            instance.save()"},{"line_number":2083,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2084,"context_line":"            pass"},{"line_number":2085,"context_line":"        except Exception:"},{"line_number":2086,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_f97217e2","line":2083,"updated":"2014-06-01 12:22:26.000000000","message":"i am not sure that _deallocate_network has a place that raises this exception (certain the case for neutron). but i may be mistaken here.","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8e6be5593a321248450f33e23289ddf1a2182a16","unresolved":false,"context_lines":[{"line_number":2080,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":2081,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2082,"context_line":"            instance.save()"},{"line_number":2083,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2084,"context_line":"            pass"},{"line_number":2085,"context_line":"        except Exception:"},{"line_number":2086,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_222b5195","line":2083,"in_reply_to":"1ae5cdf2_f97217e2","updated":"2014-06-02 15:00:03.000000000","message":"The instance.save would raise it.  But I should split the exception handling here.","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3391cf8dde2e99fc203a264e32f40c16641b9514","unresolved":false,"context_lines":[{"line_number":1963,"context_line":"                            extra_usage_info\u003d{\u0027message\u0027: _(\u0027Success\u0027)},"},{"line_number":1964,"context_line":"                            network_info\u003dnetwork_info)"},{"line_number":1965,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":1966,"context_line":"                exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":1967,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1968,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":1969,"context_line":"                    \u0027create.end\u0027, fault\u003de)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_ca0fc886","line":1966,"updated":"2014-06-04 17:43:49.000000000","message":"Hmm, should we do this in the block around line 1910 now too?","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f51d5e43e03b9434c2fca574895783faed5f288","unresolved":false,"context_lines":[{"line_number":1963,"context_line":"                            extra_usage_info\u003d{\u0027message\u0027: _(\u0027Success\u0027)},"},{"line_number":1964,"context_line":"                            network_info\u003dnetwork_info)"},{"line_number":1965,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":1966,"context_line":"                exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":1967,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1968,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":1969,"context_line":"                    \u0027create.end\u0027, fault\u003de)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_ed557e50","line":1966,"in_reply_to":"1ae5cdf2_6d76cea5","updated":"2014-06-04 18:19:11.000000000","message":"Your last sentence says a lot, I was thinking the same thing when looking at build_and_run_instance calling do_build_and_run_instance (synchronized) calling _build_and_run_instance which then has the _build_resources context.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"825f115b5c987efe7572ca55a8206103940654f9","unresolved":false,"context_lines":[{"line_number":1963,"context_line":"                            extra_usage_info\u003d{\u0027message\u0027: _(\u0027Success\u0027)},"},{"line_number":1964,"context_line":"                            network_info\u003dnetwork_info)"},{"line_number":1965,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":1966,"context_line":"                exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":1967,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1968,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":1969,"context_line":"                    \u0027create.end\u0027, fault\u003de)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_6d76cea5","line":1966,"in_reply_to":"1ae5cdf2_ca0fc886","updated":"2014-06-04 17:56:55.000000000","message":"The block around line 1910 is run after this one, it catches the reraised exception.  These are caught here so that proper notifications can be sent, and then network cleanup and error states are handled above.  It\u0027s setup this way mostly to keep notifications close together and cleanup code only handling a few cases, not the multitude that happen at this level.  This whole thing is a mess though and needs to get cleaned up.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3391cf8dde2e99fc203a264e32f40c16641b9514","unresolved":false,"context_lines":[{"line_number":2086,"context_line":"        instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2087,"context_line":"        try:"},{"line_number":2088,"context_line":"            instance.save()"},{"line_number":2089,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2090,"context_line":"            pass"},{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"    def _cleanup_build_resources(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_4a72d811","line":2089,"updated":"2014-06-04 17:43:49.000000000","message":"Do we have a test for this?","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"825f115b5c987efe7572ca55a8206103940654f9","unresolved":false,"context_lines":[{"line_number":2086,"context_line":"        instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2087,"context_line":"        try:"},{"line_number":2088,"context_line":"            instance.save()"},{"line_number":2089,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2090,"context_line":"            pass"},{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"    def _cleanup_build_resources(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_ed69febe","line":2089,"in_reply_to":"1ae5cdf2_4a72d811","updated":"2014-06-04 17:56:55.000000000","message":"No.  But I\u0027m going to pull this out into a separate patch.  It\u0027s just a nice cleanup and not really related.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"0f551b55ec478c43206743fdf106caa2ae6d01e1","unresolved":false,"context_lines":[{"line_number":2086,"context_line":"        instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2087,"context_line":"        try:"},{"line_number":2088,"context_line":"            instance.save()"},{"line_number":2089,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2090,"context_line":"            pass"},{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"    def _cleanup_build_resources(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_cdcd22b9","line":2089,"in_reply_to":"1ae5cdf2_ed69febe","updated":"2014-06-04 17:58:49.000000000","message":"Oh, this is actually related.  I guess I\u0027ll write that test now.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"51b50728b87ae2f7b27919a46224e67af1d460ab","unresolved":false,"context_lines":[{"line_number":2086,"context_line":"        instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":2087,"context_line":"        try:"},{"line_number":2088,"context_line":"            instance.save()"},{"line_number":2089,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2090,"context_line":"            pass"},{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"    def _cleanup_build_resources(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_66531f17","line":2089,"updated":"2014-06-05 22:08:44.000000000","message":"it may be nice to have a comment here, explaining this.","commit_id":"f5ea3f5f4c62a4ad2c391db8613830f8564cde2e"}],"nova/tests/compute/test_compute_mgr.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"951a5263b1f4d0f1d1ef6ed93fbfa2bba363a98c","unresolved":false,"context_lines":[{"line_number":1565,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1566,"context_line":"                limits\u003dself.limits)"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def test_build_and_run_instance_not_found(self):"},{"line_number":1569,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_build_and_run_instance\u0027)"},{"line_number":1570,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_cleanup_allocated_networks\u0027)"},{"line_number":1571,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_set_instance_error_state\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_d95e3b45","line":1568,"updated":"2014-06-01 12:22:26.000000000","message":"any chance of using mock here instead?","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8e6be5593a321248450f33e23289ddf1a2182a16","unresolved":false,"context_lines":[{"line_number":1565,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1566,"context_line":"                limits\u003dself.limits)"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def test_build_and_run_instance_not_found(self):"},{"line_number":1569,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_build_and_run_instance\u0027)"},{"line_number":1570,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_cleanup_allocated_networks\u0027)"},{"line_number":1571,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_set_instance_error_state\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_bd6860bb","line":1568,"in_reply_to":"1ae5cdf2_d95e3b45","updated":"2014-06-02 15:00:03.000000000","message":"I can do that.  It was just easy to copy/paste and modify slightly to get this test :)","commit_id":"2f68124075092ed2361331506f173bfb88600d41"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3391cf8dde2e99fc203a264e32f40c16641b9514","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"            mock.patch.object(self.compute.compute_task_api,"},{"line_number":1579,"context_line":"                \u0027build_instances\u0027),"},{"line_number":1580,"context_line":"            mock.patch.object(self.instance, \u0027save\u0027,"},{"line_number":1581,"context_line":"                return_value\u003dself.instance)"},{"line_number":1582,"context_line":"        ) as ("},{"line_number":1583,"context_line":"            event_start,"},{"line_number":1584,"context_line":"            event_finish_with_failure,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_aae6fcad","line":1581,"updated":"2014-06-04 17:43:49.000000000","message":"nova.objects.instance.Instance.save() doesn\u0027t return a value.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"825f115b5c987efe7572ca55a8206103940654f9","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"            mock.patch.object(self.compute.compute_task_api,"},{"line_number":1579,"context_line":"                \u0027build_instances\u0027),"},{"line_number":1580,"context_line":"            mock.patch.object(self.instance, \u0027save\u0027,"},{"line_number":1581,"context_line":"                return_value\u003dself.instance)"},{"line_number":1582,"context_line":"        ) as ("},{"line_number":1583,"context_line":"            event_start,"},{"line_number":1584,"context_line":"            event_finish_with_failure,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_2d8e8679","line":1581,"in_reply_to":"1ae5cdf2_aae6fcad","updated":"2014-06-04 17:56:55.000000000","message":"Heh, right.  This was copied over from the mox style patches above which do return on instance.save, most likely due to that being missed when it was converted from db.update_and_get_original to instance.save.","commit_id":"08ff83db2d46692349deb8e00cae1b317d76b97b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"deb91a4a74573a775fc245ee3b9b000f9d155393","unresolved":false,"context_lines":[{"line_number":1981,"context_line":"                mock.patch.object(self.compute, \u0027_deallocate_network\u0027),"},{"line_number":1982,"context_line":"                mock.patch.object(self.instance, \u0027save\u0027,"},{"line_number":1983,"context_line":"                    side_effect\u003dexception.InstanceNotFound(instance_id\u003d\u0027\u0027))"},{"line_number":1984,"context_line":"        ) as (_deallocate_network, save):"},{"line_number":1985,"context_line":"            # Testing that this doesn\u0027t raise an exeption"},{"line_number":1986,"context_line":"            self.compute._cleanup_allocated_networks(self.context,"},{"line_number":1987,"context_line":"                    self.instance, self.requested_networks)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_6d65ee1c","line":1984,"updated":"2014-06-04 18:22:45.000000000","message":"Would be good to assert these are called once and how (mock.assert_called_once_with).\n\nCould also assert that this is set on the instance:\n\nself.assertFalse(instance.system_metadata[\u0027network_allocated\u0027])","commit_id":"92642a57e3706a763d25fbe0308f83cb8be824df"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3e7f3523a4e4de92ed23bd5bb9e5375e5143ad4","unresolved":false,"context_lines":[{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def _test_build_and_run_instance_cleanup_network_on_failure(self, exc):"},{"line_number":1569,"context_line":"        with contextlib.nested("},{"line_number":1570,"context_line":"            mock.patch.object(instance_action_obj.InstanceActionEvent,"},{"line_number":1571,"context_line":"                \u0027event_start\u0027),"},{"line_number":1572,"context_line":"            mock.patch.object(instance_action_obj.InstanceActionEvent,"},{"line_number":1573,"context_line":"                \u0027event_finish_with_failure\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_de53ea14","line":1570,"updated":"2014-06-05 14:16:22.000000000","message":"D\u0027oh, I missed this, sorry, but we should be just using objects.InstanceActionEvent since we\u0027re trying to get rid of the deeper objects imports:\n\nhttps://review.openstack.org/#/c/94208/17/nova/tests/compute/test_compute_mgr.py","commit_id":"46f5647e0b683c0118b89696291a464a8ba147ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3e7f3523a4e4de92ed23bd5bb9e5375e5143ad4","unresolved":false,"context_lines":[{"line_number":1569,"context_line":"        with contextlib.nested("},{"line_number":1570,"context_line":"            mock.patch.object(instance_action_obj.InstanceActionEvent,"},{"line_number":1571,"context_line":"                \u0027event_start\u0027),"},{"line_number":1572,"context_line":"            mock.patch.object(instance_action_obj.InstanceActionEvent,"},{"line_number":1573,"context_line":"                \u0027event_finish_with_failure\u0027),"},{"line_number":1574,"context_line":"            mock.patch.object(self.compute, \u0027_build_and_run_instance\u0027,"},{"line_number":1575,"context_line":"                side_effect\u003dexc),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_fe56e604","line":1572,"updated":"2014-06-05 14:16:22.000000000","message":"And here.","commit_id":"46f5647e0b683c0118b89696291a464a8ba147ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e90d477873f7e1250a14a2536b97c60acd000dcb","unresolved":false,"context_lines":[{"line_number":1534,"context_line":"                security_groups\u003dself.security_groups,"},{"line_number":1535,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1536,"context_line":"                limits\u003dself.limits)"},{"line_number":1537,"context_line":""},{"line_number":1538,"context_line":"    def test_unexpected_exception(self):"},{"line_number":1539,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_build_and_run_instance\u0027)"},{"line_number":1540,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_cleanup_allocated_networks\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_1c00ed32","line":1537,"updated":"2014-06-05 20:42:55.000000000","message":"Oh yeah, didn\u0027t notice this, but based on what markmc said, this looks to be testing the same thing, but misses the new exceptions we want to cover.  Could you just update this to iterate over a list of exceptions to handle?","commit_id":"f5ea3f5f4c62a4ad2c391db8613830f8564cde2e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27257acd7506f8e6678b8ce61275557327868d2e","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"    def _test_build_and_run_instance_cleanup_network_on_failure(self, exc):"},{"line_number":1569,"context_line":"        with contextlib.nested("},{"line_number":1570,"context_line":"            mock.patch.object(objects.InstanceActionEvent,"},{"line_number":1571,"context_line":"                \u0027event_start\u0027),"},{"line_number":1572,"context_line":"            mock.patch.object(objects.InstanceActionEvent,"},{"line_number":1573,"context_line":"                \u0027event_finish_with_failure\u0027),"},{"line_number":1574,"context_line":"            mock.patch.object(self.compute, \u0027_build_and_run_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_feb34607","line":1571,"updated":"2014-06-05 14:22:34.000000000","message":"nit: you could probably bring this up a level now.","commit_id":"f5ea3f5f4c62a4ad2c391db8613830f8564cde2e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27257acd7506f8e6678b8ce61275557327868d2e","unresolved":false,"context_lines":[{"line_number":1978,"context_line":""},{"line_number":1979,"context_line":"    def test_cleanup_allocated_networks_instance_not_found(self):"},{"line_number":1980,"context_line":"        with contextlib.nested("},{"line_number":1981,"context_line":"                mock.patch.object(self.compute, \u0027_deallocate_network\u0027),"},{"line_number":1982,"context_line":"                mock.patch.object(self.instance, \u0027save\u0027,"},{"line_number":1983,"context_line":"                    side_effect\u003dexception.InstanceNotFound(instance_id\u003d\u0027\u0027))"},{"line_number":1984,"context_line":"        ) as (_deallocate_network, save):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_7ef016c9","line":1981,"updated":"2014-06-05 14:22:34.000000000","message":"Indentation is weird here but I won\u0027t -1 on that.","commit_id":"f5ea3f5f4c62a4ad2c391db8613830f8564cde2e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"c0d947dc5ec58044e3ef6f63ea5a52808a708dd2","unresolved":false,"context_lines":[{"line_number":1978,"context_line":""},{"line_number":1979,"context_line":"    def test_cleanup_allocated_networks_instance_not_found(self):"},{"line_number":1980,"context_line":"        with contextlib.nested("},{"line_number":1981,"context_line":"                mock.patch.object(self.compute, \u0027_deallocate_network\u0027),"},{"line_number":1982,"context_line":"                mock.patch.object(self.instance, \u0027save\u0027,"},{"line_number":1983,"context_line":"                    side_effect\u003dexception.InstanceNotFound(instance_id\u003d\u0027\u0027))"},{"line_number":1984,"context_line":"        ) as (_deallocate_network, save):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_13053b13","line":1981,"in_reply_to":"1ae5cdf2_7ef016c9","updated":"2014-06-05 22:23:38.000000000","message":"This is what my editor does, not sure why.  I typically fix it but missed it here.","commit_id":"f5ea3f5f4c62a4ad2c391db8613830f8564cde2e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1b3515b6498bef5a83d2ca6cf09dc39d2c5c964f","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"                security_groups\u003dself.security_groups,"},{"line_number":1565,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1566,"context_line":"                limits\u003dself.limits)"},{"line_number":1567,"context_line":"        self.mox.UnsetStubs()"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def test_build_and_run_instance_exceptions(self):"},{"line_number":1570,"context_line":"        exceptions \u003d ["}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_09750c31","line":1567,"updated":"2014-06-05 23:13:46.000000000","message":"Is this actually needed?","commit_id":"5a364cb00a39b31a9d5ddb30b5cc24af54e89f4a"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"94e7bf724cbbecfff5435df6ae9b7cf548044a2b","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"                security_groups\u003dself.security_groups,"},{"line_number":1565,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1566,"context_line":"                limits\u003dself.limits)"},{"line_number":1567,"context_line":"        self.mox.UnsetStubs()"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def test_build_and_run_instance_exceptions(self):"},{"line_number":1570,"context_line":"        exceptions \u003d ["}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_710bc523","line":1567,"in_reply_to":"1ae5cdf2_09750c31","updated":"2014-06-06 12:15:36.000000000","message":"It is because I get \"TypeError: Cannot mock a MockAnything! Did you remember to call UnsetStubs in your previous test?\" without out.  Typically these helper methods are called by multiple test methods with slight variations, but since I\u0027m looping over this in the same test method everything needs to get unset and remocked each time.","commit_id":"5a364cb00a39b31a9d5ddb30b5cc24af54e89f4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a05849c40ca109912274c8902408c6441d22d095","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"                security_groups\u003dself.security_groups,"},{"line_number":1565,"context_line":"                block_device_mapping\u003dself.block_device_mapping, node\u003dself.node,"},{"line_number":1566,"context_line":"                limits\u003dself.limits)"},{"line_number":1567,"context_line":"        self.mox.UnsetStubs()"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def test_build_and_run_instance_exceptions(self):"},{"line_number":1570,"context_line":"        exceptions \u003d ["}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_e75b971f","line":1567,"in_reply_to":"1ae5cdf2_710bc523","updated":"2014-06-06 13:14:22.000000000","message":"OK, thanks for the explanation.","commit_id":"5a364cb00a39b31a9d5ddb30b5cc24af54e89f4a"}]}
