)]}'
{"neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5d1a34d846b02e7a8a3489a72fe4f856c01efb08","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            if \u0027id\u0027 in obj_value:"},{"line_number":149,"context_line":"                self._notification(context, method_name,"},{"line_number":150,"context_line":"                                   {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027]},"},{"line_number":151,"context_line":"                                   network_id)"},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            self._notification(context, method_name, data, network_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2FEH4%3D","line":151,"updated":"2014-03-10 09:17:02.000000000","message":"Thinking performance-wise:\n\nIs it possible to send the full collection to the remote rpc all together, and looping on the agent?","commit_id":"bb2c4ef9a26b12c68ca1e6710d0c92ce00c464cb"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"19d9a8df095988a7979c3ffdd612e9e51b706cfb","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            if \u0027id\u0027 in obj_value:"},{"line_number":149,"context_line":"                self._notification(context, method_name,"},{"line_number":150,"context_line":"                                   {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027]},"},{"line_number":151,"context_line":"                                   network_id)"},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            self._notification(context, method_name, data, network_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2FDeQ%3D","line":151,"in_reply_to":"AAAAVn%2F%2FEH4%3D","updated":"2014-03-10 11:29:57.000000000","message":"I considered this opinion, but I dropped this mind, because of these reasons:\n1. if bulk create networks, maybe each network has different dhcp agent to handle it, but agent-schedule is in server, we must split it.\n2. may be this will break some others dhcp agent (perhaps third part one)","commit_id":"bb2c4ef9a26b12c68ca1e6710d0c92ce00c464cb"}],"neutron/api/v2/base.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7d26acccf9bc7bd77e643b4b9c7e3b8591eecd87","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                         **kwargs)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        def notify(create_result):"},{"line_number":378,"context_line":"            if create_result.keys()[0] is self._collection:"},{"line_number":379,"context_line":"                for body in create_result.values()[0]:"},{"line_number":380,"context_line":"                    body \u003d notify({self._resource: body}).values()[0]"},{"line_number":381,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FeRI%3D","line":378,"updated":"2013-11-05 08:51:00.000000000","message":"consider:\n if self_collection in create_result:","commit_id":"5876f605cc840657a4a5630f77bdad5ceb814442"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7d26acccf9bc7bd77e643b4b9c7e3b8591eecd87","unresolved":false,"context_lines":[{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        def notify(create_result):"},{"line_number":378,"context_line":"            if create_result.keys()[0] is self._collection:"},{"line_number":379,"context_line":"                for body in create_result.values()[0]:"},{"line_number":380,"context_line":"                    body \u003d notify({self._resource: body}).values()[0]"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                notifier_method \u003d self._resource + \u0027.create.end\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FeQ8%3D","line":379,"updated":"2013-11-05 08:51:00.000000000","message":"for body in create_result[self._collection]:","commit_id":"5876f605cc840657a4a5630f77bdad5ceb814442"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7d26acccf9bc7bd77e643b4b9c7e3b8591eecd87","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                    body \u003d notify({self._resource: body}).values()[0]"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                notifier_method \u003d self._resource + \u0027.create.end\u0027"},{"line_number":383,"context_line":"                notifier_api.\\"},{"line_number":384,"context_line":"                    notify(request.context,"},{"line_number":385,"context_line":"                           self._publisher_id,"},{"line_number":386,"context_line":"                           notifier_method,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FeQ0%3D","line":383,"updated":"2013-11-05 08:51:00.000000000","message":"please avoid using \\ for newlines","commit_id":"5876f605cc840657a4a5630f77bdad5ceb814442"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"c0b7816c55f5d2eff630f533b50830810cd4a40d","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                    body \u003d notify({self._resource: body}).values()[0]"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                notifier_method \u003d self._resource + \u0027.create.end\u0027"},{"line_number":383,"context_line":"                notifier_api.\\"},{"line_number":384,"context_line":"                    notify(request.context,"},{"line_number":385,"context_line":"                           self._publisher_id,"},{"line_number":386,"context_line":"                           notifier_method,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FXwg%3D","line":383,"in_reply_to":"AAAATn%2F%2FeQ0%3D","updated":"2013-11-08 02:16:54.000000000","message":"something like for example:\n                notifier_method \u003d self._resource + \u0027.create.end\u0027\n                notify_level \u003d notifier_api.CONF.default_notification_level\n                notifier_api.notify(request.context, self._publisher_id,\n                                    notifier_method, notify_level,\n                                    create_result)\n                self._send_dhcp_notification(request.context,\n                                             create_result,\n                                             notifier_method)","commit_id":"5876f605cc840657a4a5630f77bdad5ceb814442"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4045b74d4e6aefe75df3f0cabce17f7c5ae9fc90","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9Vbk%3D","line":268,"updated":"2013-12-12 15:17:13.000000000","message":"Consider \"if self._collection in data:\" (i.e. without .keys()).  Calling .keys() is unnecessary.","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"63aba7bb139cc02d345e269a72f4de0f35bb495e","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BcYY%3D","line":268,"updated":"2013-11-26 00:25:45.000000000","message":"would the data._collection be plural i.e. ports, whereas the data.keys be port: \n\n(Pdb) p self._collection in data.keys()\nFalse\n(Pdb) p self._collection\n\u0027ports\u0027\n(Pdb) p data.keys()\n[\u0027port\u0027]","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"208bfe52c4c861676515e2eb87d3ffe9a7a47bd3","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BKKE%3D","line":268,"in_reply_to":"AAAATn%2F%2BKsU%3D","updated":"2013-11-30 16:37:47.000000000","message":"Thanks for the clarification","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"211898eb9d314eb5fcd1aba3bfd24365ee65ef82","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BKsU%3D","line":268,"in_reply_to":"AAAATn%2F%2BL6I%3D","updated":"2013-11-30 02:47:55.000000000","message":"In this method, if the key is port, it will call _dhcp_agent_notifier.notify.\nOtherwise, if the key is ports, the body will be split, and then the key will be changed to port. Every element will call _dhcp_agent_notifier.notify","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"28a2daef8eabe72b3185e3b18a7fed1ce6de935f","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BL6I%3D","line":268,"in_reply_to":"AAAATn%2F%2BMxQ%3D","updated":"2013-11-29 14:16:06.000000000","message":"just to clarify, I created resource (port) they are stored in the collection in plural form (ports) the data.keys are singular, which they will not notified? Is that what your intending, that when you create a resource via bulk they will be in their singular form?","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"6255fb0552ac23e0e575e9150e361414a2b1806a","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BMxQ%3D","line":268,"in_reply_to":"AAAATn%2F%2BNjY%3D","updated":"2013-11-29 09:34:42.000000000","message":"If it create via bulk, I will split it to some single resource and call this method again. Of course the key will be changed.","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"f8b9ae3c7e2d342b8b77d16f2b20528573bf9ea9","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BNjY%3D","line":268,"in_reply_to":"AAAATn%2F%2BcHU%3D","updated":"2013-11-29 04:05:15.000000000","message":"So, only the resources create via bulk will be notified?","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"4d2e115459cafdc991351c14ec395e7e362303cc","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2BcHU%3D","line":268,"in_reply_to":"AAAATn%2F%2BcYY%3D","updated":"2013-11-26 02:34:20.000000000","message":"When bulk creating ports (networks, subnets), the data.keys() will be [\u0027ports\u0027]","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"613a3ae27fc47b6393751e32b52c7a4a1362370b","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _send_dhcp_notification(self, context, data, methodname):"},{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9SGc%3D","line":268,"in_reply_to":"AAAATn%2F9Vbk%3D","updated":"2013-12-13 06:12:17.000000000","message":"Done","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4045b74d4e6aefe75df3f0cabce17f7c5ae9fc90","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"},{"line_number":272,"context_line":"                                                 methodname)"},{"line_number":273,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9VVI%3D","line":270,"updated":"2013-12-12 15:17:13.000000000","message":"This recursive call will really just boil down to a call to self._dhcp_agent_notifier.notify (on line 274) with the same arguments.  Why not just call it directly?","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c474f93ea9ded5aef29ea33d629ac16848c23b87","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"},{"line_number":272,"context_line":"                                                 methodname)"},{"line_number":273,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9KHI%3D","line":270,"in_reply_to":"AAAATn%2F9KIs%3D","updated":"2013-12-16 07:22:24.000000000","message":"+1 to notify directly","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"166dba9f8475adaa83a7d1d37499ce920ced8eac","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"},{"line_number":272,"context_line":"                                                 methodname)"},{"line_number":273,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9KIs%3D","line":270,"in_reply_to":"AAAATn%2F9PjE%3D","updated":"2013-12-16 07:11:13.000000000","message":"+1 to Carl\u0027s point","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"309414d103f4e7c7c0207f1a74a984fbe5b77a6a","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"},{"line_number":272,"context_line":"                                                 methodname)"},{"line_number":273,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9PjE%3D","line":270,"in_reply_to":"AAAATn%2F9RwE%3D","updated":"2013-12-13 15:42:42.000000000","message":"Let\u0027s look at what this recursive call does in this case here.\n\nIt checks cfg.CONF.dhcp_agent_notification:  we already did that and know it is True.  It then checks \"if self._collection in data:\":  we already know that will be false.  It then goes to the else clause which is merely a call to self._dhcp_agent_notifier.notify with the same arguments?\n\nDon\u0027t go through all of that, just call notify here.  It isn\u0027t just to save a tiny amount of CPU, it is more readable because it is more direct.","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"613a3ae27fc47b6393751e32b52c7a4a1362370b","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        if cfg.CONF.dhcp_agent_notification:"},{"line_number":268,"context_line":"            if self._collection in data.keys():"},{"line_number":269,"context_line":"                for body in data[self._collection]:"},{"line_number":270,"context_line":"                    self._send_dhcp_notification(context,"},{"line_number":271,"context_line":"                                                 {self._resource: body},"},{"line_number":272,"context_line":"                                                 methodname)"},{"line_number":273,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9RwE%3D","line":270,"in_reply_to":"AAAATn%2F9VVI%3D","updated":"2013-12-13 06:12:17.000000000","message":"Because _dhcp_agent_notifier.notify method only handle single resource.","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"}],"neutron/tests/unit/test_api_v2.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0db9284c6dd4901f2a00fa8b2d53aa21217b681e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api import api_common"},{"line_number":28,"context_line":"from neutron.api.extensions import PluginAwareExtensionManager"},{"line_number":29,"context_line":"from neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api import \\"},{"line_number":30,"context_line":"    DhcpAgentNotifyAPI"},{"line_number":31,"context_line":"from neutron.api.v2 import attributes"},{"line_number":32,"context_line":"from neutron.api.v2 import base as v2_base"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FPLc%3D","line":29,"updated":"2013-11-12 13:51:24.000000000","message":"Two comments here: please do not use \\ and please use module level imports:\n from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"cf12189187db7ad9bbd7b3a27747c36967bfa313","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api import api_common"},{"line_number":28,"context_line":"from neutron.api.extensions import PluginAwareExtensionManager"},{"line_number":29,"context_line":"from neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api import \\"},{"line_number":30,"context_line":"    DhcpAgentNotifyAPI"},{"line_number":31,"context_line":"from neutron.api.v2 import attributes"},{"line_number":32,"context_line":"from neutron.api.v2 import base as v2_base"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOoA%3D","line":29,"in_reply_to":"AAAATn%2F%2FPLc%3D","updated":"2013-11-12 15:35:41.000000000","message":"Done","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"bf57aebc85c8c55af1c3b6c383fb182fe851a73e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api import api_common"},{"line_number":28,"context_line":"from neutron.api.extensions import PluginAwareExtensionManager"},{"line_number":29,"context_line":"from neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api import \\"},{"line_number":30,"context_line":"    DhcpAgentNotifyAPI"},{"line_number":31,"context_line":"from neutron.api.v2 import attributes"},{"line_number":32,"context_line":"from neutron.api.v2 import base as v2_base"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOVQ%3D","line":29,"in_reply_to":"AAAATn%2F%2FPLc%3D","updated":"2013-11-12 16:43:52.000000000","message":"agree with Oleg","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0db9284c6dd4901f2a00fa8b2d53aa21217b681e","unresolved":false,"context_lines":[{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"class DHCPNotificationTest(APIv2TestBase):"},{"line_number":1312,"context_line":"    def _dhcp_notifier(self, opname, resource, initial_input\u003dNone, item_num\u003d1):"},{"line_number":1313,"context_line":"        instance \u003d self.plugin.return_value"},{"line_number":1314,"context_line":"        instance.get_networks.return_value \u003d initial_input"},{"line_number":1315,"context_line":"        instance.get_networks_count.return_value \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FPKA%3D","line":1312,"updated":"2013-11-12 13:51:24.000000000","message":"Seems item_num is redundant as it can be calculated: \n num \u003d len(initial_input[resource]) if isinstance(initial_input[resource], list) else 1\n\nAlso please  consider _test_dhcp_notifier for helper name.","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"cf12189187db7ad9bbd7b3a27747c36967bfa313","unresolved":false,"context_lines":[{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"class DHCPNotificationTest(APIv2TestBase):"},{"line_number":1312,"context_line":"    def _dhcp_notifier(self, opname, resource, initial_input\u003dNone, item_num\u003d1):"},{"line_number":1313,"context_line":"        instance \u003d self.plugin.return_value"},{"line_number":1314,"context_line":"        instance.get_networks.return_value \u003d initial_input"},{"line_number":1315,"context_line":"        instance.get_networks_count.return_value \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOos%3D","line":1312,"in_reply_to":"AAAATn%2F%2FPKA%3D","updated":"2013-11-12 15:35:41.000000000","message":"I will still use a param such as is_bulk because I need to know if the operation is bulk. Is this correct?","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0db9284c6dd4901f2a00fa8b2d53aa21217b681e","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected \u003d []"},{"line_number":1331,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1332,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1333,"context_line":"            index \u003d item_num"},{"line_number":1334,"context_line":"            while index \u003e 0:"},{"line_number":1335,"context_line":"                expected.append(expected_item)"},{"line_number":1336,"context_line":"                index -\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FPHQ%3D","line":1333,"updated":"2013-11-12 13:51:24.000000000","message":"consider:\n expected \u003d [expected_item for x in xrange(item_num)]","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"bf57aebc85c8c55af1c3b6c383fb182fe851a73e","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected \u003d []"},{"line_number":1331,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1332,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1333,"context_line":"            index \u003d item_num"},{"line_number":1334,"context_line":"            while index \u003e 0:"},{"line_number":1335,"context_line":"                expected.append(expected_item)"},{"line_number":1336,"context_line":"                index -\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOT8%3D","line":1333,"in_reply_to":"AAAATn%2F%2FPHQ%3D","updated":"2013-11-12 16:43:52.000000000","message":"Oleg\u0027s approach is much more cleaner and eliminates the use of a parameter, which reduces the possibility of error, though what is the possibility of item_num being pass in as 0?","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"cf12189187db7ad9bbd7b3a27747c36967bfa313","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected \u003d []"},{"line_number":1331,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1332,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1333,"context_line":"            index \u003d item_num"},{"line_number":1334,"context_line":"            while index \u003e 0:"},{"line_number":1335,"context_line":"                expected.append(expected_item)"},{"line_number":1336,"context_line":"                index -\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOnk%3D","line":1333,"in_reply_to":"AAAATn%2F%2FPHQ%3D","updated":"2013-11-12 15:35:41.000000000","message":"great","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0db9284c6dd4901f2a00fa8b2d53aa21217b681e","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"                index -\u003d 1"},{"line_number":1337,"context_line":"            self.assertEqual(expected, dhcpNotifier.call_args_list)"},{"line_number":1338,"context_line":"            self.assertEqual(item_num, dhcpNotifier.call_count)"},{"line_number":1339,"context_line":"        self.assertEqual(res.status_int, expected_code)"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"    def test_network_create_dhcp_notifer(self):"},{"line_number":1342,"context_line":"        input \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FPFc%3D","line":1339,"updated":"2013-11-12 13:51:24.000000000","message":"nit: please put expected as the first parameter for proper assertion failure messages.","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"cf12189187db7ad9bbd7b3a27747c36967bfa313","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"                index -\u003d 1"},{"line_number":1337,"context_line":"            self.assertEqual(expected, dhcpNotifier.call_args_list)"},{"line_number":1338,"context_line":"            self.assertEqual(item_num, dhcpNotifier.call_count)"},{"line_number":1339,"context_line":"        self.assertEqual(res.status_int, expected_code)"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"    def test_network_create_dhcp_notifer(self):"},{"line_number":1342,"context_line":"        input \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FOn8%3D","line":1339,"in_reply_to":"AAAATn%2F%2FPFc%3D","updated":"2013-11-12 15:35:41.000000000","message":"Done","commit_id":"3175e4029575242483555731cf2c4485db561648"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"88b1021f409cd50bb91414ff12e6bc75b250ae50","unresolved":false,"context_lines":[{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"class DHCPNotificationTest(APIv2TestBase):"},{"line_number":1311,"context_line":"    def _test_dhcp_notifier(self, opname, resource, initial_input\u003dNone,"},{"line_number":1312,"context_line":"                            is_bulk\u003dFalse):"},{"line_number":1313,"context_line":"        instance \u003d self.plugin.return_value"},{"line_number":1314,"context_line":"        instance.get_networks.return_value \u003d initial_input"},{"line_number":1315,"context_line":"        instance.get_networks_count.return_value \u003d 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FMAg%3D","line":1312,"updated":"2013-11-13 07:14:02.000000000","message":"still think that bulk operation can be understood from initial_input[resource] being a list as in other cases (not bulk) it is a dict or None. So seems is_bulk is also redundant","commit_id":"08d3c01f8ce2c544bfff21f97c6695596682b7dc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"88b1021f409cd50bb91414ff12e6bc75b250ae50","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"            expected \u003d [expected_item for x in xrange(num)]"},{"line_number":1338,"context_line":"            self.assertEqual(dhcp_notifier.call_args_list, expected)"},{"line_number":1339,"context_line":"            self.assertEqual(dhcp_notifier.call_count, num)"},{"line_number":1340,"context_line":"        self.assertEqual(res.status_int, expected_code)"},{"line_number":1341,"context_line":""},{"line_number":1342,"context_line":"    def test_network_create_dhcp_notifer(self):"},{"line_number":1343,"context_line":"        input \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FMBM%3D","line":1340,"updated":"2013-11-13 07:14:02.000000000","message":"seems you forgot to address the nit comment about putting the expected as the first parameter","commit_id":"08d3c01f8ce2c544bfff21f97c6695596682b7dc"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"e28aa6517e8f912a9696e3c7fb06ac31e20392d3","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"                expected_code \u003d exc.HTTPNoContent.code"},{"line_number":1330,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1331,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1332,"context_line":"            if initial_input and resource not in initial_input.keys():"},{"line_number":1333,"context_line":"                resource +\u003d \u0027s\u0027"},{"line_number":1334,"context_line":"            num \u003d len(initial_input[resource]) if initial_input and isinstance("},{"line_number":1335,"context_line":"                initial_input[resource], list) else 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FK3U%3D","line":1332,"updated":"2013-11-13 12:36:01.000000000","message":"nit: .keys here is not necessary","commit_id":"50d5d79476674b1a5f863ad52b80578348bac171"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"561cb0c1a7bfd48dd437932621e638a2cd1fbe03","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1331,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1332,"context_line":"            if initial_input and resource not in initial_input:"},{"line_number":1333,"context_line":"                resource +\u003d \u0027s\u0027"},{"line_number":1334,"context_line":"            num \u003d len(initial_input[resource]) if initial_input and isinstance("},{"line_number":1335,"context_line":"                initial_input[resource], list) else 1"},{"line_number":1336,"context_line":"            expected \u003d [expected_item for x in xrange(num)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2B7vU%3D","line":1333,"updated":"2013-11-18 12:29:32.000000000","message":"why need this if can pass \u0027resource\u0027 already in plural form where needed?","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"166dba9f8475adaa83a7d1d37499ce920ced8eac","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1331,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1332,"context_line":"            if initial_input and resource not in initial_input:"},{"line_number":1333,"context_line":"                resource +\u003d \u0027s\u0027"},{"line_number":1334,"context_line":"            num \u003d len(initial_input[resource]) if initial_input and isinstance("},{"line_number":1335,"context_line":"                initial_input[resource], list) else 1"},{"line_number":1336,"context_line":"            expected \u003d [expected_item for x in xrange(num)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2B2%2Bs%3D","line":1333,"in_reply_to":"AAAATn%2F%2B4G4%3D","updated":"2013-12-16 07:11:13.000000000","message":"ok, got it, thanks for clarification","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"},{"author":{"_account_id":8282,"name":"Dong Liu","email":"willowd878@gmail.com","username":"liudong"},"change_message_id":"e7269d7f3c5497970351aec704c14ddb4a976660","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"            expected_item \u003d mock.call(mock.ANY, mock.ANY,"},{"line_number":1331,"context_line":"                                      resource + \".\" + opname + \".end\")"},{"line_number":1332,"context_line":"            if initial_input and resource not in initial_input:"},{"line_number":1333,"context_line":"                resource +\u003d \u0027s\u0027"},{"line_number":1334,"context_line":"            num \u003d len(initial_input[resource]) if initial_input and isinstance("},{"line_number":1335,"context_line":"                initial_input[resource], list) else 1"},{"line_number":1336,"context_line":"            expected \u003d [expected_item for x in xrange(num)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2B4G4%3D","line":1333,"in_reply_to":"AAAATn%2F%2B7vU%3D","updated":"2013-11-19 02:52:50.000000000","message":"Hi Oleg, because the notify topic is like \"network.create.end\", but request body key is \"networks\" when bulk creating. So I need to change the resource to networks before get request body value.","commit_id":"0cde1dbe52dfc3c57910cfeafd1a53e9cfaaa4f8"}]}
