)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Schedule networks and routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"3/3 part of blueprint quantum-scheduler"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Iddec3ea9d4c0fe2d51a59f7db47145722fc5a1cd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAM3%2F%2Bvrs%3D","line":9,"updated":"2013-02-20 02:36:31.000000000","message":"i\u0027d probably include a bit more description here.  \n\nalso, worth pointing out that this only adds support for ovs plugin at this point.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Schedule networks and routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"3/3 part of blueprint quantum-scheduler"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Iddec3ea9d4c0fe2d51a59f7db47145722fc5a1cd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAM3%2F%2Bvp0%3D","line":9,"in_reply_to":"AAAAM3%2F%2Bvrs%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"}],"etc/quantum.conf":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":184,"context_line":"# pagination_max_limit, server will just return pagination_max_limit"},{"line_number":185,"context_line":"# of number of items."},{"line_number":186,"context_line":"# pagination_max_limit \u003d -1"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent management extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":189,"context_line":"# Seconds to regard the agent as down."},{"line_number":190,"context_line":"# agent_down_time \u003d 5"}],"source_content_type":"text/plain","patch_set":5,"id":"AAAAM3%2F%2BsxQ%3D","line":187,"updated":"2013-02-21 09:26:32.000000000","message":"Why is this not in an AGENT section?","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":184,"context_line":"# pagination_max_limit, server will just return pagination_max_limit"},{"line_number":185,"context_line":"# of number of items."},{"line_number":186,"context_line":"# pagination_max_limit \u003d -1"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent management extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":189,"context_line":"# Seconds to regard the agent as down."},{"line_number":190,"context_line":"# agent_down_time \u003d 5"}],"source_content_type":"text/plain","patch_set":5,"id":"AAAAM3%2F%2BsXU%3D","line":187,"in_reply_to":"AAAAM3%2F%2BsxQ%3D","updated":"2013-02-21 13:42:57.000000000","message":"It is read by server.","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":190,"context_line":"# agent_down_time \u003d 5"},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  end of items for agent management extension \u003d\u003d\u003d\u003d\u003d"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent management extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"}],"source_content_type":"text/plain","patch_set":5,"id":"AAAAM3%2F%2BtOU%3D","line":193,"updated":"2013-02-21 02:05:07.000000000","message":"i\u0027m confused... is this line the same as the line above? Is it supposed to be different?","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":190,"context_line":"# agent_down_time \u003d 5"},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  end of items for agent management extension \u003d\u003d\u003d\u003d\u003d"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent management extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"}],"source_content_type":"text/plain","patch_set":5,"id":"AAAAM3%2F%2BtJg%3D","line":193,"in_reply_to":"AAAAM3%2F%2BtOU%3D","updated":"2013-02-21 02:40:39.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent scheduler extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"},{"line_number":197,"context_line":"router_scheduler_driver \u003d quantum.scheduler.routerscheduler.SimpleScheduler"},{"line_number":198,"context_line":""}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAM3%2F%2BsWw%3D","line":195,"updated":"2013-02-21 13:50:39.000000000","message":"This is the default value, so we can make this line a comment.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for agent scheduler extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"},{"line_number":197,"context_line":"router_scheduler_driver \u003d quantum.scheduler.routerscheduler.SimpleScheduler"},{"line_number":198,"context_line":""}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAM3%2F%2BsSQ%3D","line":195,"in_reply_to":"AAAAM3%2F%2BsWw%3D","updated":"2013-02-21 14:17:42.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"},{"line_number":197,"context_line":"router_scheduler_driver \u003d quantum.scheduler.routerscheduler.SimpleScheduler"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"# Allow auto scheduling networks to DHCP agent. It will schedule non-hosted"},{"line_number":200,"context_line":"# networks to first DHCP agent which sends get_active_networks message to"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAM3%2F%2BsWs%3D","line":197,"updated":"2013-02-21 13:50:39.000000000","message":"Ditto","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"# Driver to use for scheduling network to DHCP agent"},{"line_number":195,"context_line":"network_scheduler_driver \u003d quantum.scheduler.networkscheduler.SimpleScheduler"},{"line_number":196,"context_line":"# Driver to use for scheduling router to a default L3 agent"},{"line_number":197,"context_line":"router_scheduler_driver \u003d quantum.scheduler.routerscheduler.SimpleScheduler"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"# Allow auto scheduling networks to DHCP agent. It will schedule non-hosted"},{"line_number":200,"context_line":"# networks to first DHCP agent which sends get_active_networks message to"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAM3%2F%2BsSM%3D","line":197,"in_reply_to":"AAAAM3%2F%2BsWs%3D","updated":"2013-02-21 14:17:42.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"}],"etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"257c9cfc6913b86f0ac613c1db5636bf3255f454","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Allow auto scheduling routers to L3 agent. It will schedule non hosted"},{"line_number":16,"context_line":"# routers to first L3 agent which sends sync_routers message to quantum server"},{"line_number":17,"context_line":"# network_auto_schedule \u003d True"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[DATABASE]"},{"line_number":20,"context_line":"# This line MUST be changed to actually run the plugin."}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2B1cg%3D","line":17,"updated":"2013-02-18 06:08:47.000000000","message":"router_auto_schedule?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Allow auto scheduling routers to L3 agent. It will schedule non hosted"},{"line_number":16,"context_line":"# routers to first L3 agent which sends sync_routers message to quantum server"},{"line_number":17,"context_line":"# network_auto_schedule \u003d True"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[DATABASE]"},{"line_number":20,"context_line":"# This line MUST be changed to actually run the plugin."}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2By5k%3D","line":17,"in_reply_to":"AAAAM3%2F%2B1cg%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"}],"quantum/agent/dhcp_agent.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":689,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":690,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":691,"context_line":"        self.needs_resync \u003d True"},{"line_number":692,"context_line":"        LOG.debug(_(\"agent_updated by server side %s!\", payload))"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    def after_start(self):"},{"line_number":695,"context_line":"        LOG.info(_(\"DHCP agent started\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5k%3D","line":692,"updated":"2013-02-21 18:13:55.000000000","message":"Maybe consider this as an info message.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":689,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":690,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":691,"context_line":"        self.needs_resync \u003d True"},{"line_number":692,"context_line":"        LOG.debug(_(\"agent_updated by server side %s!\", payload))"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    def after_start(self):"},{"line_number":695,"context_line":"        LOG.info(_(\"DHCP agent started\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqzI%3D","line":692,"in_reply_to":"AAAAM3%2F%2Br5k%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":688,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":689,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":690,"context_line":"        self.needs_resync \u003d True"},{"line_number":691,"context_line":"        LOG.info(_(\"agent_updated by server side %s!\", payload))"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    def after_start(self):"},{"line_number":694,"context_line":"        LOG.info(_(\"DHCP agent started\"))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoTo%3D","line":691,"updated":"2013-02-25 15:46:05.000000000","message":"This should be \u0027LOG.info(_(\"agent_updated by server side %s!\"), payload)\u0027","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":688,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":689,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":690,"context_line":"        self.needs_resync \u003d True"},{"line_number":691,"context_line":"        LOG.info(_(\"agent_updated by server side %s!\", payload))"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    def after_start(self):"},{"line_number":694,"context_line":"        LOG.info(_(\"DHCP agent started\"))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5k%3D","line":691,"in_reply_to":"AAAAM3%2F%2BoTo%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"}],"quantum/agent/l3_agent.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _router_added(self, router_id, router):"},{"line_number":225,"context_line":"        ri \u003d RouterInfo(router_id, self.conf.root_helper,"},{"line_number":226,"context_line":"                        self.conf.use_namespaces, router)"},{"line_number":227,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":228,"context_line":"        if self.conf.use_namespaces:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2ByRA%3D","line":225,"updated":"2013-02-20 02:46:44.000000000","message":"self.root_helper needs to be used. self.root_helper stores the return value from config.get_root_helper(self.conf) in __init__().","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _router_added(self, router_id, router):"},{"line_number":225,"context_line":"        ri \u003d RouterInfo(router_id, self.conf.root_helper,"},{"line_number":226,"context_line":"                        self.conf.use_namespaces, router)"},{"line_number":227,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":228,"context_line":"        if self.conf.use_namespaces:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bva4%3D","line":225,"in_reply_to":"AAAAM3%2F%2Bvdk%3D","updated":"2013-02-20 05:35:22.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _router_added(self, router_id, router):"},{"line_number":225,"context_line":"        ri \u003d RouterInfo(router_id, self.conf.root_helper,"},{"line_number":226,"context_line":"                        self.conf.use_namespaces, router)"},{"line_number":227,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":228,"context_line":"        if self.conf.use_namespaces:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvdk%3D","line":225,"in_reply_to":"AAAAM3%2F%2BvqE%3D","updated":"2013-02-20 05:05:32.000000000","message":"I confirmed there is no bug in the latest code. Thanks.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _router_added(self, router_id, router):"},{"line_number":225,"context_line":"        ri \u003d RouterInfo(router_id, self.conf.root_helper,"},{"line_number":226,"context_line":"                        self.conf.use_namespaces, router)"},{"line_number":227,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":228,"context_line":"        if self.conf.use_namespaces:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvqE%3D","line":225,"in_reply_to":"AAAAM3%2F%2ByRA%3D","updated":"2013-02-20 03:10:59.000000000","message":"I didn\u0027t touch this line, I think my base is an old one, so we have this problem.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def router_added_to_agent(self, context, payload):"},{"line_number":571,"context_line":"        self.routers_updated(context, payload)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _process_routers(self, routers, allRouters\u003dFalse):"},{"line_number":574,"context_line":"        if (self.conf.external_network_bridge and"},{"line_number":575,"context_line":"            not ip_lib.device_exists(self.conf.external_network_bridge)):"},{"line_number":576,"context_line":"            LOG.error(_(\"The external network bridge \u0027%s\u0027 does not exist\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B1Fo%3D","line":573,"updated":"2013-02-20 02:46:44.000000000","message":"allRouters -\u003e all_routers\nQuantum does not use camel case naming.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def router_added_to_agent(self, context, payload):"},{"line_number":571,"context_line":"        self.routers_updated(context, payload)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _process_routers(self, routers, allRouters\u003dFalse):"},{"line_number":574,"context_line":"        if (self.conf.external_network_bridge and"},{"line_number":575,"context_line":"            not ip_lib.device_exists(self.conf.external_network_bridge)):"},{"line_number":576,"context_line":"            LOG.error(_(\"The external network bridge \u0027%s\u0027 does not exist\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bw3Y%3D","line":573,"updated":"2013-02-19 21:09:13.000000000","message":"at this point in the review I\u0027m not seeing where _process_routers() is called with allRouters\u003dTrue.  Is there a call I\u0027m missing?  \n\nA comment in the code here would be useful to make this part easier to understand.  What are the two cases where allRouters needs to be true or false?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def router_added_to_agent(self, context, payload):"},{"line_number":571,"context_line":"        self.routers_updated(context, payload)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _process_routers(self, routers, allRouters\u003dFalse):"},{"line_number":574,"context_line":"        if (self.conf.external_network_bridge and"},{"line_number":575,"context_line":"            not ip_lib.device_exists(self.conf.external_network_bridge)):"},{"line_number":576,"context_line":"            LOG.error(_(\"The external network bridge \u0027%s\u0027 does not exist\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvqA%3D","line":573,"in_reply_to":"AAAAM3%2F%2B1Fo%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def router_added_to_agent(self, context, payload):"},{"line_number":571,"context_line":"        self.routers_updated(context, payload)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _process_routers(self, routers, allRouters\u003dFalse):"},{"line_number":574,"context_line":"        if (self.conf.external_network_bridge and"},{"line_number":575,"context_line":"            not ip_lib.device_exists(self.conf.external_network_bridge)):"},{"line_number":576,"context_line":"            LOG.error(_(\"The external network bridge \u0027%s\u0027 does not exist\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bv2o%3D","line":573,"in_reply_to":"AAAAM3%2F%2Bw3Y%3D","updated":"2013-02-20 01:04:28.000000000","message":"seems a mistake when I split codes","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":586,"context_line":"            return"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsvI%3D","line":589,"updated":"2013-02-21 09:26:32.000000000","message":"the comment does not really make sense","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":586,"context_line":"            return"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsWA%3D","line":589,"in_reply_to":"AAAAM3%2F%2BsvI%3D","updated":"2013-02-21 13:42:57.000000000","message":"can u help rephrase it to make sense?","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":586,"context_line":"            return"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5g%3D","line":589,"updated":"2013-02-21 18:13:55.000000000","message":"all routers \u003d\u003e all the routers","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":586,"context_line":"            return"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqzE%3D","line":589,"in_reply_to":"AAAAM3%2F%2Br5g%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"},{"line_number":593,"context_line":"        # from sub set of incoming routers and ones we have now."},{"line_number":594,"context_line":"        if all_routers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5c%3D","line":591,"updated":"2013-02-21 18:13:55.000000000","message":"can delete \"from all we have now\".","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":588,"context_line":"        target_ex_net_id \u003d self._fetch_external_net_id()"},{"line_number":589,"context_line":"        # if routers are all routers we have (They are from router sync on"},{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed from all we have now."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"},{"line_number":593,"context_line":"        # from sub set of incoming routers and ones we have now."},{"line_number":594,"context_line":"        if all_routers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqzA%3D","line":591,"in_reply_to":"AAAAM3%2F%2Br5c%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":729,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":730,"context_line":"        self.fullsync \u003d True"},{"line_number":731,"context_line":"        LOG.debug(_(\"agent_updated by server side %s!\", payload))"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5Y%3D","line":731,"updated":"2013-02-21 18:13:55.000000000","message":"also here consider a info message","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":729,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":730,"context_line":"        self.fullsync \u003d True"},{"line_number":731,"context_line":"        LOG.debug(_(\"agent_updated by server side %s!\", payload))"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqy8%3D","line":731,"in_reply_to":"AAAAM3%2F%2Br5Y%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"},{"line_number":593,"context_line":"        # from sub set of incoming routers and ones we have now."},{"line_number":594,"context_line":"        if all_routers:"},{"line_number":595,"context_line":"            prev_router_ids \u003d set(self.router_info)"},{"line_number":596,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bovs%3D","line":593,"updated":"2013-02-24 08:13:13.000000000","message":"sub set \u003d\u003e subset","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":590,"context_line":"        # starting or when error occurs during running), we seek the"},{"line_number":591,"context_line":"        # routers which should be removed."},{"line_number":592,"context_line":"        # If routers are from server side notification, we seek them"},{"line_number":593,"context_line":"        # from sub set of incoming routers and ones we have now."},{"line_number":594,"context_line":"        if all_routers:"},{"line_number":595,"context_line":"            prev_router_ids \u003d set(self.router_info)"},{"line_number":596,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosY%3D","line":593,"in_reply_to":"AAAAM3%2F%2Bovs%3D","updated":"2013-02-24 13:28:20.000000000","message":"Done","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":729,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":730,"context_line":"        self.fullsync \u003d True"},{"line_number":731,"context_line":"        LOG.info(_(\"agent_updated by server side %s!\", payload))"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoTk%3D","line":731,"updated":"2013-02-25 15:46:05.000000000","message":"This should be \u0027LOG.info(_(\"agent_updated by server side %s!\"), payload)\u0027","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def agent_updated(self, context, payload):"},{"line_number":729,"context_line":"        \"\"\"Handle the agent_updated notification event.\"\"\""},{"line_number":730,"context_line":"        self.fullsync \u003d True"},{"line_number":731,"context_line":"        LOG.info(_(\"agent_updated by server side %s!\", payload))"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5g%3D","line":731,"in_reply_to":"AAAAM3%2F%2BoTk%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"}],"quantum/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"            topic\u003dtopic, default_version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _getDhcpAgents(self, context, network_id):"},{"line_number":46,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":47,"context_line":"        dhcp_agents \u003d plugin.getDhcpAgentsHostingNetworks("},{"line_number":48,"context_line":"            context, [network_id], active\u003dTrue)"},{"line_number":49,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsuM%3D","line":46,"updated":"2013-02-21 09:26:32.000000000","message":"any reason not to do the line above in the init?","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _notification(self, context, method, payload, network_id):"},{"line_number":60,"context_line":"        \"\"\"Notify all the agents that are hosting the network\"\"\""},{"line_number":61,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":62,"context_line":"        if (constants.AGENT_SCHEDULER_EXT_ALIAS in getattr("},{"line_number":63,"context_line":"            plugin, \"supported_extension_aliases\", []) and"},{"line_number":64,"context_line":"            method !\u003d \u0027network_delete_end\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsuI%3D","line":61,"updated":"2013-02-21 09:26:32.000000000","message":"ditto","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"            topic\u003dtopic, default_version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_dhcp_agents(self, context, network_id):"},{"line_number":47,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":48,"context_line":"        dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":49,"context_line":"            context, [network_id], active\u003dTrue)"},{"line_number":50,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5U%3D","line":47,"updated":"2013-02-21 18:13:55.000000000","message":"why not have self.plugin which is initialized in the init?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"            topic\u003dtopic, default_version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_dhcp_agents(self, context, network_id):"},{"line_number":47,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":48,"context_line":"        dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":49,"context_line":"            context, [network_id], active\u003dTrue)"},{"line_number":50,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqvE%3D","line":47,"in_reply_to":"AAAAM3%2F%2Bqy4%3D","updated":"2013-02-22 04:55:09.000000000","message":"we cannot put it in __init__ because plugin will initialized one such object, which will lead to recursion.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"            topic\u003dtopic, default_version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_dhcp_agents(self, context, network_id):"},{"line_number":47,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":48,"context_line":"        dhcp_agents \u003d plugin.get_dhcp_agents_hosting_networks("},{"line_number":49,"context_line":"            context, [network_id], active\u003dTrue)"},{"line_number":50,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqy4%3D","line":47,"in_reply_to":"AAAAM3%2F%2Br5U%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"},{"line_number":51,"context_line":"                dhcp_agent in dhcp_agents]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _notification_host(self, context, method, payload, host):"},{"line_number":54,"context_line":"        \"\"\"Notify the agent\"\"\""},{"line_number":55,"context_line":"        self.cast("},{"line_number":56,"context_line":"            context, self.make_msg(method,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br5A%3D","line":53,"updated":"2013-02-21 18:13:55.000000000","message":"the name and the comment of this method are confusing","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return [(dhcp_agent.host, dhcp_agent.topic) for"},{"line_number":51,"context_line":"                dhcp_agent in dhcp_agents]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _notification_host(self, context, method, payload, host):"},{"line_number":54,"context_line":"        \"\"\"Notify the agent\"\"\""},{"line_number":55,"context_line":"        self.cast("},{"line_number":56,"context_line":"            context, self.make_msg(method,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqy0%3D","line":53,"in_reply_to":"AAAAM3%2F%2Br5A%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _notification(self, context, method, payload, network_id):"},{"line_number":61,"context_line":"        \"\"\"Notify all the agents that are hosting the network\"\"\""},{"line_number":62,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":63,"context_line":"        if (utils.is_ext_supported("},{"line_number":64,"context_line":"                plugin, constants.AGENT_SCHEDULER_EXT_ALIAS) and"},{"line_number":65,"context_line":"            method !\u003d \u0027network_delete_end\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br40%3D","line":62,"updated":"2013-02-21 18:13:55.000000000","message":"same here with plugin","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _notification(self, context, method, payload, network_id):"},{"line_number":61,"context_line":"        \"\"\"Notify all the agents that are hosting the network\"\"\""},{"line_number":62,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":63,"context_line":"        if (utils.is_ext_supported("},{"line_number":64,"context_line":"                plugin, constants.AGENT_SCHEDULER_EXT_ALIAS) and"},{"line_number":65,"context_line":"            method !\u003d \u0027network_delete_end\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqyw%3D","line":62,"in_reply_to":"AAAAM3%2F%2Br40%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":63,"context_line":"        if (utils.is_ext_supported("},{"line_number":64,"context_line":"                plugin, constants.AGENT_SCHEDULER_EXT_ALIAS) and"},{"line_number":65,"context_line":"            method !\u003d \u0027network_delete_end\u0027):"},{"line_number":66,"context_line":"            for (host, topic) in self._get_dhcp_agents(context, network_id):"},{"line_number":67,"context_line":"                self.cast("},{"line_number":68,"context_line":"                    context, self.make_msg(method,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br4o%3D","line":65,"updated":"2013-02-21 18:13:55.000000000","message":"maybe swap the order here. it may be more efficient","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":63,"context_line":"        if (utils.is_ext_supported("},{"line_number":64,"context_line":"                plugin, constants.AGENT_SCHEDULER_EXT_ALIAS) and"},{"line_number":65,"context_line":"            method !\u003d \u0027network_delete_end\u0027):"},{"line_number":66,"context_line":"            for (host, topic) in self._get_dhcp_agents(context, network_id):"},{"line_number":67,"context_line":"                self.cast("},{"line_number":68,"context_line":"                    context, self.make_msg(method,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqys%3D","line":65,"in_reply_to":"AAAAM3%2F%2Br4o%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                   {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027]})"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self._notification(context, methodname, data)"},{"line_number":71,"context_line":"# Copyright (c) 2013 OpenStack, LLC."},{"line_number":72,"context_line":"#"},{"line_number":73,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":74,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bovo%3D","line":71,"updated":"2013-02-24 08:13:13.000000000","message":"ooops! - line 71-96 should not be here","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                   {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027]})"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self._notification(context, methodname, data)"},{"line_number":71,"context_line":"# Copyright (c) 2013 OpenStack, LLC."},{"line_number":72,"context_line":"#"},{"line_number":73,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":74,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosU%3D","line":71,"in_reply_to":"AAAAM3%2F%2Bovo%3D","updated":"2013-02-24 13:28:20.000000000","message":"Done","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":94,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class DhcpAgentNotifyAPI(proxy.RpcProxy):"},{"line_number":98,"context_line":"    \"\"\"API for plugin to notify DHCP agent.\"\"\""},{"line_number":99,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":100,"context_line":"    # It seems dhcp agent does not support bulk operation"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BoxU%3D","line":97,"updated":"2013-02-24 05:52:14.000000000","message":"I guess this is rebase error. You forget remove line 0 - 70","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":94,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class DhcpAgentNotifyAPI(proxy.RpcProxy):"},{"line_number":98,"context_line":"    \"\"\"API for plugin to notify DHCP agent.\"\"\""},{"line_number":99,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":100,"context_line":"    # It seems dhcp agent does not support bulk operation"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosQ%3D","line":97,"in_reply_to":"AAAAM3%2F%2BoxU%3D","updated":"2013-02-24 13:28:20.000000000","message":"Done","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                host)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def notify(self, context, data, methodname):"},{"line_number":97,"context_line":"        # data is {\u0027key\u0027 : \u0027value\u0027} with only one key"},{"line_number":98,"context_line":"        if methodname not in self.VALID_METHOD_NAMES:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        obj_type \u003d data.keys()[0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoS0%3D","line":97,"updated":"2013-02-25 12:29:17.000000000","message":"It would be better to describe the format of data:\n\n{\u0027obj_type\u0027: {\u0027id\u0027: network_id}} for network\n\n{\u0027obj_type\u0027: {\u0027network_id\u0027: network_id, \u0027id\u0027: subnet_id/port_id}} for subnet and port","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                host)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def notify(self, context, data, methodname):"},{"line_number":97,"context_line":"        # data is {\u0027key\u0027 : \u0027value\u0027} with only one key"},{"line_number":98,"context_line":"        if methodname not in self.VALID_METHOD_NAMES:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        obj_type \u003d data.keys()[0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BmvQ%3D","line":97,"in_reply_to":"AAAAM3%2F%2Bm5U%3D","updated":"2013-02-26 01:11:05.000000000","message":"I do not want to describe the full spec of the format. \nWhat I suggest is to describe the minimum required fields in \u0027data\u0027. I just noticed I trace the code to identify the format whenever I reviewed the code, and think it will help reviewers to understand the code. either is ok whether it would be written or not.","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                host)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def notify(self, context, data, methodname):"},{"line_number":97,"context_line":"        # data is {\u0027key\u0027 : \u0027value\u0027} with only one key"},{"line_number":98,"context_line":"        if methodname not in self.VALID_METHOD_NAMES:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        obj_type \u003d data.keys()[0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5U%3D","line":97,"in_reply_to":"AAAAM3%2F%2BoS0%3D","updated":"2013-02-26 00:30:07.000000000","message":"it is more complex than this\n{\u0027network\u0027 : network or {\u0027id\u0027: nework_id}}\n{\u0027port\u0027 : port or {\u0027id\u0027: port_id}\n{\u0027subnet\u0027:xx}\nit depends on methodname","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"}],"quantum/api/rpc/agentnotifiers/l3_rpc_agent_api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsvA%3D","line":1,"updated":"2013-02-21 09:26:32.000000000","message":"2013","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"        Notify dhcp agent to get right subnet\u0027s gateway ips."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":55,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":56,"context_line":"        router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":57,"context_line":"        l3_agents \u003d plugin.getL3AgentsHostingRouters("},{"line_number":58,"context_line":"            adminContext, router_ids, active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Bsrg%3D","line":55,"updated":"2013-02-21 09:26:32.000000000","message":"can this be done on init","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br4c%3D","line":1,"updated":"2013-02-21 18:13:55.000000000","message":"2013","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqyc%3D","line":1,"in_reply_to":"AAAAM3%2F%2Br4c%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":"        Notify dhcp agent to get right subnet\u0027s gateway ips."},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":54,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":55,"context_line":"        for router in routers:"},{"line_number":56,"context_line":"            l3_agents \u003d plugin.get_l3_agents_hosting_routers("},{"line_number":57,"context_line":"                adminContext, [router[\u0027id\u0027]], active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br4U%3D","line":54,"updated":"2013-02-21 18:13:55.000000000","message":"same applies here with the plugin - why not use self.plugin","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":"        Notify dhcp agent to get right subnet\u0027s gateway ips."},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":54,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":55,"context_line":"        for router in routers:"},{"line_number":56,"context_line":"            l3_agents \u003d plugin.get_l3_agents_hosting_routers("},{"line_number":57,"context_line":"                adminContext, [router[\u0027id\u0027]], active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqyg%3D","line":54,"in_reply_to":"AAAAM3%2F%2Br4U%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self._notification_host(context, \u0027router_added_to_agent\u0027,"},{"line_number":116,"context_line":"                                routers, host)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"L3AgentNotify \u003d L3AgentNotifyAPI()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br34%3D","line":118,"updated":"2013-02-21 18:13:55.000000000","message":"why do we need the global here?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self._notification_host(context, \u0027router_added_to_agent\u0027,"},{"line_number":116,"context_line":"                                routers, host)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"L3AgentNotify \u003d L3AgentNotifyAPI()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqyk%3D","line":118,"in_reply_to":"AAAAM3%2F%2Br34%3D","updated":"2013-02-22 04:29:19.000000000","message":"we can do it in a new patch.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                self.cast("},{"line_number":67,"context_line":"                    context, self.make_msg(method,"},{"line_number":68,"context_line":"                                           routers\u003d[router]),"},{"line_number":69,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _notification(self, context, method, routers, operation, data):"},{"line_number":72,"context_line":"        \"\"\"Notify all the agents that are hosting the routers\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoRc%3D","line":69,"updated":"2013-02-25 15:46:05.000000000","message":"How about share code line 61-69 with function  \u0027_notification_host\u0027?","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"                self.cast("},{"line_number":67,"context_line":"                    context, self.make_msg(method,"},{"line_number":68,"context_line":"                                           routers\u003d[router]),"},{"line_number":69,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _notification(self, context, method, routers, operation, data):"},{"line_number":72,"context_line":"        \"\"\"Notify all the agents that are hosting the routers\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5M%3D","line":69,"in_reply_to":"AAAAM3%2F%2BoRc%3D","updated":"2013-02-26 00:30:07.000000000","message":"There are some differences between parameters","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _notification_fanout(self, context, method, router_id):"},{"line_number":88,"context_line":"        \"\"\"Fanout the deleted router to all L3 agents\"\"\""},{"line_number":89,"context_line":"        LOG.debug(_(\u0027Fanout nofity agent at %(topic)s the message \u0027"},{"line_number":90,"context_line":"                    \u0027%(method)s on router %(router_id)s\u0027),"},{"line_number":91,"context_line":"                  {\u0027topic\u0027: topics.DHCP_AGENT,"},{"line_number":92,"context_line":"                   \u0027method\u0027: method,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoRk%3D","line":89,"updated":"2013-02-25 15:46:05.000000000","message":"s/nofity/notify","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _notification_fanout(self, context, method, router_id):"},{"line_number":88,"context_line":"        \"\"\"Fanout the deleted router to all L3 agents\"\"\""},{"line_number":89,"context_line":"        LOG.debug(_(\u0027Fanout nofity agent at %(topic)s the message \u0027"},{"line_number":90,"context_line":"                    \u0027%(method)s on router %(router_id)s\u0027),"},{"line_number":91,"context_line":"                  {\u0027topic\u0027: topics.DHCP_AGENT,"},{"line_number":92,"context_line":"                   \u0027method\u0027: method,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5Q%3D","line":89,"in_reply_to":"AAAAM3%2F%2BoRk%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"}],"quantum/common/constants.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"SORT_DIRECTION_ASC \u003d \u0027asc\u0027"},{"line_number":67,"context_line":"SORT_DIRECTION_DESC \u003d \u0027desc\u0027"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027agent_scheduler\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtMo%3D","line":69,"updated":"2013-02-21 02:05:07.000000000","message":"nit: i\u0027d probably put this in the extension file itself.","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"SORT_DIRECTION_ASC \u003d \u0027asc\u0027"},{"line_number":67,"context_line":"SORT_DIRECTION_DESC \u003d \u0027desc\u0027"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027agent_scheduler\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtJc%3D","line":69,"in_reply_to":"AAAAM3%2F%2BtMo%3D","updated":"2013-02-21 02:40:39.000000000","message":"It will introduce dependency problem.","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"}],"quantum/common/utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"    return [str2dict(a) for a in added], [str2dict(r) for r in removed]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def is_ext_supported(plugin, ext_alias):"},{"line_number":189,"context_line":"    return ext_alias in getattr("},{"line_number":190,"context_line":"        plugin, \"supported_extension_aliases\", [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br3k%3D","line":188,"updated":"2013-02-21 18:13:55.000000000","message":"why not use extension?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"    return [str2dict(a) for a in added], [str2dict(r) for r in removed]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def is_ext_supported(plugin, ext_alias):"},{"line_number":189,"context_line":"    return ext_alias in getattr("},{"line_number":190,"context_line":"        plugin, \"supported_extension_aliases\", [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyY%3D","line":188,"in_reply_to":"AAAAM3%2F%2Br3k%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"}],"quantum/db/agents_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":77,"context_line":"        except Exception:"},{"line_number":78,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":79,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":80,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":81,"context_line":"                           \u0027host\u0027: agent_db.host})"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Bsu4%3D","line":78,"updated":"2013-02-21 09:26:32.000000000","message":"Configurations \u003d\u003e Configuration","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":88,"context_line":"        res \u003d dict((k, agent[k]) for k in attr"},{"line_number":89,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":90,"context_line":"        res[\u0027alive\u0027] \u003d not self._is_agent_down(res[\u0027heartbeat_timestamp\u0027])"},{"line_number":91,"context_line":"        res[\u0027configurations\u0027] \u003d self.get_configuration_dict(agent)"},{"line_number":92,"context_line":"        return self._fields(res, fields)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def delete_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Bsu0%3D","line":91,"updated":"2013-02-21 09:26:32.000000000","message":"it would be better to use configuration instead of configurations","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":56,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":57,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":58,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(\u0027agent_type\u0027, \u0027host\u0027,"},{"line_number":59,"context_line":"                                          name\u003d\u0027_agent_type_host_uc\u0027),)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br2Y%3D","line":58,"updated":"2013-02-21 18:13:55.000000000","message":"does the migration take care of this.\ni need to understand what the __table_args__ is (need to do some homework)","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":56,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":57,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":58,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(\u0027agent_type\u0027, \u0027host\u0027,"},{"line_number":59,"context_line":"                                          name\u003d\u0027_agent_type_host_uc\u0027),)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyQ%3D","line":58,"in_reply_to":"AAAAM3%2F%2Br2Y%3D","updated":"2013-02-22 04:29:19.000000000","message":"It seems our migration does not support it.\nI will remove this line for the time being","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        res \u003d dict((k, agent[k]) for k in attr"},{"line_number":91,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":92,"context_line":"        res[\u0027alive\u0027] \u003d not self._is_agent_down(res[\u0027heartbeat_timestamp\u0027])"},{"line_number":93,"context_line":"        res[\u0027configurations\u0027] \u003d self.get_configuration_dict(agent)"},{"line_number":94,"context_line":"        return self._fields(res, fields)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def delete_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br3U%3D","line":93,"updated":"2013-02-21 18:13:55.000000000","message":"consider configuration instead of configurations","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        res \u003d dict((k, agent[k]) for k in attr"},{"line_number":91,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":92,"context_line":"        res[\u0027alive\u0027] \u003d not self._is_agent_down(res[\u0027heartbeat_timestamp\u0027])"},{"line_number":93,"context_line":"        res[\u0027configurations\u0027] \u003d self.get_configuration_dict(agent)"},{"line_number":94,"context_line":"        return self._fields(res, fields)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def delete_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyM%3D","line":93,"in_reply_to":"AAAAM3%2F%2Br3U%3D","updated":"2013-02-22 04:29:19.000000000","message":"It is already in trunk, do we need to change it?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bovk%3D","line":79,"updated":"2013-02-24 08:13:13.000000000","message":"Configurations \u003d\u003e Configuration","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosA%3D","line":79,"in_reply_to":"AAAAM3%2F%2Bovk%3D","updated":"2013-02-24 13:28:20.000000000","message":"it is in trunk already.","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":91,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":92,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":93,"context_line":"        res[\u0027configurations\u0027] \u003d self.get_configuration_dict(agent)"},{"line_number":94,"context_line":"        return self._fields(res, fields)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def delete_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bovg%3D","line":93,"updated":"2013-02-24 08:13:13.000000000","message":"please change configurations to configuration","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":91,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":92,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":93,"context_line":"        res[\u0027configurations\u0027] \u003d self.get_configuration_dict(agent)"},{"line_number":94,"context_line":"        return self._fields(res, fields)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def delete_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bor8%3D","line":93,"in_reply_to":"AAAAM3%2F%2Bovg%3D","updated":"2013-02-24 13:28:20.000000000","message":"it is in trunk already.","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj%2Fw%3D","line":79,"updated":"2013-02-27 09:33:37.000000000","message":"Configurations \u003d\u003e Configuration","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj9c%3D","line":79,"in_reply_to":"AAAAM3%2F%2Bj%2Fw%3D","updated":"2013-02-27 09:42:15.000000000","message":"Done","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"},{"line_number":83,"context_line":"            conf \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj%2Fo%3D","line":80,"updated":"2013-02-27 09:33:37.000000000","message":"are invalid \u003d\u003e is invalid","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"            conf \u003d jsonutils.loads(agent_db.configurations)"},{"line_number":78,"context_line":"        except Exception:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027Configurations for agent %(agent_type)s on host %(host)s\u0027"},{"line_number":80,"context_line":"                    \u0027 are invalid.\u0027)"},{"line_number":81,"context_line":"            LOG.warn(msg, {\u0027agent_type\u0027: agent_db.agent_type,"},{"line_number":82,"context_line":"                           \u0027host\u0027: agent_db.host})"},{"line_number":83,"context_line":"            conf \u003d {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj9Y%3D","line":80,"in_reply_to":"AAAAM3%2F%2Bj%2Fo%3D","updated":"2013-02-27 09:42:15.000000000","message":"Done","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"}],"quantum/db/agentschedulers_db.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":126,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_DHCP_AGENT or"},{"line_number":127,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":128,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":129,"context_line":"            dhcp_agents \u003d self.getDhcpAgentsHostingNetworks("},{"line_number":130,"context_line":"                context, [network_id])"},{"line_number":131,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bwn0%3D","line":128,"updated":"2013-02-19 21:09:13.000000000","message":"seems like this is the wrong error to raise if the agent is simply admin_state_down.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":126,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_DHCP_AGENT or"},{"line_number":127,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":128,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":129,"context_line":"            dhcp_agents \u003d self.getDhcpAgentsHostingNetworks("},{"line_number":130,"context_line":"                context, [network_id])"},{"line_number":131,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvaY%3D","line":128,"in_reply_to":"AAAAM3%2F%2Bv2w%3D","updated":"2013-02-20 05:44:01.000000000","message":"sorry, i should have been more clear.  It is OK to error here, but I was assuming that the error message from the NotDHCPAgent would not be appropriate.  However, reading it again, it says:  \"Component %(id)s is not a valid DHCP Agent\", which is not too bad, as \"inactive\" can be considered invalid.  So you can ignore this comment.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":126,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_DHCP_AGENT or"},{"line_number":127,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":128,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":129,"context_line":"            dhcp_agents \u003d self.getDhcpAgentsHostingNetworks("},{"line_number":130,"context_line":"                context, [network_id])"},{"line_number":131,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvQQ%3D","line":128,"in_reply_to":"AAAAM3%2F%2BvaY%3D","updated":"2013-02-20 08:01:32.000000000","message":"ok","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":126,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_DHCP_AGENT or"},{"line_number":127,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":128,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":129,"context_line":"            dhcp_agents \u003d self.getDhcpAgentsHostingNetworks("},{"line_number":130,"context_line":"                context, [network_id])"},{"line_number":131,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bv2w%3D","line":128,"in_reply_to":"AAAAM3%2F%2Bwn0%3D","updated":"2013-02-20 01:04:28.000000000","message":"My intention is not to add network to disabled dhcp agent or non-dhcp agent","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":145,"context_line":"            try:"},{"line_number":146,"context_line":"                query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":147,"context_line":"                dhcp_agent \u003d query.filter("},{"line_number":148,"context_line":"                    NetworkDhcpAgentBinding.network_id \u003d\u003d network_id,"},{"line_number":149,"context_line":"                    NetworkDhcpAgentBinding.dhcp_agent_id \u003d\u003d id).one()"},{"line_number":150,"context_line":"            except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bwnk%3D","line":147,"updated":"2013-02-19 21:09:13.000000000","message":"this is a binding, not an agent, right?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":145,"context_line":"            try:"},{"line_number":146,"context_line":"                query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":147,"context_line":"                dhcp_agent \u003d query.filter("},{"line_number":148,"context_line":"                    NetworkDhcpAgentBinding.network_id \u003d\u003d network_id,"},{"line_number":149,"context_line":"                    NetworkDhcpAgentBinding.dhcp_agent_id \u003d\u003d id).one()"},{"line_number":150,"context_line":"            except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bv28%3D","line":147,"in_reply_to":"AAAAM3%2F%2Bwnk%3D","updated":"2013-02-20 01:04:28.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":200,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_L3_AGENT or"},{"line_number":201,"context_line":"                not agent_db[\u0027admin_state_up\u0027] or"},{"line_number":202,"context_line":"                not self.get_candidate(router, [agent_db])):"},{"line_number":203,"context_line":"                raise agentscheduler.NotL3Agent(id\u003did)"},{"line_number":204,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":205,"context_line":"            try:"},{"line_number":206,"context_line":"                binding \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BwlM%3D","line":203,"updated":"2013-02-19 21:09:13.000000000","message":"same comment about admin_state_up","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":200,"context_line":"            if (agent_db[\u0027type\u0027] !\u003d constants.AGENT_TYPE_L3_AGENT or"},{"line_number":201,"context_line":"                not agent_db[\u0027admin_state_up\u0027] or"},{"line_number":202,"context_line":"                not self.get_candidate(router, [agent_db])):"},{"line_number":203,"context_line":"                raise agentscheduler.NotL3Agent(id\u003did)"},{"line_number":204,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":205,"context_line":"            try:"},{"line_number":206,"context_line":"                binding \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bv24%3D","line":203,"in_reply_to":"AAAAM3%2F%2BwlM%3D","updated":"2013-02-20 01:04:28.000000000","message":"the same as above","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":526,"context_line":"    def schedule_network(self, context, request_network, created_network):"},{"line_number":527,"context_line":"        if self.network_scheduler:"},{"line_number":528,"context_line":"            self.network_scheduler.schedule(self, context, request_network,"},{"line_number":529,"context_line":"                                            created_network)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvtA%3D","line":529,"updated":"2013-02-20 02:26:41.000000000","message":"this call returns False in several cases where we aren\u0027t able to schedule...for example, because agents weren\u0027t available.   But it seems like this just ignores the return value...  is this logged somewhere?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":526,"context_line":"    def schedule_network(self, context, request_network, created_network):"},{"line_number":527,"context_line":"        if self.network_scheduler:"},{"line_number":528,"context_line":"            self.network_scheduler.schedule(self, context, request_network,"},{"line_number":529,"context_line":"                                            created_network)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvpM%3D","line":529,"in_reply_to":"AAAAM3%2F%2BvtA%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            self.network_scheduler.schedule(self, context, request_network,"},{"line_number":529,"context_line":"                                            created_network)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"},{"line_number":533,"context_line":"            self.network_scheduler.audo_schedule_networks(self, context, host)"},{"line_number":534,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvvc%3D","line":531,"updated":"2013-02-20 02:03:23.000000000","message":"audo\u003d\u003eauto?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":528,"context_line":"            self.network_scheduler.schedule(self, context, request_network,"},{"line_number":529,"context_line":"                                            created_network)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"},{"line_number":533,"context_line":"            self.network_scheduler.audo_schedule_networks(self, context, host)"},{"line_number":534,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvpo%3D","line":531,"in_reply_to":"AAAAM3%2F%2Bvvc%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"},{"line_number":533,"context_line":"            self.network_scheduler.audo_schedule_networks(self, context, host)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def get_l3_agents(self, context, active\u003dNone, filters\u003dNone):"},{"line_number":536,"context_line":"        query \u003d context.session.query(agents_db.Agent)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvvY%3D","line":533,"updated":"2013-02-20 02:03:23.000000000","message":"ditto","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def audo_schedule_networks(self, context, host):"},{"line_number":532,"context_line":"        if self.network_scheduler:"},{"line_number":533,"context_line":"            self.network_scheduler.audo_schedule_networks(self, context, host)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def get_l3_agents(self, context, active\u003dNone, filters\u003dNone):"},{"line_number":536,"context_line":"        query \u003d context.session.query(agents_db.Agent)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvpk%3D","line":533,"in_reply_to":"AAAAM3%2F%2BvvY%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                NetworkDhcpAgentBinding.network_id \u003d\u003d network_ids[0])"},{"line_number":94,"context_line":"        elif network_ids:"},{"line_number":95,"context_line":"            query \u003d query.filter("},{"line_number":96,"context_line":"                NetworkDhcpAgentBinding.network_id in network_ids)"},{"line_number":97,"context_line":"        if active is not None:"},{"line_number":98,"context_line":"            query \u003d (query.filter(agents_db.Agent.admin_state_up \u003d\u003d active))"},{"line_number":99,"context_line":"        return [binding.dhcp_agent for binding in query.all()]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsTQ%3D","line":96,"updated":"2013-02-21 14:45:05.000000000","message":"merge line 91-96 as:\n\nif network_ids:\n    query \u003d query.filter(NetworkDhcpAgentBinding.network_id.in_(network_ids) )","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":93,"context_line":"                NetworkDhcpAgentBinding.network_id \u003d\u003d network_ids[0])"},{"line_number":94,"context_line":"        elif network_ids:"},{"line_number":95,"context_line":"            query \u003d query.filter("},{"line_number":96,"context_line":"                NetworkDhcpAgentBinding.network_id in network_ids)"},{"line_number":97,"context_line":"        if active is not None:"},{"line_number":98,"context_line":"            query \u003d (query.filter(agents_db.Agent.admin_state_up \u003d\u003d active))"},{"line_number":99,"context_line":"        return [binding.dhcp_agent for binding in query.all()]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsMY%3D","line":96,"in_reply_to":"AAAAM3%2F%2BsTQ%3D","updated":"2013-02-21 15:51:30.000000000","message":"It is about performance between \u003d\u003d and in.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":105,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_DHCP or"},{"line_number":106,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":107,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":108,"context_line":"            dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("},{"line_number":109,"context_line":"                context, [network_id])"},{"line_number":110,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsWo%3D","line":107,"updated":"2013-02-21 13:50:39.000000000","message":"It is a little confusing to raise NotDHCPAgent exception when admin_state_up \u003d\u003d False. It is better to define another exception.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":105,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_DHCP or"},{"line_number":106,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":107,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":108,"context_line":"            dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("},{"line_number":109,"context_line":"                context, [network_id])"},{"line_number":110,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsBU%3D","line":107,"in_reply_to":"AAAAM3%2F%2BsSc%3D","updated":"2013-02-21 16:36:12.000000000","message":"That sound better and it is ok to me. Another my idea is ActiveDHCPAgentNotFound. Since the error message is already appropriate, it is ok the name is not very confusing :-)","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":105,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_DHCP or"},{"line_number":106,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":107,"context_line":"                raise agentscheduler.NotDHCPAgent(id\u003did)"},{"line_number":108,"context_line":"            dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("},{"line_number":109,"context_line":"                context, [network_id])"},{"line_number":110,"context_line":"            for dhcp_agent in dhcp_agents:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsSc%3D","line":107,"in_reply_to":"AAAAM3%2F%2BsWo%3D","updated":"2013-02-21 14:17:42.000000000","message":"How about change it into NotValidDHCPAgent?","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        agent \u003d self._get_agent(context, id)"},{"line_number":124,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":125,"context_line":"            try:"},{"line_number":126,"context_line":"                query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":127,"context_line":"                binding \u003d query.filter("},{"line_number":128,"context_line":"                    NetworkDhcpAgentBinding.network_id \u003d\u003d network_id,"},{"line_number":129,"context_line":"                    NetworkDhcpAgentBinding.dhcp_agent_id \u003d\u003d id).one()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsOI%3D","line":126,"updated":"2013-02-21 14:58:01.000000000","message":"We can use query.options(joinedload(\u0027dhcp_agent\u0027)) at here, then we need query agent at line 123, merge two query into one query","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":123,"context_line":"        agent \u003d self._get_agent(context, id)"},{"line_number":124,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":125,"context_line":"            try:"},{"line_number":126,"context_line":"                query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":127,"context_line":"                binding \u003d query.filter("},{"line_number":128,"context_line":"                    NetworkDhcpAgentBinding.network_id \u003d\u003d network_id,"},{"line_number":129,"context_line":"                    NetworkDhcpAgentBinding.dhcp_agent_id \u003d\u003d id).one()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsMQ%3D","line":126,"in_reply_to":"AAAAM3%2F%2BsOI%3D","updated":"2013-02-21 15:51:30.000000000","message":"line 123 has the function to check if the agent exists.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            return {\u0027networks\u0027:"},{"line_number":145,"context_line":"                    self.get_networks(context, filters\u003d{\u0027id\u0027: _ids})}"},{"line_number":146,"context_line":"        else:"},{"line_number":147,"context_line":"            return {}"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def list_active_networks_on_active_dhcp_agent(self, context, host):"},{"line_number":150,"context_line":"        agent \u003d self._get_agent_by_type_and_host("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsVQ%3D","line":147,"updated":"2013-02-21 13:36:47.000000000","message":"when net_ids \u003d\u003d [], it should return {\u0027networks\u0027, []}. Core resource doing like this.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"            return {\u0027networks\u0027:"},{"line_number":145,"context_line":"                    self.get_networks(context, filters\u003d{\u0027id\u0027: _ids})}"},{"line_number":146,"context_line":"        else:"},{"line_number":147,"context_line":"            return {}"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def list_active_networks_on_active_dhcp_agent(self, context, host):"},{"line_number":150,"context_line":"        agent \u003d self._get_agent_by_type_and_host("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsUE%3D","line":147,"in_reply_to":"AAAAM3%2F%2BsVQ%3D","updated":"2013-02-21 13:45:00.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            return self.get_networks("},{"line_number":160,"context_line":"                context, filters\u003d{\u0027id\u0027: _ids, \u0027admin_state_up\u0027: [True]})"},{"line_number":161,"context_line":"        else:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def list_dhcp_agents_hosting_network(self, context, network_id):"},{"line_number":165,"context_line":"        dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsVk%3D","line":162,"updated":"2013-02-21 13:36:47.000000000","message":"when net_ids \u003d\u003d [], it should return {\u0027networks\u0027, []}. Core resource doing like this.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":159,"context_line":"            return self.get_networks("},{"line_number":160,"context_line":"                context, filters\u003d{\u0027id\u0027: _ids, \u0027admin_state_up\u0027: [True]})"},{"line_number":161,"context_line":"        else:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def list_dhcp_agents_hosting_network(self, context, network_id):"},{"line_number":165,"context_line":"        dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsUQ%3D","line":162,"in_reply_to":"AAAAM3%2F%2BsVk%3D","updated":"2013-02-21 13:45:00.000000000","message":"this is not the restful API case","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                \u0027agents\u0027:"},{"line_number":171,"context_line":"                self.get_agents(context, filters\u003d{\u0027id\u0027: agent_ids})}"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            return {}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def add_router_to_l3_agent(self, context, id, router_id):"},{"line_number":176,"context_line":"        \"\"\"Add a l3 agent to host a router."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsV4%3D","line":173,"updated":"2013-02-21 13:36:47.000000000","message":"when agent_ids \u003d\u003d [], it should return {\u0027agents\u0027, []}. Core resource doing like this.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"                \u0027agents\u0027:"},{"line_number":171,"context_line":"                self.get_agents(context, filters\u003d{\u0027id\u0027: agent_ids})}"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            return {}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def add_router_to_l3_agent(self, context, id, router_id):"},{"line_number":176,"context_line":"        \"\"\"Add a l3 agent to host a router."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsUM%3D","line":173,"in_reply_to":"AAAAM3%2F%2BsV4%3D","updated":"2013-02-21 13:45:00.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        lead to re schedule or be added to another agent manually.\"\"\""},{"line_number":212,"context_line":"        agent \u003d self._get_agent(context, id)"},{"line_number":213,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":214,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":215,"context_line":"            query \u003d query.filter("},{"line_number":216,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":217,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsOQ%3D","line":214,"updated":"2013-02-21 14:58:01.000000000","message":"We can use query.options(joinedload(\u0027l3_agent\u0027)) at here, then we need query l3 agent at line 212, merge two query into one query","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":211,"context_line":"        lead to re schedule or be added to another agent manually.\"\"\""},{"line_number":212,"context_line":"        agent \u003d self._get_agent(context, id)"},{"line_number":213,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":214,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":215,"context_line":"            query \u003d query.filter("},{"line_number":216,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":217,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsMM%3D","line":214,"in_reply_to":"AAAAM3%2F%2BsOQ%3D","updated":"2013-02-21 15:51:30.000000000","message":"the same as above","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            return {\u0027routers\u0027:"},{"line_number":235,"context_line":"                    self.get_routers(context, filters\u003d{\u0027id\u0027: _ids})}"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            return []"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def list_active_sync_routers_on_active_l3_agent("},{"line_number":240,"context_line":"            self, context, host, router_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsVA%3D","line":237,"updated":"2013-02-21 13:36:47.000000000","message":"when router_ids \u003d\u003d [], it should return {\u0027routers\u0027, []}. Core resource doing like this.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":234,"context_line":"            return {\u0027routers\u0027:"},{"line_number":235,"context_line":"                    self.get_routers(context, filters\u003d{\u0027id\u0027: _ids})}"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            return []"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def list_active_sync_routers_on_active_l3_agent("},{"line_number":240,"context_line":"            self, context, host, router_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsUI%3D","line":237,"in_reply_to":"AAAAM3%2F%2BsVA%3D","updated":"2013-02-21 13:45:00.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            handle_internal_only_routers \u003d False"},{"line_number":330,"context_line":"            gateway_external_network_id \u003d None"},{"line_number":331,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":332,"context_line":"            for key, value in agent_conf.items():"},{"line_number":333,"context_line":"                if \u0027router_id\u0027 \u003d\u003d key:"},{"line_number":334,"context_line":"                    router_id \u003d value"},{"line_number":335,"context_line":"                elif \u0027use_namespaces\u0027 \u003d\u003d key:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsSk%3D","line":332,"updated":"2013-02-21 14:45:05.000000000","message":"agent_conf was dict\n\nmerge line 325-343 as below:\n\nrouter_id \u003d agent_conf.get(\u0027router_id\u0027, None)\n\nuse_namespaces \u003d True if agent_conf.get(\u0027use_namespace\u0027, False) False\n\nhandle_internal_only_routers \u003d True if agent_conf.get(\u0027handle_internal_only_routers\u0027, False) False\n\ngateway_external_network_id \u003d agent_conf.get(\u0027gateway_external_network_id\u0027, None)","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":329,"context_line":"            handle_internal_only_routers \u003d False"},{"line_number":330,"context_line":"            gateway_external_network_id \u003d None"},{"line_number":331,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":332,"context_line":"            for key, value in agent_conf.items():"},{"line_number":333,"context_line":"                if \u0027router_id\u0027 \u003d\u003d key:"},{"line_number":334,"context_line":"                    router_id \u003d value"},{"line_number":335,"context_line":"                elif \u0027use_namespaces\u0027 \u003d\u003d key:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsMA%3D","line":332,"in_reply_to":"AAAAM3%2F%2BsSk%3D","updated":"2013-02-21 15:51:30.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"            return []"},{"line_number":90,"context_line":"        query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":91,"context_line":"        query \u003d query.options(joinedload(\u0027dhcp_agent\u0027))"},{"line_number":92,"context_line":"        if len(network_ids) \u003d\u003d 1:"},{"line_number":93,"context_line":"            query \u003d query.filter("},{"line_number":94,"context_line":"                NetworkDhcpAgentBinding.network_id \u003d\u003d network_ids[0])"},{"line_number":95,"context_line":"        elif network_ids:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br3Q%3D","line":92,"updated":"2013-02-21 18:13:55.000000000","message":"out of interest why not just do the network_ids?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"            return []"},{"line_number":90,"context_line":"        query \u003d context.session.query(NetworkDhcpAgentBinding)"},{"line_number":91,"context_line":"        query \u003d query.options(joinedload(\u0027dhcp_agent\u0027))"},{"line_number":92,"context_line":"        if len(network_ids) \u003d\u003d 1:"},{"line_number":93,"context_line":"            query \u003d query.filter("},{"line_number":94,"context_line":"                NetworkDhcpAgentBinding.network_id \u003d\u003d network_ids[0])"},{"line_number":95,"context_line":"        elif network_ids:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyI%3D","line":92,"in_reply_to":"AAAAM3%2F%2Br3Q%3D","updated":"2013-02-22 04:29:19.000000000","message":"\u003d\u003d is more efficient than in_","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":105,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":106,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_DHCP or"},{"line_number":107,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":108,"context_line":"                raise agentscheduler.InvalidDHCPAgent(id\u003did)"},{"line_number":109,"context_line":"            dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("},{"line_number":110,"context_line":"                context, [network_id])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br3E%3D","line":107,"updated":"2013-02-21 18:13:55.000000000","message":"i think that you should have a separate exception if the state is not up.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":105,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":106,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_DHCP or"},{"line_number":107,"context_line":"                not agent_db[\u0027admin_state_up\u0027]):"},{"line_number":108,"context_line":"                raise agentscheduler.InvalidDHCPAgent(id\u003did)"},{"line_number":109,"context_line":"            dhcp_agents \u003d self.get_dhcp_agents_hosting_networks("},{"line_number":110,"context_line":"                context, [network_id])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyE%3D","line":107,"in_reply_to":"AAAAM3%2F%2Br3E%3D","updated":"2013-02-22 04:29:19.000000000","message":"I have change the InvalidDHCPAgent\u0027s msg string. there is no cases now we need to separate these two.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":180,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":181,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":182,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_L3 or"},{"line_number":183,"context_line":"                not agent_db[\u0027admin_state_up\u0027] or"},{"line_number":184,"context_line":"                not self.get_candidate(router, [agent_db])):"},{"line_number":185,"context_line":"                raise agentscheduler.InvalidL3Agent(id\u003did)"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br3A%3D","line":183,"updated":"2013-02-21 18:13:55.000000000","message":"please have a sperate exception for the state","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":180,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":181,"context_line":"            agent_db \u003d self._get_agent(context, id)"},{"line_number":182,"context_line":"            if (agent_db[\u0027agent_type\u0027] !\u003d constants.AGENT_TYPE_L3 or"},{"line_number":183,"context_line":"                not agent_db[\u0027admin_state_up\u0027] or"},{"line_number":184,"context_line":"                not self.get_candidate(router, [agent_db])):"},{"line_number":185,"context_line":"                raise agentscheduler.InvalidL3Agent(id\u003did)"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqyA%3D","line":183,"in_reply_to":"AAAAM3%2F%2Br3A%3D","updated":"2013-02-22 04:29:19.000000000","message":"same as above.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"            except exc.NoResultFound:"},{"line_number":195,"context_line":"                pass"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            result \u003d self.auto_schedule_routers(context,"},{"line_number":198,"context_line":"                                                agent_db.host,"},{"line_number":199,"context_line":"                                                router_id)"},{"line_number":200,"context_line":"            if not result:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br28%3D","line":197,"updated":"2013-02-21 18:13:55.000000000","message":"why auto_schedule and not just schedule?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"            except exc.NoResultFound:"},{"line_number":195,"context_line":"                pass"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            result \u003d self.auto_schedule_routers(context,"},{"line_number":198,"context_line":"                                                agent_db.host,"},{"line_number":199,"context_line":"                                                router_id)"},{"line_number":200,"context_line":"            if not result:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqxw%3D","line":197,"in_reply_to":"AAAAM3%2F%2Br28%3D","updated":"2013-02-22 04:29:19.000000000","message":"schedule is to assign a router to any one l3 agent, auto_schedule_routers has the feature to assign a router to a specified l3 agent.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":319,"context_line":"                    query \u003d query.filter(column.in_(value))"},{"line_number":320,"context_line":"        return query.all()"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def get_candidate(self, sync_router, l3_agents):"},{"line_number":323,"context_line":"        \"\"\"Get the valid l3 agents for the router from a list of l3_agents\"\"\""},{"line_number":324,"context_line":"        candidates \u003d []"},{"line_number":325,"context_line":"        for l3_agent in l3_agents:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br20%3D","line":322,"updated":"2013-02-21 18:13:55.000000000","message":"get_candidates","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":319,"context_line":"                    query \u003d query.filter(column.in_(value))"},{"line_number":320,"context_line":"        return query.all()"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def get_candidate(self, sync_router, l3_agents):"},{"line_number":323,"context_line":"        \"\"\"Get the valid l3 agents for the router from a list of l3_agents\"\"\""},{"line_number":324,"context_line":"        candidates \u003d []"},{"line_number":325,"context_line":"        for l3_agent in l3_agents:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqxs%3D","line":322,"in_reply_to":"AAAAM3%2F%2Br20%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            result \u003d self.network_scheduler.schedule("},{"line_number":298,"context_line":"                self, context, request_network, created_network)"},{"line_number":299,"context_line":"            if not result:"},{"line_number":300,"context_line":"                LOG.warn(_(\u0027Fail scheduling network %s\u0027) % created_network)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def auto_schedule_networks(self, context, host):"},{"line_number":303,"context_line":"        if self.network_scheduler:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoTQ%3D","line":300,"updated":"2013-02-25 15:46:05.000000000","message":"LOG.warn(_(\u0027Fail scheduling network %s\u0027), created_network)","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":297,"context_line":"            result \u003d self.network_scheduler.schedule("},{"line_number":298,"context_line":"                self, context, request_network, created_network)"},{"line_number":299,"context_line":"            if not result:"},{"line_number":300,"context_line":"                LOG.warn(_(\u0027Fail scheduling network %s\u0027) % created_network)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def auto_schedule_networks(self, context, host):"},{"line_number":303,"context_line":"        if self.network_scheduler:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5I%3D","line":300,"in_reply_to":"AAAAM3%2F%2BoTQ%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":322,"context_line":"                         l3_agent[\u0027heartbeat_timestamp\u0027])]"},{"line_number":323,"context_line":"        return l3_agents"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def get_candidates(self, sync_router, l3_agents):"},{"line_number":326,"context_line":"        \"\"\"Get the valid l3 agents for the router from a list of l3_agents\"\"\""},{"line_number":327,"context_line":"        candidates \u003d []"},{"line_number":328,"context_line":"        for l3_agent in l3_agents:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAM3%2F%2BjzY%3D","line":325,"updated":"2013-02-27 12:31:51.000000000","message":"get_l3_agent_candidate is better. This method is specific to l3-agent and get_candidates is ambiguous.","commit_id":"9def739e30066761c4f83d4d8bd7743e5ac974e3"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":322,"context_line":"                         l3_agent[\u0027heartbeat_timestamp\u0027])]"},{"line_number":323,"context_line":"        return l3_agents"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def get_candidates(self, sync_router, l3_agents):"},{"line_number":326,"context_line":"        \"\"\"Get the valid l3 agents for the router from a list of l3_agents\"\"\""},{"line_number":327,"context_line":"        candidates \u003d []"},{"line_number":328,"context_line":"        for l3_agent in l3_agents:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAM3%2F%2Bjx8%3D","line":325,"in_reply_to":"AAAAM3%2F%2BjzY%3D","updated":"2013-02-27 12:49:57.000000000","message":"Done","commit_id":"9def739e30066761c4f83d4d8bd7743e5ac974e3"}],"quantum/db/dhcp_rpc_agent_api.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    http://www.apache.org/licenses/LICENSE-2.0"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvxc%3D","line":4,"updated":"2013-02-20 01:44:47.000000000","message":"why is this file in the db directory?  it has nothing to do with accessing the DB.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    http://www.apache.org/licenses/LICENSE-2.0"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvok%3D","line":4,"in_reply_to":"AAAAM3%2F%2Bvxc%3D","updated":"2013-02-20 03:10:59.000000000","message":"we have moved it into quantum.api.rpc.agentnotifiers in previous patch.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"}],"quantum/db/dhcp_rpc_base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":34,"context_line":"        LOG.debug(_(\u0027Network list requested from %s\u0027), host)"},{"line_number":35,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":36,"context_line":"        if (constants.AGENT_SCHEDULER_EXT_ALIAS in getattr("},{"line_number":37,"context_line":"            plugin, \"supported_extension_aliases\", [])):"},{"line_number":38,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":39,"context_line":"                plugin.auto_schedule_networks(context, host)"},{"line_number":40,"context_line":"            nets \u003d plugin.list_active_networks_on_active_dhcp_agent("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsWU%3D","line":37,"updated":"2013-02-21 13:50:39.000000000","message":"This condition is used several times. It would be better to add a helper method such as is_agent_scheduler_supported().","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":34,"context_line":"        LOG.debug(_(\u0027Network list requested from %s\u0027), host)"},{"line_number":35,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":36,"context_line":"        if (constants.AGENT_SCHEDULER_EXT_ALIAS in getattr("},{"line_number":37,"context_line":"            plugin, \"supported_extension_aliases\", [])):"},{"line_number":38,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":39,"context_line":"                plugin.auto_schedule_networks(context, host)"},{"line_number":40,"context_line":"            nets \u003d plugin.list_active_networks_on_active_dhcp_agent("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsQw%3D","line":37,"in_reply_to":"AAAAM3%2F%2BsWU%3D","updated":"2013-02-21 14:52:25.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027Network %(network_id)s requested from \u0027"},{"line_number":52,"context_line":"                    \u0027%(host)s\u0027), locals())"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":54,"context_line":"        network \u003d plugin.get_network(context, network_id)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsWQ%3D","line":52,"updated":"2013-02-21 13:50:39.000000000","message":"locals() is not recommended now.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027Network %(network_id)s requested from \u0027"},{"line_number":52,"context_line":"                    \u0027%(host)s\u0027), locals())"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":54,"context_line":"        network \u003d plugin.get_network(context, network_id)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsQ0%3D","line":52,"in_reply_to":"AAAAM3%2F%2BsWQ%3D","updated":"2013-02-21 14:52:25.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":34,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":35,"context_line":"        LOG.debug(_(\u0027Network list requested from %s\u0027), host)"},{"line_number":36,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":37,"context_line":"        if utils.is_extension_supported("},{"line_number":38,"context_line":"            plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":39,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":40,"context_line":"                plugin.auto_schedule_networks(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Bovc%3D","line":37,"updated":"2013-02-24 08:13:13.000000000","message":"is it possible that this check be done on init and then have a flag instead of calling a function each time","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":34,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":35,"context_line":"        LOG.debug(_(\u0027Network list requested from %s\u0027), host)"},{"line_number":36,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":37,"context_line":"        if utils.is_extension_supported("},{"line_number":38,"context_line":"            plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":39,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":40,"context_line":"                plugin.auto_schedule_networks(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosM%3D","line":37,"in_reply_to":"AAAAM3%2F%2Bovc%3D","updated":"2013-02-24 13:28:20.000000000","message":"__init__ of dhcp notifer cannot access plugin since plugin\u0027s __init__ need to construct the dhcp notifier.","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":51,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":52,"context_line":"        LOG.debug(_(\u0027Network %(network_id)s requested from \u0027"},{"line_number":53,"context_line":"                    \u0027%(host)s\u0027), locals())"},{"line_number":54,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":55,"context_line":"        network \u003d plugin.get_network(context, network_id)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj%2Fg%3D","line":53,"updated":"2013-02-27 09:33:37.000000000","message":"please do not use locals. i understand that this is now forbidden","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":51,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":52,"context_line":"        LOG.debug(_(\u0027Network %(network_id)s requested from \u0027"},{"line_number":53,"context_line":"                    \u0027%(host)s\u0027), locals())"},{"line_number":54,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":55,"context_line":"        network \u003d plugin.get_network(context, network_id)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj9s%3D","line":53,"in_reply_to":"AAAAM3%2F%2Bj%2Fg%3D","updated":"2013-02-27 09:42:15.000000000","message":"Done","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"}],"quantum/db/l3_db.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":148,"context_line":"            adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":149,"context_line":"            self.router_scheduler.schedule(self, adminContext,"},{"line_number":150,"context_line":"                                           router_dict, request_router\u003dr,"},{"line_number":151,"context_line":"                                           verify\u003dFalse)"},{"line_number":152,"context_line":"        return router_dict"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def update_router(self, context, id, router):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bv0Y%3D","line":151,"updated":"2013-02-20 01:44:47.000000000","message":"I don\u0027t think scheduler + rpc specific code should go in this file, especially intermingled with standard DB code.... its intended for DB methods that can be shared by all plugins that implement L3, regardless of whether they use the router scheduler or rpc.   \n\nRemember that the l3-agent is just one way of implementing L3 in Quantum.  We don\u0027t want people shoving plugin specific logic in here.  I think this applies regardless of the plugin (e.g., I wouldn\u0027t want NVP or floodlight specific L3 logic in here either).","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":148,"context_line":"            adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":149,"context_line":"            self.router_scheduler.schedule(self, adminContext,"},{"line_number":150,"context_line":"                                           router_dict, request_router\u003dr,"},{"line_number":151,"context_line":"                                           verify\u003dFalse)"},{"line_number":152,"context_line":"        return router_dict"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def update_router(self, context, id, router):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvMc%3D","line":151,"in_reply_to":"AAAAM3%2F%2Bv0Y%3D","updated":"2013-02-20 10:59:33.000000000","message":"move to plugin","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":819,"context_line":"            return [n for n in nets if n[\u0027id\u0027] in ext_nets]"},{"line_number":820,"context_line":"        else:"},{"line_number":821,"context_line":"            return [n for n in nets if n[\u0027id\u0027] not in ext_nets]"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def _get_sync_routers(self, context, router_ids\u003dNone, active\u003dNone):"},{"line_number":824,"context_line":"        \"\"\"Query routers and their gw ports for l3 agent."},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvzg%3D","line":822,"updated":"2013-02-20 01:44:47.000000000","message":"This same concern about plugin-specific logic goes for the code below.... though at least this code is separated into separate functions.  I\u0027d suggest either moving this code to another file or adding an indicator in the file describing that this code is only relevant to l3-agents.\n\nI don\u0027t think this needs to be fixed by G-3 necessarily, but its concerning to see the code going in this direction.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":819,"context_line":"            return [n for n in nets if n[\u0027id\u0027] in ext_nets]"},{"line_number":820,"context_line":"        else:"},{"line_number":821,"context_line":"            return [n for n in nets if n[\u0027id\u0027] not in ext_nets]"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def _get_sync_routers(self, context, router_ids\u003dNone, active\u003dNone):"},{"line_number":824,"context_line":"        \"\"\"Query routers and their gw ports for l3 agent."},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BtO0%3D","line":822,"in_reply_to":"AAAAM3%2F%2BvKk%3D","updated":"2013-02-21 01:33:49.000000000","message":"The logic below is specific to plugins that use the l3-agent isn\u0027t it?  \n\nI was thinking about this some more and one approach would simply to create a new based class for agent-based L3 implementations.  I don\u0027t think we have to do that here, but it would be a good thing to do as part of the refactor of moving l3 out of the plugins.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":819,"context_line":"            return [n for n in nets if n[\u0027id\u0027] in ext_nets]"},{"line_number":820,"context_line":"        else:"},{"line_number":821,"context_line":"            return [n for n in nets if n[\u0027id\u0027] not in ext_nets]"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def _get_sync_routers(self, context, router_ids\u003dNone, active\u003dNone):"},{"line_number":824,"context_line":"        \"\"\"Query routers and their gw ports for l3 agent."},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvKk%3D","line":822,"in_reply_to":"AAAAM3%2F%2Bvzg%3D","updated":"2013-02-20 10:59:33.000000000","message":"got it. but the following change is not too plugin specific.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":659,"context_line":"        if router_id:"},{"line_number":660,"context_line":"            routers \u003d self.get_sync_data(context.elevated(), [router_id])"},{"line_number":661,"context_line":"            l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers,"},{"line_number":662,"context_line":"                                                           \u0027update_floatingip\u0027)"},{"line_number":663,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    def update_floatingip(self, context, id, floatingip):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtMI%3D","line":662,"updated":"2013-02-21 02:05:07.000000000","message":"shouldn\u0027t this be create_floatingip?","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":659,"context_line":"        if router_id:"},{"line_number":660,"context_line":"            routers \u003d self.get_sync_data(context.elevated(), [router_id])"},{"line_number":661,"context_line":"            l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers,"},{"line_number":662,"context_line":"                                                           \u0027update_floatingip\u0027)"},{"line_number":663,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    def update_floatingip(self, context, id, floatingip):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtJY%3D","line":662,"in_reply_to":"AAAAM3%2F%2BtMI%3D","updated":"2013-02-21 02:40:39.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":843,"context_line":"        \"\"\""},{"line_number":844,"context_line":"        router_query \u003d context.session.query(Router)"},{"line_number":845,"context_line":"        if router_ids:"},{"line_number":846,"context_line":"            if 1 \u003d\u003d len(router_ids):"},{"line_number":847,"context_line":"                router_query \u003d router_query.filter(Router.id \u003d\u003d router_ids[0])"},{"line_number":848,"context_line":"            else:"},{"line_number":849,"context_line":"                router_query \u003d router_query.filter(Router.id.in_(router_ids))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br2s%3D","line":846,"updated":"2013-02-21 18:13:55.000000000","message":"why do we have the special case?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":843,"context_line":"        \"\"\""},{"line_number":844,"context_line":"        router_query \u003d context.session.query(Router)"},{"line_number":845,"context_line":"        if router_ids:"},{"line_number":846,"context_line":"            if 1 \u003d\u003d len(router_ids):"},{"line_number":847,"context_line":"                router_query \u003d router_query.filter(Router.id \u003d\u003d router_ids[0])"},{"line_number":848,"context_line":"            else:"},{"line_number":849,"context_line":"                router_query \u003d router_query.filter(Router.id.in_(router_ids))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqxo%3D","line":846,"in_reply_to":"AAAAM3%2F%2Br2s%3D","updated":"2013-02-22 04:29:19.000000000","message":"\u003d\u003d is more efficient than in_.","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"}],"quantum/db/l3_rpc_agent_api.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvxk%3D","line":2,"updated":"2013-02-20 01:44:47.000000000","message":"why is this file in the db directory?  It has nothing to do with accessing the database?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvoQ%3D","line":2,"in_reply_to":"AAAAM3%2F%2Bvxk%3D","updated":"2013-02-20 03:10:59.000000000","message":"I will move it into quantum.api.rpc.agentnotifiers","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            topic\u003d\u0027%s.%s\u0027 % (topics.L3_AGENT, host))"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _agent_notification(self, context, method, routers,"},{"line_number":48,"context_line":"                            operation, data):"},{"line_number":49,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":50,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":51,"context_line":"        router_ids \u003d [router[\u0027id\u0027] for router in routers]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvyA%3D","line":48,"updated":"2013-02-20 01:44:47.000000000","message":"can we have a more descriptive name and or comment here?  I\u0027m having a hard time understanding what is going on here.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            topic\u003d\u0027%s.%s\u0027 % (topics.L3_AGENT, host))"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _agent_notification(self, context, method, routers,"},{"line_number":48,"context_line":"                            operation, data):"},{"line_number":49,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":50,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":51,"context_line":"        router_ids \u003d [router[\u0027id\u0027] for router in routers]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvoM%3D","line":48,"in_reply_to":"AAAAM3%2F%2BvyA%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":92,"context_line":"            self.fanout_cast("},{"line_number":93,"context_line":"                context, self.make_msg(method,"},{"line_number":94,"context_line":"                                       routers\u003drouters),"},{"line_number":95,"context_line":"                topic\u003dtopics.DHCP_AGENT)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _notification_fanout(self, context, method, router_id):"},{"line_number":98,"context_line":"        \"\"\"Fanout the router is deleted to all L3 agents\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvoE%3D","line":95,"updated":"2013-02-20 03:10:59.000000000","message":"topics.L3_AGENT","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":92,"context_line":"            self.fanout_cast("},{"line_number":93,"context_line":"                context, self.make_msg(method,"},{"line_number":94,"context_line":"                                       routers\u003drouters),"},{"line_number":95,"context_line":"                topic\u003dtopics.DHCP_AGENT)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _notification_fanout(self, context, method, router_id):"},{"line_number":98,"context_line":"        \"\"\"Fanout the router is deleted to all L3 agents\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bva0%3D","line":95,"in_reply_to":"AAAAM3%2F%2BvoE%3D","updated":"2013-02-20 05:35:22.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.fanout_cast("},{"line_number":105,"context_line":"            context, self.make_msg(method,"},{"line_number":106,"context_line":"                                   router_id\u003drouter_id),"},{"line_number":107,"context_line":"            topic\u003dtopics.DHCP_AGENT)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def router_deleted(self, context, router_id):"},{"line_number":110,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvyc%3D","line":107,"updated":"2013-02-20 01:44:47.000000000","message":"i\u0027m confused why this mixes topic.dhcp_agent and router_id.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.fanout_cast("},{"line_number":105,"context_line":"            context, self.make_msg(method,"},{"line_number":106,"context_line":"                                   router_id\u003drouter_id),"},{"line_number":107,"context_line":"            topic\u003dtopics.DHCP_AGENT)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def router_deleted(self, context, router_id):"},{"line_number":110,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvoI%3D","line":107,"in_reply_to":"AAAAM3%2F%2Bvyc%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"}],"quantum/db/l3_rpc_base.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":42,"context_line":"        context \u003d quantum_context.get_admin_context()"},{"line_number":43,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":44,"context_line":"        if utils.is_extension_supported("},{"line_number":45,"context_line":"            plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":46,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":47,"context_line":"                plugin.auto_schedule_routers(context, host, router_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BovY%3D","line":44,"updated":"2013-02-24 08:13:13.000000000","message":"ditto regarding the extension","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":42,"context_line":"        context \u003d quantum_context.get_admin_context()"},{"line_number":43,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":44,"context_line":"        if utils.is_extension_supported("},{"line_number":45,"context_line":"            plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":46,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":47,"context_line":"                plugin.auto_schedule_routers(context, host, router_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosI%3D","line":44,"in_reply_to":"AAAAM3%2F%2BovY%3D","updated":"2013-02-24 13:28:20.000000000","message":"the same. we had better not construct the callback in __init__ since __init__ of plugin will construct L3RpcCallbackMixin.","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"}],"quantum/extensions/agentscheduler.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        exts \u003d []"},{"line_number":114,"context_line":"        parent \u003d dict(member_name\u003d\"agent\","},{"line_number":115,"context_line":"                      collection_name\u003d\"agents\")"},{"line_number":116,"context_line":"        controller \u003d NetworkSchedulerController()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":119,"context_line":"            DHCP_NETS, controller, parent))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvvw%3D","line":116,"updated":"2013-02-20 02:03:23.000000000","message":"How about wrap controller by \u0027quantum.api.v2.resource.Resource\u0027? It provider failure handle.\n\nSame for other controller.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":113,"context_line":"        exts \u003d []"},{"line_number":114,"context_line":"        parent \u003d dict(member_name\u003d\"agent\","},{"line_number":115,"context_line":"                      collection_name\u003d\"agents\")"},{"line_number":116,"context_line":"        controller \u003d NetworkSchedulerController()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":119,"context_line":"            DHCP_NETS, controller, parent))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvm4%3D","line":116,"in_reply_to":"AAAAM3%2F%2Bvvw%3D","updated":"2013-02-20 03:10:59.000000000","message":"good point, I will try","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        controller \u003d RouterSchedulerController()"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":124,"context_line":"            L3_ROUTERS, controller, parent))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        parent \u003d dict(member_name\u003d\"network\","},{"line_number":127,"context_line":"                      collection_name\u003d\"networks\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2ByqA%3D","line":124,"updated":"2013-02-19 05:13:06.000000000","message":"Why we create sub-resource \u0027dhcpnetworks\u0027 and \u0027l3routers\u0027? Is this can be done as agent\u0027s member? And your document describe those as agent\u0027s member action.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        controller \u003d RouterSchedulerController()"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":124,"context_line":"            L3_ROUTERS, controller, parent))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        parent \u003d dict(member_name\u003d\"network\","},{"line_number":127,"context_line":"                      collection_name\u003d\"networks\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bymg%3D","line":124,"in_reply_to":"AAAAM3%2F%2ByqA%3D","updated":"2013-02-19 05:41:22.000000000","message":"sub-resource is cleaner here. It is an association between agent and network, so implement it as agent\u0027s member is not good. design document agent\u0027s member action is more talking about access from the view point of client side.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        controller \u003d DhcpAgentsHostingNetworkController()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":131,"context_line":"            DHCP_AGENTS, controller, parent))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        parent \u003d dict(member_name\u003d\"router\","},{"line_number":134,"context_line":"                      collection_name\u003d\"routers\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BypY%3D","line":131,"updated":"2013-02-19 05:13:06.000000000","message":"This can be network\u0027s extended attribute. is it better?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":128,"context_line":"        controller \u003d DhcpAgentsHostingNetworkController()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":131,"context_line":"            DHCP_AGENTS, controller, parent))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        parent \u003d dict(member_name\u003d\"router\","},{"line_number":134,"context_line":"                      collection_name\u003d\"routers\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BymY%3D","line":131,"in_reply_to":"AAAAM3%2F%2BypY%3D","updated":"2013-02-19 05:41:22.000000000","message":"same as above","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        parent \u003d dict(member_name\u003d\"router\","},{"line_number":134,"context_line":"                      collection_name\u003d\"routers\")"},{"line_number":135,"context_line":"        controller \u003d L3AgentsHostingRouterController()"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":138,"context_line":"            L3_AGENTS, controller, parent))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BypQ%3D","line":135,"updated":"2013-02-19 05:13:06.000000000","message":"same as above, this can be network\u0027s extended attribute.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        parent \u003d dict(member_name\u003d\"router\","},{"line_number":134,"context_line":"                      collection_name\u003d\"routers\")"},{"line_number":135,"context_line":"        controller \u003d L3AgentsHostingRouterController()"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        exts.append(extensions.ResourceExtension("},{"line_number":138,"context_line":"            L3_AGENTS, controller, parent))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BymU%3D","line":135,"in_reply_to":"AAAAM3%2F%2BypQ%3D","updated":"2013-02-19 05:41:22.000000000","message":"same as above","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class NetworkHostedByDHCPAgent(exceptions.Conflict):"},{"line_number":150,"context_line":"    message \u003d _(\"The network has been already hosted by the DHCP Agent.\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":154,"context_line":"    message \u003d _(\"The network is not hosted by the DHCP Agent yet.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bz2U%3D","line":151,"updated":"2013-02-18 20:22:05.000000000","message":"It might be helpful to have the network id in this message. Your earlier patch also introduced agent ids, might be helpful to have it here.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class NetworkHostedByDHCPAgent(exceptions.Conflict):"},{"line_number":150,"context_line":"    message \u003d _(\"The network has been already hosted by the DHCP Agent.\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":154,"context_line":"    message \u003d _(\"The network is not hosted by the DHCP Agent yet.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By5M%3D","line":151,"in_reply_to":"AAAAM3%2F%2Bz2U%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":154,"context_line":"    message \u003d _(\"The network is not hosted by the DHCP Agent yet.\")"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class NotL3Agent(agent.AgentNotFound):"},{"line_number":158,"context_line":"    message \u003d _(\"Component %(id)s is not a valid L3 Agent\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bz2Q%3D","line":155,"updated":"2013-02-18 20:22:05.000000000","message":"Ditto","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":154,"context_line":"    message \u003d _(\"The network is not hosted by the DHCP Agent yet.\")"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class NotL3Agent(agent.AgentNotFound):"},{"line_number":158,"context_line":"    message \u003d _(\"Component %(id)s is not a valid L3 Agent\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By5I%3D","line":155,"in_reply_to":"AAAAM3%2F%2Bz2Q%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class RouterHostedByL3Agent(exceptions.Conflict):"},{"line_number":162,"context_line":"    message \u003d _(\"The router has been already hosted by the L3 Agent.\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":166,"context_line":"    message \u003d _(\"The router is not hosted by L3 Agent yet.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bz2I%3D","line":163,"updated":"2013-02-18 20:22:05.000000000","message":"It might be helpful to have the router id in the message. Your earlier patch also introduced agent ids, might be helpful to have it here.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class RouterHostedByL3Agent(exceptions.Conflict):"},{"line_number":162,"context_line":"    message \u003d _(\"The router has been already hosted by the L3 Agent.\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":166,"context_line":"    message \u003d _(\"The router is not hosted by L3 Agent yet.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By48%3D","line":163,"in_reply_to":"AAAAM3%2F%2Bz2I%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":166,"context_line":"    message \u003d _(\"The router is not hosted by L3 Agent yet.\")"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"class AgentSchedulerPluginBase(object):"},{"line_number":170,"context_line":"    \"\"\" REST API to operate the agent scheduler."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bz2E%3D","line":167,"updated":"2013-02-18 20:22:05.000000000","message":"Ditto","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":166,"context_line":"    message \u003d _(\"The router is not hosted by L3 Agent yet.\")"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"class AgentSchedulerPluginBase(object):"},{"line_number":170,"context_line":"    \"\"\" REST API to operate the agent scheduler."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By44%3D","line":167,"in_reply_to":"AAAAM3%2F%2Bz2E%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def create(self, request, **kwargs):"},{"line_number":42,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":43,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":44,"context_line":"                                 request.best_match_content_type())"},{"line_number":45,"context_line":"        return plugin.add_network_to_dhcp_agent("},{"line_number":46,"context_line":"            request.context, kwargs[\u0027agent_id\u0027], body[\u0027network_id\u0027])"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsYA%3D","line":44,"updated":"2013-02-21 13:36:47.000000000","message":"\u0027resouce.Resource\u0027 has already deserialize the body of request, and pass that as argument \u0027body\u0027","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def create(self, request, **kwargs):"},{"line_number":42,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":43,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":44,"context_line":"                                 request.best_match_content_type())"},{"line_number":45,"context_line":"        return plugin.add_network_to_dhcp_agent("},{"line_number":46,"context_line":"            request.context, kwargs[\u0027agent_id\u0027], body[\u0027network_id\u0027])"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsT8%3D","line":44,"in_reply_to":"AAAAM3%2F%2BsYA%3D","updated":"2013-02-21 13:45:00.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def create(self, request, **kwargs):"},{"line_number":61,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":62,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":63,"context_line":"                                 request.best_match_content_type())"},{"line_number":64,"context_line":"        return plugin.add_router_to_l3_agent("},{"line_number":65,"context_line":"            request.context,"},{"line_number":66,"context_line":"            kwargs[\u0027agent_id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsX8%3D","line":63,"updated":"2013-02-21 13:36:47.000000000","message":"same as above","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def create(self, request, **kwargs):"},{"line_number":61,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":62,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":63,"context_line":"                                 request.best_match_content_type())"},{"line_number":64,"context_line":"        return plugin.add_router_to_l3_agent("},{"line_number":65,"context_line":"            request.context,"},{"line_number":66,"context_line":"            kwargs[\u0027agent_id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsUA%3D","line":63,"in_reply_to":"AAAAM3%2F%2BsX8%3D","updated":"2013-02-21 13:45:00.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"from quantum import manager"},{"line_number":27,"context_line":"from quantum import wsgi"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DHCP_NETS \u003d \u0027dhcpnetworks\u0027"},{"line_number":30,"context_line":"DHCP_AGENTS \u003d \u0027dhcpagents\u0027"},{"line_number":31,"context_line":"L3_ROUTERS \u003d \u0027l3routers\u0027"},{"line_number":32,"context_line":"L3_AGENTS \u003d \u0027l3agents\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br2U%3D","line":29,"updated":"2013-02-21 18:13:55.000000000","message":"consider dhcp:networks or dhcp-networks","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"from quantum import manager"},{"line_number":27,"context_line":"from quantum import wsgi"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DHCP_NETS \u003d \u0027dhcpnetworks\u0027"},{"line_number":30,"context_line":"DHCP_AGENTS \u003d \u0027dhcpagents\u0027"},{"line_number":31,"context_line":"L3_ROUTERS \u003d \u0027l3routers\u0027"},{"line_number":32,"context_line":"L3_AGENTS \u003d \u0027l3agents\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqxY%3D","line":29,"in_reply_to":"AAAAM3%2F%2Br2U%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":156,"context_line":"    message \u003d _(\"The network %(network_id)s is not hosted\""},{"line_number":157,"context_line":"                \" by the DHCP agent %(agent_id)s yet.\")"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class InvalidL3Agent(agent.AgentNotFound):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj%2FQ%3D","line":157,"updated":"2013-02-27 09:33:37.000000000","message":"why do we need the \"yet\"?","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"class NetworkNotHostedByDhcpAgent(exceptions.Conflict):"},{"line_number":156,"context_line":"    message \u003d _(\"The network %(network_id)s is not hosted\""},{"line_number":157,"context_line":"                \" by the DHCP agent %(agent_id)s yet.\")"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class InvalidL3Agent(agent.AgentNotFound):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj9k%3D","line":157,"in_reply_to":"AAAAM3%2F%2Bj%2FQ%3D","updated":"2013-02-27 09:42:15.000000000","message":"Done","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":175,"context_line":"    message \u003d _(\"The router %(router_id)s is not hosted\""},{"line_number":176,"context_line":"                \" by L3 agent %(agent_id)s yet.\")"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class AgentSchedulerPluginBase(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj%2FI%3D","line":176,"updated":"2013-02-27 09:33:37.000000000","message":"ditto","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"class RouterNotHostedByL3Agent(exceptions.Conflict):"},{"line_number":175,"context_line":"    message \u003d _(\"The router %(router_id)s is not hosted\""},{"line_number":176,"context_line":"                \" by L3 agent %(agent_id)s yet.\")"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class AgentSchedulerPluginBase(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bj9g%3D","line":176,"in_reply_to":"AAAAM3%2F%2Bj%2FI%3D","updated":"2013-02-27 09:42:15.000000000","message":"Done","commit_id":"90e1b2731b4a59535ccffa6a1fe16683c438ee04"}],"quantum/plugins/openvswitch/ovs_quantum_plugin.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def __init__(self, notifier):"},{"line_number":72,"context_line":"        self.notifier \u003d notifier"},{"line_number":73,"context_line":"        self.getGateWayIPOnHost \u003d ("},{"line_number":74,"context_line":"            agentschedulers_db.AgentSchedulerDbMixin.getGateWayIPOnHost)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def create_rpc_dispatcher(self):"},{"line_number":77,"context_line":"        \u0027\u0027\u0027Get the rpc dispatcher for this manager."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtLo%3D","line":74,"updated":"2013-02-21 02:05:07.000000000","message":"if this isn\u0027t used in this file, i\u0027m unclear why we don\u0027t just have the other file import and call the function themselves...","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def __init__(self, notifier):"},{"line_number":72,"context_line":"        self.notifier \u003d notifier"},{"line_number":73,"context_line":"        self.getGateWayIPOnHost \u003d ("},{"line_number":74,"context_line":"            agentschedulers_db.AgentSchedulerDbMixin.getGateWayIPOnHost)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def create_rpc_dispatcher(self):"},{"line_number":77,"context_line":"        \u0027\u0027\u0027Get the rpc dispatcher for this manager."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BtIQ%3D","line":74,"in_reply_to":"AAAAM3%2F%2BtLo%3D","updated":"2013-02-21 02:40:39.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":498,"context_line":"            self._extend_network_dict_l3(context, net)"},{"line_number":499,"context_line":"            # note - exception will rollback entire transaction"},{"line_number":500,"context_line":"        LOG.debug(_(\"Created network: %s\"), net[\u0027id\u0027])"},{"line_number":501,"context_line":"        self.schedule_network(context, network[\u0027network\u0027], net)"},{"line_number":502,"context_line":"        return net"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br2I%3D","line":501,"updated":"2013-02-21 18:13:55.000000000","message":"once again we will have to update all of the plugins. is it possible to make this generic?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":498,"context_line":"            self._extend_network_dict_l3(context, net)"},{"line_number":499,"context_line":"            # note - exception will rollback entire transaction"},{"line_number":500,"context_line":"        LOG.debug(_(\"Created network: %s\"), net[\u0027id\u0027])"},{"line_number":501,"context_line":"        self.schedule_network(context, network[\u0027network\u0027], net)"},{"line_number":502,"context_line":"        return net"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqxI%3D","line":501,"in_reply_to":"AAAAM3%2F%2Br2I%3D","updated":"2013-02-22 04:29:19.000000000","message":"can we do it when we enable linux bridge plugin?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":583,"context_line":"            self.notifier.security_groups_member_updated("},{"line_number":584,"context_line":"                context, port.get(ext_sg.SECURITYGROUPS))"},{"line_number":585,"context_line":"        net \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":586,"context_line":"        self.schedule_network(context, None, net)"},{"line_number":587,"context_line":"        return self._extend_port_dict_binding(context, port)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def get_port(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br14%3D","line":586,"updated":"2013-02-21 18:13:55.000000000","message":"can you please add a comment here explaining why a schedule network is needed for a port creation?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":583,"context_line":"            self.notifier.security_groups_member_updated("},{"line_number":584,"context_line":"                context, port.get(ext_sg.SECURITYGROUPS))"},{"line_number":585,"context_line":"        net \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":586,"context_line":"        self.schedule_network(context, None, net)"},{"line_number":587,"context_line":"        return self._extend_port_dict_binding(context, port)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def get_port(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqxQ%3D","line":586,"in_reply_to":"AAAAM3%2F%2Br14%3D","updated":"2013-02-22 04:29:19.000000000","message":"That is the time gap. guess I created a network without a dhcp agent running. then start dhcp agent.\nthen start a VM,","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":653,"context_line":"            context, port.get(ext_sg.SECURITYGROUPS))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    def update_agent(self, context, id, agent):"},{"line_number":656,"context_line":"        ori_agent \u003d self.get_agent(id)"},{"line_number":657,"context_line":"        result \u003d super(OVSQuantumPluginV2, self).update_agent("},{"line_number":658,"context_line":"            context, id, agent)"},{"line_number":659,"context_line":"        agent_data \u003d agent[\u0027agent\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1w%3D","line":656,"updated":"2013-02-21 18:13:55.000000000","message":"ori \u003d\u003e original (for a moment i was wondering who ori is?)","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":653,"context_line":"            context, port.get(ext_sg.SECURITYGROUPS))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    def update_agent(self, context, id, agent):"},{"line_number":656,"context_line":"        ori_agent \u003d self.get_agent(id)"},{"line_number":657,"context_line":"        result \u003d super(OVSQuantumPluginV2, self).update_agent("},{"line_number":658,"context_line":"            context, id, agent)"},{"line_number":659,"context_line":"        agent_data \u003d agent[\u0027agent\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqxM%3D","line":656,"in_reply_to":"AAAAM3%2F%2Br1w%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"from quantum.db import dhcp_rpc_base"},{"line_number":39,"context_line":"from quantum.db import extraroute_db"},{"line_number":40,"context_line":"from quantum.db import l3_rpc_base"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# NOTE: quota_db cannot be removed, it is for db model"},{"line_number":43,"context_line":"from quantum.db import quota_db"},{"line_number":44,"context_line":"from quantum.db import securitygroups_rpc_base as sg_db_rpc"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoTI%3D","line":41,"updated":"2013-02-25 12:29:17.000000000","message":"The blank line is not needed.","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"from quantum.db import dhcp_rpc_base"},{"line_number":39,"context_line":"from quantum.db import extraroute_db"},{"line_number":40,"context_line":"from quantum.db import l3_rpc_base"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# NOTE: quota_db cannot be removed, it is for db model"},{"line_number":43,"context_line":"from quantum.db import quota_db"},{"line_number":44,"context_line":"from quantum.db import securitygroups_rpc_base as sg_db_rpc"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5E%3D","line":41,"in_reply_to":"AAAAM3%2F%2BoTI%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"}],"quantum/scheduler/__init__.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2012 OpenStack LLC."},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsrY%3D","line":3,"updated":"2013-02-21 09:29:05.000000000","message":"2013","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2012 OpenStack LLC."},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsUk%3D","line":3,"in_reply_to":"AAAAM3%2F%2BsrY%3D","updated":"2013-02-21 13:42:57.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"}],"quantum/scheduler/dhcp_agent_scheduler.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"                dhcp_agent.heartbeat_timestamp):"},{"line_number":90,"context_line":"                LOG.warn(_(\u0027DHCP agent %s is not active\u0027), dhcp_agent.id)"},{"line_number":91,"context_line":"            #TODO(gongysh) consider the disabled agent\u0027s network"},{"line_number":92,"context_line":"            stmt \u003d ~exists().where("},{"line_number":93,"context_line":"                models_v2.Network.id \u003d\u003d"},{"line_number":94,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding.network_id)"},{"line_number":95,"context_line":"            net_ids \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BovM%3D","line":92,"updated":"2013-02-24 08:13:13.000000000","message":"stmt - is it possible to use a variable that is easily understood","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"                dhcp_agent.heartbeat_timestamp):"},{"line_number":90,"context_line":"                LOG.warn(_(\u0027DHCP agent %s is not active\u0027), dhcp_agent.id)"},{"line_number":91,"context_line":"            #TODO(gongysh) consider the disabled agent\u0027s network"},{"line_number":92,"context_line":"            stmt \u003d ~exists().where("},{"line_number":93,"context_line":"                models_v2.Network.id \u003d\u003d"},{"line_number":94,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding.network_id)"},{"line_number":95,"context_line":"            net_ids \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BosE%3D","line":92,"in_reply_to":"AAAAM3%2F%2BovM%3D","updated":"2013-02-24 13:28:20.000000000","message":"Done","commit_id":"265e7220c19e6d5102f2616cf17d63cd229da5db"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ChanceScheduler(object):"},{"line_number":34,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":35,"context_line":"    can be introduced later.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":38,"context_line":"        \"\"\"Schedule the network to an active DHCP agent if there"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BoEE%3D","line":35,"updated":"2013-02-25 12:29:17.000000000","message":"It would be better to describe the feature of ChanceScheduler in the docstring rather than the future work: \"Allocate a dhcp agent for a network in a random way.\"","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ChanceScheduler(object):"},{"line_number":34,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":35,"context_line":"    can be introduced later.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":38,"context_line":"        \"\"\"Schedule the network to an active DHCP agent if there"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bm5A%3D","line":35,"in_reply_to":"AAAAM3%2F%2BoEE%3D","updated":"2013-02-26 00:30:07.000000000","message":"Done","commit_id":"777e50c6a95667321823795b7eae5d872362cb5b"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"51a0b11517bd3a0f5f27bf4a511f15776faabd96","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                  agents_db.AgentDbMixin.is_agent_down("},{"line_number":61,"context_line":"                                  enabled_dhcp_agent[\u0027heartbeat_timestamp\u0027])]"},{"line_number":62,"context_line":"            if not active_dhcp_agents:"},{"line_number":63,"context_line":"                LOG.debug(_(\u0027No active DHCP agents\u0027))"},{"line_number":64,"context_line":"                return False"},{"line_number":65,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":66,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Blu0%3D","line":63,"updated":"2013-02-26 16:34:11.000000000","message":"I guess it\u0027s reasonable to increase logging level here or even to raise an exception, if scheduling failed.","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                  agents_db.AgentDbMixin.is_agent_down("},{"line_number":61,"context_line":"                                  enabled_dhcp_agent[\u0027heartbeat_timestamp\u0027])]"},{"line_number":62,"context_line":"            if not active_dhcp_agents:"},{"line_number":63,"context_line":"                LOG.debug(_(\u0027No active DHCP agents\u0027))"},{"line_number":64,"context_line":"                return False"},{"line_number":65,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":66,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BkKk%3D","line":63,"in_reply_to":"AAAAM3%2F%2Blu0%3D","updated":"2013-02-27 06:57:39.000000000","message":"Done","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"51a0b11517bd3a0f5f27bf4a511f15776faabd96","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            if not active_dhcp_agents:"},{"line_number":63,"context_line":"                LOG.debug(_(\u0027No active DHCP agents\u0027))"},{"line_number":64,"context_line":"                return False"},{"line_number":65,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":66,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":67,"context_line":"            binding.dhcp_agent \u003d active_dhcp_agents[index]"},{"line_number":68,"context_line":"            binding.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BlwA%3D","line":65,"updated":"2013-02-26 16:34:11.000000000","message":"Shouldn\u0027t that be:\nagent \u003d random.choice(active_dhcp_agents) ?","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"            if not active_dhcp_agents:"},{"line_number":63,"context_line":"                LOG.debug(_(\u0027No active DHCP agents\u0027))"},{"line_number":64,"context_line":"                return False"},{"line_number":65,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":66,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":67,"context_line":"            binding.dhcp_agent \u003d active_dhcp_agents[index]"},{"line_number":68,"context_line":"            binding.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BkM0%3D","line":65,"in_reply_to":"AAAAM3%2F%2BlwA%3D","updated":"2013-02-27 06:57:39.000000000","message":"Done","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"51a0b11517bd3a0f5f27bf4a511f15776faabd96","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                LOG.debug(_(\u0027No non-hosted networks\u0027))"},{"line_number":102,"context_line":"                return False"},{"line_number":103,"context_line":"            net_len \u003d len(net_ids)"},{"line_number":104,"context_line":"            for index in xrange(net_len):"},{"line_number":105,"context_line":"                binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":106,"context_line":"                binding.dhcp_agent \u003d dhcp_agent"},{"line_number":107,"context_line":"                binding.network_id \u003d net_ids[index][0]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Blv0%3D","line":104,"updated":"2013-02-26 16:34:11.000000000","message":"I guess it\u0027s better to replace this with something like\n\nfor net_id in net_ids:\n    ......","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":"                LOG.debug(_(\u0027No non-hosted networks\u0027))"},{"line_number":102,"context_line":"                return False"},{"line_number":103,"context_line":"            net_len \u003d len(net_ids)"},{"line_number":104,"context_line":"            for index in xrange(net_len):"},{"line_number":105,"context_line":"                binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":106,"context_line":"                binding.dhcp_agent \u003d dhcp_agent"},{"line_number":107,"context_line":"                binding.network_id \u003d net_ids[index][0]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BkM4%3D","line":104,"in_reply_to":"AAAAM3%2F%2Blv0%3D","updated":"2013-02-27 06:57:39.000000000","message":"Done","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"}],"quantum/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"51a0b11517bd3a0f5f27bf4a511f15776faabd96","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                          sync_router[\u0027id\u0027])"},{"line_number":137,"context_line":"                return False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            index \u003d random.randint(0, len(candidates) - 1)"},{"line_number":140,"context_line":"            binding \u003d agentschedulers_db.RouterL3AgentBinding()"},{"line_number":141,"context_line":"            binding.l3_agent \u003d candidates[index]"},{"line_number":142,"context_line":"            binding.router_id \u003d sync_router[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BlvQ%3D","line":139,"updated":"2013-02-26 16:34:11.000000000","message":"Consider using random.choice() instead of random.randint()","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":136,"context_line":"                          sync_router[\u0027id\u0027])"},{"line_number":137,"context_line":"                return False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            index \u003d random.randint(0, len(candidates) - 1)"},{"line_number":140,"context_line":"            binding \u003d agentschedulers_db.RouterL3AgentBinding()"},{"line_number":141,"context_line":"            binding.l3_agent \u003d candidates[index]"},{"line_number":142,"context_line":"            binding.router_id \u003d sync_router[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BkMg%3D","line":139,"in_reply_to":"AAAAM3%2F%2BlvQ%3D","updated":"2013-02-27 06:57:39.000000000","message":"Done","commit_id":"60d82a1db414f38aa921d9190ce36282a0bf3cd7"}],"quantum/scheduler/networkscheduler.py":[{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2012 OpenStack LLC."},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bzzw%3D","line":3,"updated":"2013-02-18 20:22:05.000000000","message":"2012 -\u003e 2013","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2012 OpenStack LLC."},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By4s%3D","line":3,"in_reply_to":"AAAAM3%2F%2Bzzw%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import random"},{"line_number":19,"context_line":"from sqlalchemy.sql import exists"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from quantum.common import constants"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BzzQ%3D","line":18,"updated":"2013-02-18 20:22:05.000000000","message":"blank line here?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import random"},{"line_number":19,"context_line":"from sqlalchemy.sql import exists"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from quantum.common import constants"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By4w%3D","line":18,"in_reply_to":"AAAAM3%2F%2BzzQ%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SimpleScheduler(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":30,"context_line":"        \"\"\"Schedule the network to an active dhcp agent if there"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvv0%3D","line":27,"updated":"2013-02-20 02:26:41.000000000","message":"simple isn\u0027t very descriptive.  As I understand it, this scheduler either supports someone specifying the exact host to place it on, or an random placement.  Is that correct?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SimpleScheduler(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":30,"context_line":"        \"\"\"Schedule the network to an active dhcp agent if there"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvYQ%3D","line":27,"in_reply_to":"AAAAM3%2F%2BvZ4%3D","updated":"2013-02-20 06:02:24.000000000","message":"A scheduler in nova which selects a node randomly is named as ChanceScheduler. How about following it?\n\nThe Nova\u0027s SimpleSchduler selects the least loaded host. I think it is confusing schedulers with the same name uses different algorithm. (though simple scheduler in nova has been deleted in Grizzly).","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SimpleScheduler(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":30,"context_line":"        \"\"\"Schedule the network to an active dhcp agent if there"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvZ4%3D","line":27,"in_reply_to":"AAAAM3%2F%2BvmQ%3D","updated":"2013-02-20 05:44:01.000000000","message":"hehe, yeah.  naming is hard.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SimpleScheduler(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def schedule(self, plugin, context, request_network, network):"},{"line_number":30,"context_line":"        \"\"\"Schedule the network to an active dhcp agent if there"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvmQ%3D","line":27,"in_reply_to":"AAAAM3%2F%2Bvv0%3D","updated":"2013-02-20 03:10:59.000000000","message":"Yes, but what is your opinion about the name? SimpleScheduler is relative to filters one in nova scheduler. Maybe we will have one as such.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"            context.session.add(binding)"},{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvv8%3D","line":52,"updated":"2013-02-20 02:26:41.000000000","message":"auto?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"            context.session.add(binding)"},{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvmk%3D","line":52,"in_reply_to":"AAAAM3%2F%2Bvv8%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"928c915e7419324bd88eb94b507aab17ae43a30d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"},{"line_number":56,"context_line":"            query \u003d query.filter(agents_db.Agent.type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BzzE%3D","line":53,"updated":"2013-02-18 20:22:05.000000000","message":"Comment is confusing, did you mean to say - \"Schedule non-hosted networks to DHCP agent\"?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"},{"line_number":56,"context_line":"            query \u003d query.filter(agents_db.Agent.type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvaw%3D","line":53,"in_reply_to":"AAAAM3%2F%2Bvmg%3D","updated":"2013-02-20 05:35:22.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"},{"line_number":56,"context_line":"            query \u003d query.filter(agents_db.Agent.type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvmg%3D","line":53,"in_reply_to":"AAAAM3%2F%2By4o%3D","updated":"2013-02-20 05:05:32.000000000","message":"Does this method schedule all non-hosted network to dhcp-agent on the specified host?\nIf my understanding is correct, it would be helpful to change  \"to DHCP agent\" to \"the DHCP agent on the specifed host\" or \"the specified DHCP agent\".","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return True"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def audo_schedule_networks(self, plugin, context, host):"},{"line_number":53,"context_line":"        \"\"\"Scheduler non hosted networks to DHCP agent.\"\"\""},{"line_number":54,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"            query \u003d context.session.query(agents_db.Agent)"},{"line_number":56,"context_line":"            query \u003d query.filter(agents_db.Agent.type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By4o%3D","line":53,"in_reply_to":"AAAAM3%2F%2BzzE%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d True)"},{"line_number":60,"context_line":"            try:"},{"line_number":61,"context_line":"                dhcp_agent \u003d query.one()"},{"line_number":62,"context_line":"            except Exception:"},{"line_number":63,"context_line":"                return False"},{"line_number":64,"context_line":"            stmt \u003d ~exists().where("},{"line_number":65,"context_line":"                models_v2.Network.id \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvvg%3D","line":62,"updated":"2013-02-20 02:26:41.000000000","message":"can we catch a more specific exception?  A DB query might return a lot of different things, and presumably you just want to catch a specific case here (the case where no results are found)?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d True)"},{"line_number":60,"context_line":"            try:"},{"line_number":61,"context_line":"                dhcp_agent \u003d query.one()"},{"line_number":62,"context_line":"            except Exception:"},{"line_number":63,"context_line":"                return False"},{"line_number":64,"context_line":"            stmt \u003d ~exists().where("},{"line_number":65,"context_line":"                models_v2.Network.id \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvak%3D","line":62,"in_reply_to":"AAAAM3%2F%2BvmU%3D","updated":"2013-02-20 05:35:22.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d True)"},{"line_number":60,"context_line":"            try:"},{"line_number":61,"context_line":"                dhcp_agent \u003d query.one()"},{"line_number":62,"context_line":"            except Exception:"},{"line_number":63,"context_line":"                return False"},{"line_number":64,"context_line":"            stmt \u003d ~exists().where("},{"line_number":65,"context_line":"                models_v2.Network.id \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvmU%3D","line":62,"in_reply_to":"AAAAM3%2F%2Bvvg%3D","updated":"2013-02-20 05:05:32.000000000","message":"(you may already fix it) one() may raise sa.MultipleResultsFound. we need to take it in addition to no result found.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d True)"},{"line_number":60,"context_line":"            try:"},{"line_number":61,"context_line":"                dhcp_agent \u003d query.one()"},{"line_number":62,"context_line":"            except Exception:"},{"line_number":63,"context_line":"                return False"},{"line_number":64,"context_line":"            stmt \u003d ~exists().where("},{"line_number":65,"context_line":"                models_v2.Network.id \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvmc%3D","line":62,"in_reply_to":"AAAAM3%2F%2Bvvg%3D","updated":"2013-02-20 03:10:59.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":49,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":50,"context_line":"            binding.dhcp_agent \u003d active_dhcp_agents[index]"},{"line_number":51,"context_line":"            binding.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsrU%3D","line":48,"updated":"2013-02-21 09:29:05.000000000","message":"If we are going to use random then maybe change the name from Simple to Chance.","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":49,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":50,"context_line":"            binding.dhcp_agent \u003d active_dhcp_agents[index]"},{"line_number":51,"context_line":"            binding.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsUc%3D","line":48,"in_reply_to":"AAAAM3%2F%2BsrU%3D","updated":"2013-02-21 13:42:57.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"            active_dhcp_agents \u003d plugin.get_agents_db("},{"line_number":43,"context_line":"                context, filters\u003d{"},{"line_number":44,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1g%3D","line":45,"updated":"2013-02-21 18:13:55.000000000","message":"silly question - is the disabled True if the admin status is down or if there is no response from the agent?","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"            active_dhcp_agents \u003d plugin.get_agents_db("},{"line_number":43,"context_line":"                context, filters\u003d{"},{"line_number":44,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqxA%3D","line":45,"in_reply_to":"AAAAM3%2F%2Br1g%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                context, filters\u003d{"},{"line_number":44,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":49,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1c%3D","line":46,"updated":"2013-02-21 18:13:55.000000000","message":"may be worthwhile to log here","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                context, filters\u003d{"},{"line_number":44,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":45,"context_line":"                    \u0027disabled\u0027: [False]})"},{"line_number":46,"context_line":"            if not active_dhcp_agents:"},{"line_number":47,"context_line":"                return False"},{"line_number":48,"context_line":"            index \u003d random.randint(0, len(active_dhcp_agents) - 1)"},{"line_number":49,"context_line":"            binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqwc%3D","line":46,"in_reply_to":"AAAAM3%2F%2Br1c%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding.network_id)"},{"line_number":71,"context_line":"            net_ids \u003d context.session.query("},{"line_number":72,"context_line":"                models_v2.Network.id).filter(stmt).all()"},{"line_number":73,"context_line":"            if not net_ids:"},{"line_number":74,"context_line":"                return False"},{"line_number":75,"context_line":"            net_len \u003d len(net_ids)"},{"line_number":76,"context_line":"            for index in xrange(net_len):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1Y%3D","line":73,"updated":"2013-02-21 18:13:55.000000000","message":"ditto","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"                agentschedulers_db.NetworkDhcpAgentBinding.network_id)"},{"line_number":71,"context_line":"            net_ids \u003d context.session.query("},{"line_number":72,"context_line":"                models_v2.Network.id).filter(stmt).all()"},{"line_number":73,"context_line":"            if not net_ids:"},{"line_number":74,"context_line":"                return False"},{"line_number":75,"context_line":"            net_len \u003d len(net_ids)"},{"line_number":76,"context_line":"            for index in xrange(net_len):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BqwY%3D","line":73,"in_reply_to":"AAAAM3%2F%2Br1Y%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"}],"quantum/scheduler/routerscheduler.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SimpleScheduler(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _default_is_still_valid(self, plugin, context, router):"},{"line_number":31,"context_line":"        query \u003d context.session.query(agentschedulers_db.RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvtg%3D","line":28,"updated":"2013-02-20 02:26:41.000000000","message":"same comment about simple not being very descriptive.  I would argue the logic below isn\u0027t very simple either :P","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SimpleScheduler(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _default_is_still_valid(self, plugin, context, router):"},{"line_number":31,"context_line":"        query \u003d context.session.query(agentschedulers_db.RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvQM%3D","line":28,"in_reply_to":"AAAAM3%2F%2BvZs%3D","updated":"2013-02-20 08:01:32.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SimpleScheduler(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _default_is_still_valid(self, plugin, context, router):"},{"line_number":31,"context_line":"        query \u003d context.session.query(agentschedulers_db.RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvZs%3D","line":28,"in_reply_to":"AAAAM3%2F%2BvmM%3D","updated":"2013-02-20 05:44:01.000000000","message":"haha.  ok, how about as a compromise you get to keep the name simple scheduler, but you write a doc string for both SimpleScheduler classes describing what we mean by \"simple scheduling\" :)","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SimpleScheduler(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _default_is_still_valid(self, plugin, context, router):"},{"line_number":31,"context_line":"        query \u003d context.session.query(agentschedulers_db.RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvmM%3D","line":28,"in_reply_to":"AAAAM3%2F%2Bvtg%3D","updated":"2013-02-20 03:10:59.000000000","message":"It is relative.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"            l3_agents \u003d plugin.get_l3_agents("},{"line_number":42,"context_line":"                context, active\u003dTrue, filters\u003d{\u0027id\u0027: l3_agent_ids})"},{"line_number":43,"context_line":"            valid_agents \u003d plugin.get_candidate(router, l3_agents)"},{"line_number":44,"context_line":"            return True if valid_agents else False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def audo_default_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":47,"context_line":"        \"\"\"Schedule routers to L3 Agent running on host with default mode."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvtY%3D","line":44,"updated":"2013-02-20 02:26:41.000000000","message":"would \"return len(valid_agents)\" work?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"            l3_agents \u003d plugin.get_l3_agents("},{"line_number":42,"context_line":"                context, active\u003dTrue, filters\u003d{\u0027id\u0027: l3_agent_ids})"},{"line_number":43,"context_line":"            valid_agents \u003d plugin.get_candidate(router, l3_agents)"},{"line_number":44,"context_line":"            return True if valid_agents else False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def audo_default_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":47,"context_line":"        \"\"\"Schedule routers to L3 Agent running on host with default mode."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BvmE%3D","line":44,"in_reply_to":"AAAAM3%2F%2BvtY%3D","updated":"2013-02-20 03:10:59.000000000","message":"I know that, but elsewhere we are using explicit boolean True or False, do it because of the consistency.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"            valid_agents \u003d plugin.get_candidate(router, l3_agents)"},{"line_number":44,"context_line":"            return True if valid_agents else False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def audo_default_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":47,"context_line":"        \"\"\"Schedule routers to L3 Agent running on host with default mode."},{"line_number":48,"context_line":"        If router_id is given, only this router is scheduled"},{"line_number":49,"context_line":"        if it is not hosted yet."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvtw%3D","line":46,"updated":"2013-02-20 02:26:41.000000000","message":"auto?  same comment as with networkscheduler about this method not really doing scheduling, but rather creating bindings.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"            valid_agents \u003d plugin.get_candidate(router, l3_agents)"},{"line_number":44,"context_line":"            return True if valid_agents else False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def audo_default_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":47,"context_line":"        \"\"\"Schedule routers to L3 Agent running on host with default mode."},{"line_number":48,"context_line":"        If router_id is given, only this router is scheduled"},{"line_number":49,"context_line":"        if it is not hosted yet."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bvls%3D","line":46,"in_reply_to":"AAAAM3%2F%2Bvtw%3D","updated":"2013-02-20 03:10:59.000000000","message":"scheduler is to create binding if reduced to essential.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SimpleScheduler(object):"},{"line_number":31,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":32,"context_line":"    can be introduced later.\"\"\""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsrQ%3D","line":30,"updated":"2013-02-21 09:29:05.000000000","message":"Simple -\u003e Chance","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"from quantum.db import agentschedulers_db"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SimpleScheduler(object):"},{"line_number":31,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":32,"context_line":"    can be introduced later.\"\"\""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2BsUY%3D","line":30,"in_reply_to":"AAAAM3%2F%2BsrQ%3D","updated":"2013-02-21 13:42:57.000000000","message":"Done","commit_id":"6529f9e776a80143662acf3543d66d3aa248963e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":31,"context_line":"    can be introduced later.\"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def auto_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":34,"context_line":"        \"\"\"Schedule non-hosted routers to L3 Agent running on host."},{"line_number":35,"context_line":"        If router_id is given, only this router is scheduled"},{"line_number":36,"context_line":"        if it is not hosted yet."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsP8%3D","line":33,"updated":"2013-02-21 14:45:05.000000000","message":"Is there a case we invoke this with router_id \u003d None?\n\nA little confuse with the name, why call it as \u0027auto\u0027. This function host router to specific agent. the function \u0027schdule\u0027 at line 99 was lmore like \u0027auto\u0027","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"More sophisticated scheduler (similar to filter scheduler in nova?)"},{"line_number":31,"context_line":"    can be introduced later.\"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def auto_schedule_routers(self, plugin, context, host, router_id):"},{"line_number":34,"context_line":"        \"\"\"Schedule non-hosted routers to L3 Agent running on host."},{"line_number":35,"context_line":"        If router_id is given, only this router is scheduled"},{"line_number":36,"context_line":"        if it is not hosted yet."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsO0%3D","line":33,"in_reply_to":"AAAAM3%2F%2BsP8%3D","updated":"2013-02-21 14:52:25.000000000","message":"This includes scheduling all non-hosted routers or specified router.\nrouter_id is not None when we set the router_id in l3 agent\u0027s configuration file.","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"                if query.first():"},{"line_number":61,"context_line":"                    # already hosted"},{"line_number":62,"context_line":"                    return False"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"            # get the router ids"},{"line_number":65,"context_line":"            if not router_id:"},{"line_number":66,"context_line":"                # get all routers that are not hosted"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsWE%3D","line":63,"updated":"2013-02-21 13:50:39.000000000","message":"Please consider moving L.73 to here and changing L.65 to \"else\".","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"                if query.first():"},{"line_number":61,"context_line":"                    # already hosted"},{"line_number":62,"context_line":"                    return False"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"            # get the router ids"},{"line_number":65,"context_line":"            if not router_id:"},{"line_number":66,"context_line":"                # get all routers that are not hosted"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsSU%3D","line":63,"in_reply_to":"AAAAM3%2F%2BsWE%3D","updated":"2013-02-21 14:17:42.000000000","message":"Done","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"442a77370b16948556091bd32f695ebef8729292","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            # check if the configuration of l3 agent is compatible"},{"line_number":78,"context_line":"            # with the router"},{"line_number":79,"context_line":"            router_ids \u003d [router_id[0] for router_id in router_ids]"},{"line_number":80,"context_line":"            routers \u003d plugin.get_routers(context, filters\u003d{\u0027id\u0027: router_ids})"},{"line_number":81,"context_line":"            to_removed_ids \u003d []"},{"line_number":82,"context_line":"            for router in routers:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsRc%3D","line":79,"updated":"2013-02-21 14:45:05.000000000","message":"Not test this yet. But I guess router_id was string. router_id[0] should be a char?","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            # check if the configuration of l3 agent is compatible"},{"line_number":78,"context_line":"            # with the router"},{"line_number":79,"context_line":"            router_ids \u003d [router_id[0] for router_id in router_ids]"},{"line_number":80,"context_line":"            routers \u003d plugin.get_routers(context, filters\u003d{\u0027id\u0027: router_ids})"},{"line_number":81,"context_line":"            to_removed_ids \u003d []"},{"line_number":82,"context_line":"            for router in routers:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2BsPE%3D","line":79,"in_reply_to":"AAAAM3%2F%2BsRc%3D","updated":"2013-02-21 14:52:25.000000000","message":"router_id is a ()","commit_id":"253dab2a1ac900eaf90990fdcdc650286954c144"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":"                if not candidates:"},{"line_number":85,"context_line":"                    to_removed_ids.append(router[\u0027id\u0027])"},{"line_number":86,"context_line":"            router_ids \u003d list(set(router_ids) - set(to_removed_ids))"},{"line_number":87,"context_line":"            if not router_ids:"},{"line_number":88,"context_line":"                return False"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            # binding"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1A%3D","line":87,"updated":"2013-02-21 18:13:55.000000000","message":"maybe log for debugging","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":"                if not candidates:"},{"line_number":85,"context_line":"                    to_removed_ids.append(router[\u0027id\u0027])"},{"line_number":86,"context_line":"            router_ids \u003d list(set(router_ids) - set(to_removed_ids))"},{"line_number":87,"context_line":"            if not router_ids:"},{"line_number":88,"context_line":"                return False"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            # binding"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqvo%3D","line":87,"in_reply_to":"AAAAM3%2F%2Br1A%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # one active l3 agent hosting"},{"line_number":106,"context_line":"            l3_agents \u003d plugin.get_l3_agents_hosting_routers("},{"line_number":107,"context_line":"                context, [sync_router[\u0027id\u0027]], active\u003dTrue)"},{"line_number":108,"context_line":"            if l3_agents:"},{"line_number":109,"context_line":"                return False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            l3_agents \u003d plugin.get_l3_agents(context, active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1M%3D","line":108,"updated":"2013-02-21 18:13:55.000000000","message":"maybe worth logging - will help debug","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # one active l3 agent hosting"},{"line_number":106,"context_line":"            l3_agents \u003d plugin.get_l3_agents_hosting_routers("},{"line_number":107,"context_line":"                context, [sync_router[\u0027id\u0027]], active\u003dTrue)"},{"line_number":108,"context_line":"            if l3_agents:"},{"line_number":109,"context_line":"                return False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            l3_agents \u003d plugin.get_l3_agents(context, active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqvs%3D","line":108,"in_reply_to":"AAAAM3%2F%2Br1M%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":109,"context_line":"                return False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            l3_agents \u003d plugin.get_l3_agents(context, active\u003dTrue)"},{"line_number":112,"context_line":"            if not l3_agents:"},{"line_number":113,"context_line":"                return False"},{"line_number":114,"context_line":"            candidates \u003d plugin.get_candidate(sync_router, l3_agents)"},{"line_number":115,"context_line":"            if not candidates:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1I%3D","line":112,"updated":"2013-02-21 18:13:55.000000000","message":"ditto","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":109,"context_line":"                return False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            l3_agents \u003d plugin.get_l3_agents(context, active\u003dTrue)"},{"line_number":112,"context_line":"            if not l3_agents:"},{"line_number":113,"context_line":"                return False"},{"line_number":114,"context_line":"            candidates \u003d plugin.get_candidate(sync_router, l3_agents)"},{"line_number":115,"context_line":"            if not candidates:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqvw%3D","line":112,"in_reply_to":"AAAAM3%2F%2Br1I%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if not l3_agents:"},{"line_number":113,"context_line":"                return False"},{"line_number":114,"context_line":"            candidates \u003d plugin.get_candidate(sync_router, l3_agents)"},{"line_number":115,"context_line":"            if not candidates:"},{"line_number":116,"context_line":"                return False"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            index \u003d random.randint(0, len(candidates) - 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br1E%3D","line":115,"updated":"2013-02-21 18:13:55.000000000","message":"ditto","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if not l3_agents:"},{"line_number":113,"context_line":"                return False"},{"line_number":114,"context_line":"            candidates \u003d plugin.get_candidate(sync_router, l3_agents)"},{"line_number":115,"context_line":"            if not candidates:"},{"line_number":116,"context_line":"                return False"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            index \u003d random.randint(0, len(candidates) - 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqv0%3D","line":115,"in_reply_to":"AAAAM3%2F%2Br1E%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"}],"quantum/tests/unit/openvswitch/test_agent_scheduler.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"257c9cfc6913b86f0ac613c1db5636bf3255f454","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B1cc%3D","line":2,"updated":"2013-02-18 06:08:47.000000000","message":"might other plugins eventually use the bullk of these test methods in their own tests?  If so, should some of this be in a base class that can be used by multiple plugins?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":5,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2By4k%3D","line":2,"in_reply_to":"AAAAM3%2F%2B1cc%3D","updated":"2013-02-19 01:55:23.000000000","message":"Done","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from webob import exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from quantum.api import extensions"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Br04%3D","line":17,"updated":"2013-02-21 18:13:55.000000000","message":"please add tests when some of the hosts are in state disabled - to at least check that the scheduling is ok. sorry if i missed these (it has been a long day)","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from webob import exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from quantum.api import extensions"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bqvk%3D","line":17,"in_reply_to":"AAAAM3%2F%2Br04%3D","updated":"2013-02-22 04:29:19.000000000","message":"Done","commit_id":"1aa2e0bafafe8db13a1eac799289aa6e887d7ae4"}],"tox.ini":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"257c9cfc6913b86f0ac613c1db5636bf3255f454","unresolved":false,"context_lines":[{"line_number":26,"context_line":"#        query \u003d query.filter(Component.disabled \u003d\u003d False)"},{"line_number":27,"context_line":"# E125 continuation line does not distinguish itself from next logical line"},{"line_number":28,"context_line":"commands \u003d"},{"line_number":29,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125,E712 --exclude\u003d.venv,.tox,dist,doc,openstack,*egg ."},{"line_number":30,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125 --filename\u003dquantum* bin"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[testenv:i18n]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2B1cM%3D","line":29,"updated":"2013-02-18 06:08:47.000000000","message":"I\u0027m still trying to understand why we are changing our pep8 standards in this patch.   Is there a precedent by other projects that we should not be enforcing these particular pep8 rules?  If so, why not make this change as a separate patch?  If all other projects are fixing these pep8 issues (as presumably has quantum, since non exist in the code base before this patch), wouldn\u0027t we wan to have a discussion on the merits?","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"#        query \u003d query.filter(Component.disabled \u003d\u003d False)"},{"line_number":27,"context_line":"# E125 continuation line does not distinguish itself from next logical line"},{"line_number":28,"context_line":"commands \u003d"},{"line_number":29,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125,E712 --exclude\u003d.venv,.tox,dist,doc,openstack,*egg ."},{"line_number":30,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125 --filename\u003dquantum* bin"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[testenv:i18n]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2BzXs%3D","line":29,"in_reply_to":"AAAAM3%2F%2B1cM%3D","updated":"2013-02-18 22:34:44.000000000","message":"e712 can be avoided probably. Or at least we should make every possible effort to avoid changes to tox.ini\nI had the same issue when developing shared network.\n\nThe following worked for shared networks:\n                query_filter \u003d ((model.tenant_id \u003d\u003d context.tenant_id) |\n                                (model.shared))\n\nPerhaps query.filter(not Component.disabled) might work in this case","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"#        query \u003d query.filter(Component.disabled \u003d\u003d False)"},{"line_number":27,"context_line":"# E125 continuation line does not distinguish itself from next logical line"},{"line_number":28,"context_line":"commands \u003d"},{"line_number":29,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125,E712 --exclude\u003d.venv,.tox,dist,doc,openstack,*egg ."},{"line_number":30,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125 --filename\u003dquantum* bin"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[testenv:i18n]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2BtPA%3D","line":29,"in_reply_to":"AAAAM3%2F%2BvCA%3D","updated":"2013-02-21 01:33:49.000000000","message":"E712 is ignored by nova which seems like reasonable justification.  I see no precedent for ignoring E125.  I also think it makes sense to have a separate commit titled \"updated pep8 ignores to match nova\", rather than having them shoved in this patch.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"#        query \u003d query.filter(Component.disabled \u003d\u003d False)"},{"line_number":27,"context_line":"# E125 continuation line does not distinguish itself from next logical line"},{"line_number":28,"context_line":"commands \u003d"},{"line_number":29,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125,E712 --exclude\u003d.venv,.tox,dist,doc,openstack,*egg ."},{"line_number":30,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125 --filename\u003dquantum* bin"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[testenv:i18n]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2BvCA%3D","line":29,"in_reply_to":"AAAAM3%2F%2By4c%3D","updated":"2013-02-20 11:35:17.000000000","message":"I will have more tests if we can do without ignoring E712, But I see nova also ignores this one.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c8caeb8a29ec82f75aff25fe34e36a253e17a916","unresolved":false,"context_lines":[{"line_number":26,"context_line":"#        query \u003d query.filter(Component.disabled \u003d\u003d False)"},{"line_number":27,"context_line":"# E125 continuation line does not distinguish itself from next logical line"},{"line_number":28,"context_line":"commands \u003d"},{"line_number":29,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125,E712 --exclude\u003d.venv,.tox,dist,doc,openstack,*egg ."},{"line_number":30,"context_line":"  pep8 --repeat --show-source --ignore\u003dE125 --filename\u003dquantum* bin"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[testenv:i18n]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAM3%2F%2By4c%3D","line":29,"in_reply_to":"AAAAM3%2F%2BzXs%3D","updated":"2013-02-19 01:55:23.000000000","message":"I thought I have tried this method and failed. I will try again.","commit_id":"4651a8f3b102a6a7141fc98da6abd512bc44c3ee"}]}
