)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a5a58799ce9cefb6c145e77eba2d5e6f5aba025d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"(with or without an agent) should already instantiate their own notifier,"},{"line_number":21,"context_line":"and if they do not, this should be rectified."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"A search on codesearch.openstack.org reveals that out-of-tree plugins"},{"line_number":24,"context_line":"already specify their own notifiers, and the default initialization is"},{"line_number":25,"context_line":"clearly redundant now."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3aaa91ec_2cf496cd","line":23,"range":{"start_line":23,"start_character":12,"end_line":23,"end_character":36},"updated":"2016-06-28 19:42:26.000000000","message":"Where have I been!   I didn\u0027t even know this existed.","commit_id":"877778ee4c7f0e83b54f54b2d7bafec98f89626c"}],"neutron/api/v2/base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7d19205bae9340c147dbe168faae90dd623c8ea3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        agent_notifiers \u003d getattr(plugin, \u0027agent_notifiers\u0027, {})"},{"line_number":95,"context_line":"        self._dhcp_agent_notifier \u003d ("},{"line_number":96,"context_line":"            agent_notifiers.get(constants.AGENT_TYPE_DHCP) or"},{"line_number":97,"context_line":"            dhcp_rpc_agent_api.DhcpAgentNotifyAPI()"},{"line_number":98,"context_line":"        )"},{"line_number":99,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":100,"context_line":"            from neutron.notifiers import nova"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_58b1ece0","side":"PARENT","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":51},"updated":"2016-06-21 08:56:41.000000000","message":"In the new code, DhcpAgentNotifyAPI is not instantiated.\nDoes this mean that a plugin must instantiate DhcpAgentNotifyAPI?\n\nI think it is okay, but at least it is better to be mentioned in the commit message.","commit_id":"348045fae3d0ea903ba75bea0248559dea1a9ecf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2cd92722bb2a233ac9c301dd18cf9d1fc0e60467","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        agent_notifiers \u003d getattr(plugin, \u0027agent_notifiers\u0027, {})"},{"line_number":95,"context_line":"        self._dhcp_agent_notifier \u003d ("},{"line_number":96,"context_line":"            agent_notifiers.get(constants.AGENT_TYPE_DHCP) or"},{"line_number":97,"context_line":"            dhcp_rpc_agent_api.DhcpAgentNotifyAPI()"},{"line_number":98,"context_line":"        )"},{"line_number":99,"context_line":"        if cfg.CONF.notify_nova_on_port_data_changes:"},{"line_number":100,"context_line":"            from neutron.notifiers import nova"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_96a4c4b9","side":"PARENT","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":51},"in_reply_to":"5a9d85d2_58b1ece0","updated":"2016-06-21 09:50:09.000000000","message":"You\u0027re right, I made a point about this in a comment, I\u0027ll be more specific in the commit message. In fact, I am thinking this should be done more carefully for out of tree plugins. There\u0027s a couple of situations I see, depending on whether the plugin uses dhcp as is, or implement its own, with or without an agent. In the case the plugin doesn\u0027t instantiate the notifier, one could argue that\u0027s an oversight to be rectified. For what I can tell, plugins do initiate the notifiers themselves [1], so the default initialization is redundant, especially now that there is no outside caller to be aware of it.\n\n[1] http://codesearch.openstack.org/?q\u003dDhcpAgentNotifyAPI\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"348045fae3d0ea903ba75bea0248559dea1a9ecf"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8740582efe5d21181b3a27540dddb69dd013e42f","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                                notifier_method,"},{"line_number":472,"context_line":"                                create_result)"},{"line_number":473,"context_line":"            registry.notify(self._resource, events.BEFORE_RESPONSE, self,"},{"line_number":474,"context_line":"                context\u003drequest.context, data\u003dcreate_result,"},{"line_number":475,"context_line":"                method_name\u003dnotifier_method, collection\u003dself._collection)"},{"line_number":476,"context_line":"            return create_result"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_0a421068","line":474,"updated":"2016-06-24 07:29:22.000000000","message":"I find this indentation level distastful ;)","commit_id":"3aebb3e4fff846e985567e6ab97c9d6e89259ede"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"94aaa6def324045ac32035a7026ceda38265192a","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                                notifier_method,"},{"line_number":472,"context_line":"                                create_result)"},{"line_number":473,"context_line":"            registry.notify(self._resource, events.BEFORE_RESPONSE, self,"},{"line_number":474,"context_line":"                context\u003drequest.context, data\u003dcreate_result,"},{"line_number":475,"context_line":"                method_name\u003dnotifier_method, collection\u003dself._collection)"},{"line_number":476,"context_line":"            return create_result"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_fdc78c95","line":474,"in_reply_to":"3aaa91ec_0a421068","updated":"2016-06-24 07:40:29.000000000","message":"sorry","commit_id":"3aebb3e4fff846e985567e6ab97c9d6e89259ede"}],"neutron/callbacks/events.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7d19205bae9340c147dbe168faae90dd623c8ea3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# String literals representing core events."},{"line_number":14,"context_line":"BEFORE_CREATE \u003d \u0027before_create\u0027"},{"line_number":15,"context_line":"BEFORE_READ \u003d \u0027before_read\u0027"},{"line_number":16,"context_line":"BEFORE_RESPONSE \u003d \u0027before_response\u0027"},{"line_number":17,"context_line":"BEFORE_UPDATE \u003d \u0027before_update\u0027"},{"line_number":18,"context_line":"BEFORE_DELETE \u003d \u0027before_delete\u0027"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_dd6dce99","line":16,"updated":"2016-06-21 08:56:41.000000000","message":"How about API_REQUEST/RESPOSE?\nrequest and response are used in various contexts, so I think adding API_ prefix makes things clearer.","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2cd92722bb2a233ac9c301dd18cf9d1fc0e60467","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# String literals representing core events."},{"line_number":14,"context_line":"BEFORE_CREATE \u003d \u0027before_create\u0027"},{"line_number":15,"context_line":"BEFORE_READ \u003d \u0027before_read\u0027"},{"line_number":16,"context_line":"BEFORE_RESPONSE \u003d \u0027before_response\u0027"},{"line_number":17,"context_line":"BEFORE_UPDATE \u003d \u0027before_update\u0027"},{"line_number":18,"context_line":"BEFORE_DELETE \u003d \u0027before_delete\u0027"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_3696b04c","line":16,"in_reply_to":"5a9d85d2_dd6dce99","updated":"2016-06-21 09:50:09.000000000","message":"I thought of it, but it\u0027s too long and break the pattern :P\n\nCould do BEFORE_APICALL/AFTER_APICALL, but I don\u0027t like it either. I can add documentation.","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a5a58799ce9cefb6c145e77eba2d5e6f5aba025d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# String literals representing events associated to API operations"},{"line_number":29,"context_line":"BEFORE_RESPONSE \u003d \u0027before_response\u0027"},{"line_number":30,"context_line":"AFTER_REQUEST \u003d \u0027after_request\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# String literals representing events associated to error conditions"},{"line_number":33,"context_line":"ABORT_CREATE \u003d \u0027abort_create\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_4c7c8220","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":13},"updated":"2016-06-28 19:42:26.000000000","message":"Why is this one useful?  Just trying to be symmetrical?  :)","commit_id":"877778ee4c7f0e83b54f54b2d7bafec98f89626c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"75320af6dbde6fbaf74761dd104a2353dbee8acd","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# String literals representing events associated to API operations"},{"line_number":29,"context_line":"BEFORE_RESPONSE \u003d \u0027before_response\u0027"},{"line_number":30,"context_line":"AFTER_REQUEST \u003d \u0027after_request\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# String literals representing events associated to error conditions"},{"line_number":33,"context_line":"ABORT_CREATE \u003d \u0027abort_create\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_47dbbbed","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":13},"in_reply_to":"3aaa91ec_4c7c8220","updated":"2016-06-28 20:00:56.000000000","message":"added for completeness :)","commit_id":"877778ee4c7f0e83b54f54b2d7bafec98f89626c"}],"neutron/tests/unit/api/v2/test_base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7d19205bae9340c147dbe168faae90dd623c8ea3","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"            if opname \u003d\u003d \u0027delete\u0027:"},{"line_number":1370,"context_line":"                res \u003d self.api.delete(_get_path(\u0027networks\u0027, id\u003d_uuid()))"},{"line_number":1371,"context_line":"                expected_code \u003d exc.HTTPNoContent.code"},{"line_number":1372,"context_line":"            self.assertTrue(notify.called)"},{"line_number":1373,"context_line":"        self.assertEqual(expected_code, res.status_int)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"    def test_network_create_registry_notify(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_fd07ea7e","line":1372,"updated":"2016-06-21 08:56:41.000000000","message":"It is better to test arguments of notify().","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2cd92722bb2a233ac9c301dd18cf9d1fc0e60467","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"            if opname \u003d\u003d \u0027delete\u0027:"},{"line_number":1370,"context_line":"                res \u003d self.api.delete(_get_path(\u0027networks\u0027, id\u003d_uuid()))"},{"line_number":1371,"context_line":"                expected_code \u003d exc.HTTPNoContent.code"},{"line_number":1372,"context_line":"            self.assertTrue(notify.called)"},{"line_number":1373,"context_line":"        self.assertEqual(expected_code, res.status_int)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"    def test_network_create_registry_notify(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_76f3189f","line":1372,"in_reply_to":"5a9d85d2_fd07ea7e","updated":"2016-06-21 09:50:09.000000000","message":"I am softly disagreeing :)\n\nThe unit test is so entangled with the actual code under testing that this becomes a change detector. I\u0027d rather rely on the functional/fullstack/tempest coverage to ensure that dhcp works the way it should. When have we changed the payload of the message being sent to dhcp and not have seen a breakage?","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8740582efe5d21181b3a27540dddb69dd013e42f","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if opname \u003d\u003d \u0027delete\u0027:"},{"line_number":1368,"context_line":"                res \u003d self.api.delete(_get_path(\u0027networks\u0027, id\u003d_uuid()))"},{"line_number":1369,"context_line":"                expected_code \u003d exc.HTTPNoContent.code"},{"line_number":1370,"context_line":"            self.assertTrue(notify.called)"},{"line_number":1371,"context_line":"        self.assertEqual(expected_code, res.status_int)"},{"line_number":1372,"context_line":""},{"line_number":1373,"context_line":"    def test_network_create_registry_notify(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_ea46a479","line":1370,"updated":"2016-06-24 07:29:22.000000000","message":"pretty weak assertion :)","commit_id":"3aebb3e4fff846e985567e6ab97c9d6e89259ede"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"94aaa6def324045ac32035a7026ceda38265192a","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if opname \u003d\u003d \u0027delete\u0027:"},{"line_number":1368,"context_line":"                res \u003d self.api.delete(_get_path(\u0027networks\u0027, id\u003d_uuid()))"},{"line_number":1369,"context_line":"                expected_code \u003d exc.HTTPNoContent.code"},{"line_number":1370,"context_line":"            self.assertTrue(notify.called)"},{"line_number":1371,"context_line":"        self.assertEqual(expected_code, res.status_int)"},{"line_number":1372,"context_line":""},{"line_number":1373,"context_line":"    def test_network_create_registry_notify(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_3dc6349a","line":1370,"in_reply_to":"3aaa91ec_ea46a479","updated":"2016-06-24 07:40:29.000000000","message":"this is a pretty lame test","commit_id":"3aebb3e4fff846e985567e6ab97c9d6e89259ede"}],"neutron/tests/unit/db/test_agentschedulers_db.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7d19205bae9340c147dbe168faae90dd623c8ea3","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"                mock.patch.object(plugin,"},{"line_number":1475,"context_line":"                                  \u0027get_dhcp_agents_hosting_networks\u0027,"},{"line_number":1476,"context_line":"                                  return_value\u003d[]):"},{"line_number":1477,"context_line":"                    return dhcp_notifier_schedule.call_count \u003e 1"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"    def test_reserved_dhcp_port_creation(self):"},{"line_number":1480,"context_line":"        device_id \u003d n_const.DEVICE_ID_RESERVED_DHCP_PORT"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_5d839e04","line":1477,"updated":"2016-06-21 08:56:41.000000000","message":"question: can\u0027t we use dhcp_notifier_schedule.called?","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2cd92722bb2a233ac9c301dd18cf9d1fc0e60467","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"                mock.patch.object(plugin,"},{"line_number":1475,"context_line":"                                  \u0027get_dhcp_agents_hosting_networks\u0027,"},{"line_number":1476,"context_line":"                                  return_value\u003d[]):"},{"line_number":1477,"context_line":"                    return dhcp_notifier_schedule.call_count \u003e 1"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"    def test_reserved_dhcp_port_creation(self):"},{"line_number":1480,"context_line":"        device_id \u003d n_const.DEVICE_ID_RESERVED_DHCP_PORT"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_764f98bd","line":1477,"in_reply_to":"5a9d85d2_5d839e04","updated":"2016-06-21 09:50:09.000000000","message":"with dhcp_notifier_schedule being mocked like this, the mock keeps track of both the notifications due to subnet_create and port_create, and this is supposed to track only the port_create notification.\n\nTo be honest, this isn\u0027t even a unit test, I was almost hesitant to rewrite it altogether.","commit_id":"0004514a2f1f13fef60460d151e83203112333d3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"157ad8fef91bdfc5e2f4d180a9a3a5ae40763499","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"            self.assertIn(expected, self.dhcp_notifier_cast.call_args_list)"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"    def _is_schedule_network_called(self, device_id):"},{"line_number":1467,"context_line":"        dhcp_notifier_schedule \u003d mock.patch("},{"line_number":1468,"context_line":"            \u0027neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api.\u0027"},{"line_number":1469,"context_line":"            \u0027DhcpAgentNotifyAPI._schedule_network\u0027).start()"},{"line_number":1470,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_6a76103f","line":1467,"range":{"start_line":1467,"start_character":38,"end_line":1467,"end_character":43},"updated":"2016-06-24 19:47:55.000000000","message":"Did you intend to change from mock.patch.object() to mock.patch()?","commit_id":"877778ee4c7f0e83b54f54b2d7bafec98f89626c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8ba5939bae247ab2745bb4816c31b3123c1e2308","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"            self.assertIn(expected, self.dhcp_notifier_cast.call_args_list)"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"    def _is_schedule_network_called(self, device_id):"},{"line_number":1467,"context_line":"        dhcp_notifier_schedule \u003d mock.patch("},{"line_number":1468,"context_line":"            \u0027neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api.\u0027"},{"line_number":1469,"context_line":"            \u0027DhcpAgentNotifyAPI._schedule_network\u0027).start()"},{"line_number":1470,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_98fbc178","line":1467,"range":{"start_line":1467,"start_character":38,"end_line":1467,"end_character":43},"in_reply_to":"3aaa91ec_6a76103f","updated":"2016-06-25 17:03:04.000000000","message":"yes","commit_id":"877778ee4c7f0e83b54f54b2d7bafec98f89626c"}]}
