)]}'
{"neutron/pecan_wsgi/hooks/notifier.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b7c86441f3c86b78ed6231cbd4fcdcce88408b5a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":102,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":103,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":104,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":105,"context_line":"                resources \u003d state.request.context.get(\u0027request_resources\u0027)"},{"line_number":106,"context_line":"            for resource in resources:"},{"line_number":107,"context_line":"                self._nova_notify(action_resource, orig,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_3d072183","line":104,"updated":"2016-02-18 09:29:16.000000000","message":"I would want to do it in a different patch because out of tree plugins could be calling the nova notifier as well so we need to be pretty careful about preserving backwards compatibility.","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"59e4c1b4536d4c755fc8a50a9b3b031b9ca83d43","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":102,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":103,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":104,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":105,"context_line":"                resources \u003d state.request.context.get(\u0027request_resources\u0027)"},{"line_number":106,"context_line":"            for resource in resources:"},{"line_number":107,"context_line":"                self._nova_notify(action_resource, orig,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_a685e75a","line":104,"updated":"2016-02-18 07:18:42.000000000","message":"how hard would it to be to fix this strangeness?","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"16a0cdfb8725461a82d3528044b8a5071db29d20","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":102,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":103,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":104,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":105,"context_line":"                resources \u003d state.request.context.get(\u0027request_resources\u0027)"},{"line_number":106,"context_line":"            for resource in resources:"},{"line_number":107,"context_line":"                self._nova_notify(action_resource, orig,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_d3d24a5b","line":104,"in_reply_to":"dae33548_a685e75a","updated":"2016-02-18 16:55:41.000000000","message":"i figured as much","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7184afea54560bd8817cea70ed825e481115b7a5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            # notifications aren\u0027t enabled"},{"line_number":38,"context_line":"            from neutron.notifiers import nova"},{"line_number":39,"context_line":"            self._nova_notifier \u003d nova.Notifier()"},{"line_number":40,"context_line":"        self._nova_notifier.send_network_change(*args, **kwargs)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _notify_dhcp_agent(self, context, resource_name, action, resources):"},{"line_number":43,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin_for_resource(resource_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_f6bbdd73","line":40,"updated":"2016-02-19 12:50:25.000000000","message":"I don\u0027t think send_network_change takes keyword arguments, does it?","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a8eace703cd9a64798f73ce0426bf5d73439bda8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            # notifications aren\u0027t enabled"},{"line_number":38,"context_line":"            from neutron.notifiers import nova"},{"line_number":39,"context_line":"            self._nova_notifier \u003d nova.Notifier()"},{"line_number":40,"context_line":"        self._nova_notifier.send_network_change(*args, **kwargs)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _notify_dhcp_agent(self, context, resource_name, action, resources):"},{"line_number":43,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin_for_resource(resource_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_c2b3b296","line":40,"updated":"2016-03-01 09:32:45.000000000","message":"I suppose not, what if we want to pass a named argument down below though... :)","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7184afea54560bd8817cea70ed825e481115b7a5","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                # This was a bulk request"},{"line_number":89,"context_line":"                resources \u003d data[collection_name]"},{"line_number":90,"context_line":"        else:"},{"line_number":91,"context_line":"            resources \u003d []"},{"line_number":92,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":93,"context_line":"            self._notify_dhcp_agent(neutron_context, resource_name,"},{"line_number":94,"context_line":"                                    action, resources)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_16e2c103","line":91,"updated":"2016-02-19 12:50:25.000000000","message":"I edited the block above in https://review.openstack.org/#/c/260440/ as it would have failed with operations such as add_router_interface.\nThis patch should not be affected by this, I hope.","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a8eace703cd9a64798f73ce0426bf5d73439bda8","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                # This was a bulk request"},{"line_number":89,"context_line":"                resources \u003d data[collection_name]"},{"line_number":90,"context_line":"        else:"},{"line_number":91,"context_line":"            resources \u003d []"},{"line_number":92,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":93,"context_line":"            self._notify_dhcp_agent(neutron_context, resource_name,"},{"line_number":94,"context_line":"                                    action, resources)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_a2ae6e2b","line":91,"updated":"2016-03-01 09:32:45.000000000","message":"yes, it appears this caused a complete disaster!","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7184afea54560bd8817cea70ed825e481115b7a5","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                    action, resources)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":97,"context_line":"            action_resource \u003d \u0027%s_%s\u0027 % (action, resource_name)"},{"line_number":98,"context_line":"            orig \u003d {}"},{"line_number":99,"context_line":"            if action \u003d\u003d \u0027update\u0027:"},{"line_number":100,"context_line":"                orig \u003d state.request.context.get(\u0027request_resources\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_b69f955e","line":97,"updated":"2016-02-19 12:50:25.000000000","message":"can I be very annoying and ask to build action_resource in _nova_notify?","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a8eace703cd9a64798f73ce0426bf5d73439bda8","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                    action, resources)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":97,"context_line":"            action_resource \u003d \u0027%s_%s\u0027 % (action, resource_name)"},{"line_number":98,"context_line":"            orig \u003d {}"},{"line_number":99,"context_line":"            if action \u003d\u003d \u0027update\u0027:"},{"line_number":100,"context_line":"                orig \u003d state.request.context.get(\u0027request_resources\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_02aaba18","line":97,"updated":"2016-03-01 09:32:45.000000000","message":"sure","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a8eace703cd9a64798f73ce0426bf5d73439bda8","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":102,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":103,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":104,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":105,"context_line":"                resources \u003d state.request.context.get(\u0027request_resources\u0027)"},{"line_number":106,"context_line":"            for resource in resources:"},{"line_number":107,"context_line":"                self._nova_notify(action_resource, orig,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_e2a4f64b","line":104,"updated":"2016-03-01 09:32:45.000000000","message":"I was worried about breaking an out of tree core plugin that might call it. Do you know of any?","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7184afea54560bd8817cea70ed825e481115b7a5","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":102,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":103,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":104,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":105,"context_line":"                resources \u003d state.request.context.get(\u0027request_resources\u0027)"},{"line_number":106,"context_line":"            for resource in resources:"},{"line_number":107,"context_line":"                self._nova_notify(action_resource, orig,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_3120af9b","line":104,"updated":"2016-02-19 12:50:25.000000000","message":"It seem like it could be a bug in create_port_changed_event which could be easily fixed. Why don\u0027t we do that instead of having this weirdish bit of code?","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"828e5996701b215b75322d7f1adadde82a526c75","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":100,"context_line":"            orig \u003d {}"},{"line_number":101,"context_line":"            if action \u003d\u003d \u0027update\u0027:"},{"line_number":102,"context_line":"                orig \u003d state.request.context.get(\u0027request_resources\u0027)[0]"},{"line_number":103,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":104,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":105,"context_line":"                # it expects the original to be in the last argument on a"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_cf46df22","line":102,"updated":"2016-03-07 22:05:05.000000000","message":"I don\u0027t think request_resources means what you think it means, and that might explain the functional test failure.\n\nI am looking at this issue, I will post  a fix if I manage to find one.","commit_id":"26bd455134fcd81e31fd172f5909ed8f3d32e3b4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"be116f039daa9538abb7dee495ccf8ba83f05b29","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":100,"context_line":"            orig \u003d {}"},{"line_number":101,"context_line":"            if action \u003d\u003d \u0027update\u0027:"},{"line_number":102,"context_line":"                orig \u003d state.request.context.get(\u0027request_resources\u0027)[0]"},{"line_number":103,"context_line":"            elif action \u003d\u003d \u0027delete\u0027:"},{"line_number":104,"context_line":"                # NOTE(kevinbenton): the nova notifier is a bit strange because"},{"line_number":105,"context_line":"                # it expects the original to be in the last argument on a"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_efe75be2","line":102,"in_reply_to":"5aef4532_cf46df22","updated":"2016-03-07 22:11:59.000000000","message":"Well I make this sound your fault ;)\nI meant to write that request_resources seem not to contain the prefetched object.","commit_id":"26bd455134fcd81e31fd172f5909ed8f3d32e3b4"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"47b4be4309e754fd4c17dcce38e4ddd89f407b65","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":106,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":107,"context_line":"                resources \u003d ("},{"line_number":108,"context_line":"                    state.request.context.get(\u0027original_resources\u0027) or [])"},{"line_number":109,"context_line":"            for resource in resources:"},{"line_number":110,"context_line":"                self._nova_notify(action, resource_name, orig,"},{"line_number":111,"context_line":"                                  {resource_name: resource})"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_9045d818","line":108,"updated":"2016-03-09 08:43:58.000000000","message":"not able to just use .get(\u0027original_resources\u0027, [])?","commit_id":"fc954c9426a58e6bdcb744b1e5d131eff99d65e8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3042ee452b50899492fe9c813793aa4e3b271ac2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                # it expects the original to be in the last argument on a"},{"line_number":106,"context_line":"                # delete rather than in the \u0027original_obj\u0027 position"},{"line_number":107,"context_line":"                resources \u003d ("},{"line_number":108,"context_line":"                    state.request.context.get(\u0027original_resources\u0027) or [])"},{"line_number":109,"context_line":"            for resource in resources:"},{"line_number":110,"context_line":"                self._nova_notify(action, resource_name, orig,"},{"line_number":111,"context_line":"                                  {resource_name: resource})"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_e4a70309","line":108,"in_reply_to":"5aef4532_9045d818","updated":"2016-03-09 19:49:33.000000000","message":"oh, possibly. I can\u0027t remember if I ran into an issue where it was None. We can clean it up in another patch if not.","commit_id":"fc954c9426a58e6bdcb744b1e5d131eff99d65e8"}],"neutron/pecan_wsgi/hooks/policy_enforcement.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7184afea54560bd8817cea70ed825e481115b7a5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        return quota.get_tenant_quotas(resource_id)[quotasv2.RESOURCE_NAME]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def fetch_resource(neutron_context, resource, resource_id):"},{"line_number":41,"context_line":"    attrs \u003d v2_attributes.get_resource_info(resource)"},{"line_number":42,"context_line":"    field_list \u003d [name for (name, value) in attrs.items()"},{"line_number":43,"context_line":"                  if (value.get(\u0027required_by_policy\u0027) or"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_3141cf0c","line":40,"updated":"2016-02-19 12:50:25.000000000","message":"After seeing this, I thought you were going to use this somewhere else, and I\u0027d understand why. But I don\u0027t see any other hook where fetch_resource is used.\n\nas a side note, we might want a simple hook that just prefetches a resource if necessary. Or even better do that during the lookup process.","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a8eace703cd9a64798f73ce0426bf5d73439bda8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        return quota.get_tenant_quotas(resource_id)[quotasv2.RESOURCE_NAME]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def fetch_resource(neutron_context, resource, resource_id):"},{"line_number":41,"context_line":"    attrs \u003d v2_attributes.get_resource_info(resource)"},{"line_number":42,"context_line":"    field_list \u003d [name for (name, value) in attrs.items()"},{"line_number":43,"context_line":"                  if (value.get(\u0027required_by_policy\u0027) or"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_62b8e675","line":40,"updated":"2016-03-01 09:32:45.000000000","message":"I used it in the tests (e.g. L299 of test_hooks)","commit_id":"33fec7ad1d010524ab8fe39312f2cc8da751ea83"}],"neutron/tests/functional/pecan_wsgi/test_hooks.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b7c86441f3c86b78ed6231cbd4fcdcce88408b5a","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    def setUp(self):"},{"line_number":259,"context_line":"        patcher \u003d mock.patch(\u0027neutron.pecan_wsgi.hooks.notifier.NotifierHook.\u0027"},{"line_number":260,"context_line":"                             \u0027_nova_notify\u0027)"},{"line_number":261,"context_line":"        self.mock_notifier \u003d patcher.start()"},{"line_number":262,"context_line":"        super(TestNovaNotifierHook, self).setUp()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_nova_notifications_disabled(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_bdd4d1eb","line":261,"updated":"2016-02-18 09:29:16.000000000","message":"https://github.com/openstack/neutron/blob/1d0aadb6fcf40048e899df6688bda98744c2a999/neutron/tests/base.py#L150","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"59e4c1b4536d4c755fc8a50a9b3b031b9ca83d43","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    def setUp(self):"},{"line_number":259,"context_line":"        patcher \u003d mock.patch(\u0027neutron.pecan_wsgi.hooks.notifier.NotifierHook.\u0027"},{"line_number":260,"context_line":"                             \u0027_nova_notify\u0027)"},{"line_number":261,"context_line":"        self.mock_notifier \u003d patcher.start()"},{"line_number":262,"context_line":"        super(TestNovaNotifierHook, self).setUp()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_nova_notifications_disabled(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_46b97b14","line":261,"updated":"2016-02-18 07:18:42.000000000","message":"same comment I had on the previous review, patcher.stop should be added via self.addCleanup()","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"16a0cdfb8725461a82d3528044b8a5071db29d20","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    def setUp(self):"},{"line_number":259,"context_line":"        patcher \u003d mock.patch(\u0027neutron.pecan_wsgi.hooks.notifier.NotifierHook.\u0027"},{"line_number":260,"context_line":"                             \u0027_nova_notify\u0027)"},{"line_number":261,"context_line":"        self.mock_notifier \u003d patcher.start()"},{"line_number":262,"context_line":"        super(TestNovaNotifierHook, self).setUp()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_nova_notifications_disabled(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_934a8253","line":261,"in_reply_to":"dae33548_bdd4d1eb","updated":"2016-02-18 16:55:41.000000000","message":"i stand corrected :)","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b7c86441f3c86b78ed6231cbd4fcdcce88408b5a","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        patcher \u003d mock.patch(\u0027neutron.pecan_wsgi.hooks.notifier.NotifierHook.\u0027"},{"line_number":260,"context_line":"                             \u0027_nova_notify\u0027)"},{"line_number":261,"context_line":"        self.mock_notifier \u003d patcher.start()"},{"line_number":262,"context_line":"        super(TestNovaNotifierHook, self).setUp()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_nova_notifications_disabled(self):"},{"line_number":265,"context_line":"        cfg.CONF.set_override(\u0027notify_nova_on_port_data_changes\u0027, False)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_9dcf4d55","line":262,"updated":"2016-02-18 09:29:16.000000000","message":"There isn\u0027t really a right or wrong way. It really depends on the order that you want stuff to happen. In this case I think the patches before the setUp are a little safer in case the PecanFunctionalTest class does something that could trigger a notification in its setup.","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"59e4c1b4536d4c755fc8a50a9b3b031b9ca83d43","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        patcher \u003d mock.patch(\u0027neutron.pecan_wsgi.hooks.notifier.NotifierHook.\u0027"},{"line_number":260,"context_line":"                             \u0027_nova_notify\u0027)"},{"line_number":261,"context_line":"        self.mock_notifier \u003d patcher.start()"},{"line_number":262,"context_line":"        super(TestNovaNotifierHook, self).setUp()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_nova_notifications_disabled(self):"},{"line_number":265,"context_line":"        cfg.CONF.set_override(\u0027notify_nova_on_port_data_changes\u0027, False)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_c643cb11","line":262,"updated":"2016-02-18 07:18:42.000000000","message":"maybe i\u0027m just now noticing this, but i\u0027ve always had super setups called first, and super tearDowns called last.  Probably doesn\u0027t matter in this case, but have I been doing it all wrong?","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b7c86441f3c86b78ed6231cbd4fcdcce88408b5a","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            \u0027/v2.0/networks.json\u0027,"},{"line_number":268,"context_line":"            params\u003d{\u0027network\u0027: {\u0027name\u0027: \u0027meh\u0027}},"},{"line_number":269,"context_line":"            headers\u003d{\u0027X-Project-Id\u0027: \u0027tenid\u0027})"},{"line_number":270,"context_line":"        self.assertEqual(0, self.mock_notifier.call_count)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test_post_put_delete_triggers_notification(self):"},{"line_number":273,"context_line":"        req_headers \u003d {\u0027X-Project-Id\u0027: \u0027tenid\u0027, \u0027X-Roles\u0027: \u0027admin\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_fddad915","line":270,"updated":"2016-02-18 09:29:16.000000000","message":"I think you mean assertFalse ;)","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"59e4c1b4536d4c755fc8a50a9b3b031b9ca83d43","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            \u0027/v2.0/networks.json\u0027,"},{"line_number":268,"context_line":"            params\u003d{\u0027network\u0027: {\u0027name\u0027: \u0027meh\u0027}},"},{"line_number":269,"context_line":"            headers\u003d{\u0027X-Project-Id\u0027: \u0027tenid\u0027})"},{"line_number":270,"context_line":"        self.assertEqual(0, self.mock_notifier.call_count)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test_post_put_delete_triggers_notification(self):"},{"line_number":273,"context_line":"        req_headers \u003d {\u0027X-Project-Id\u0027: \u0027tenid\u0027, \u0027X-Roles\u0027: \u0027admin\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_46505bd4","line":270,"updated":"2016-02-18 07:18:42.000000000","message":"self.assertTrue(self.mock_notifier.called)","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"16a0cdfb8725461a82d3528044b8a5071db29d20","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            \u0027/v2.0/networks.json\u0027,"},{"line_number":268,"context_line":"            params\u003d{\u0027network\u0027: {\u0027name\u0027: \u0027meh\u0027}},"},{"line_number":269,"context_line":"            headers\u003d{\u0027X-Project-Id\u0027: \u0027tenid\u0027})"},{"line_number":270,"context_line":"        self.assertEqual(0, self.mock_notifier.call_count)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test_post_put_delete_triggers_notification(self):"},{"line_number":273,"context_line":"        req_headers \u003d {\u0027X-Project-Id\u0027: \u0027tenid\u0027, \u0027X-Roles\u0027: \u0027admin\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_9361e2d5","line":270,"in_reply_to":"dae33548_fddad915","updated":"2016-02-18 16:55:41.000000000","message":"just seeing if you were paying attention","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"59e4c1b4536d4c755fc8a50a9b3b031b9ca83d43","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        json_body \u003d jsonutils.loads(response.body)"},{"line_number":279,"context_line":"        self.assertEqual(1, self.mock_notifier.call_count)"},{"line_number":280,"context_line":"        self.assertEqual(mock.call(\u0027create_network\u0027, {}, json_body),"},{"line_number":281,"context_line":"                         self.mock_notifier.mock_calls[-1])"},{"line_number":282,"context_line":"        network_id \u003d json_body[\u0027network\u0027][\u0027id\u0027]"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        # NOTE(kevinbenton): the original passed into the notifier does"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_46ecdbf2","line":281,"updated":"2016-02-18 07:18:42.000000000","message":"i said this in the previous review as well, but this could be simplified by using self.mock_notifier.assert_called_once_with\n\nand after each method has been tested, you can do a self.mock_notifier.reset_mock() so you can continue using the assert_called_once_with method.","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b7c86441f3c86b78ed6231cbd4fcdcce88408b5a","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        json_body \u003d jsonutils.loads(response.body)"},{"line_number":279,"context_line":"        self.assertEqual(1, self.mock_notifier.call_count)"},{"line_number":280,"context_line":"        self.assertEqual(mock.call(\u0027create_network\u0027, {}, json_body),"},{"line_number":281,"context_line":"                         self.mock_notifier.mock_calls[-1])"},{"line_number":282,"context_line":"        network_id \u003d json_body[\u0027network\u0027][\u0027id\u0027]"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        # NOTE(kevinbenton): the original passed into the notifier does"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_ddd555e5","line":281,"updated":"2016-02-18 09:29:16.000000000","message":"yeah, i ended up doing that in the other notifier patch. I\u0027ll clean this up.","commit_id":"6b2b42ba5349e735b9bb9162370fa3e7c322bb35"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"47b4be4309e754fd4c17dcce38e4ddd89f407b65","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.mock_notifier.reset_mock()"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        orig \u003d pe.fetch_resource(context.get_admin_context(),"},{"line_number":340,"context_line":"                                 \u0027network\u0027, network_id)"},{"line_number":341,"context_line":"        response \u003d self.app.delete("},{"line_number":342,"context_line":"            \u0027/v2.0/networks/%s.json\u0027 % network_id, headers\u003dreq_headers)"},{"line_number":343,"context_line":"        self.assertEqual(204, response.status_int)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_c45f993f","line":340,"updated":"2016-03-09 08:43:58.000000000","message":"is there a need for orig at this point?  I dont see it being used afterwards","commit_id":"fc954c9426a58e6bdcb744b1e5d131eff99d65e8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3042ee452b50899492fe9c813793aa4e3b271ac2","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.mock_notifier.reset_mock()"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        orig \u003d pe.fetch_resource(context.get_admin_context(),"},{"line_number":340,"context_line":"                                 \u0027network\u0027, network_id)"},{"line_number":341,"context_line":"        response \u003d self.app.delete("},{"line_number":342,"context_line":"            \u0027/v2.0/networks/%s.json\u0027 % network_id, headers\u003dreq_headers)"},{"line_number":343,"context_line":"        self.assertEqual(204, response.status_int)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_e459c336","line":340,"in_reply_to":"5aef4532_c45f993f","updated":"2016-03-09 19:49:33.000000000","message":"used on L347","commit_id":"fc954c9426a58e6bdcb744b1e5d131eff99d65e8"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d415687602956c995b77c879892aa69429a960f1","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.mock_notifier.reset_mock()"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        orig \u003d pe.fetch_resource(context.get_admin_context(),"},{"line_number":340,"context_line":"                                 \u0027network\u0027, network_id)"},{"line_number":341,"context_line":"        response \u003d self.app.delete("},{"line_number":342,"context_line":"            \u0027/v2.0/networks/%s.json\u0027 % network_id, headers\u003dreq_headers)"},{"line_number":343,"context_line":"        self.assertEqual(204, response.status_int)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_c4a2c7ad","line":340,"in_reply_to":"5aef4532_e459c336","updated":"2016-03-09 20:06:54.000000000","message":"/me doh","commit_id":"fc954c9426a58e6bdcb744b1e5d131eff99d65e8"}]}
