)]}'
{"quantum/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"                network \u003d plugin.get_network(adminContext, network_id)"},{"line_number":72,"context_line":"                chosen_agents \u003d plugin.schedule_network(adminContext, network)"},{"line_number":73,"context_line":"                if chosen_agents:"},{"line_number":74,"context_line":"                    for agent in chosen_agents:"},{"line_number":75,"context_line":"                        self._notification_host("},{"line_number":76,"context_line":"                            context, \u0027network_create_end\u0027,"},{"line_number":77,"context_line":"                            {\u0027network\u0027: {\u0027id\u0027: network_id}},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgYw%3D","line":74,"updated":"2013-05-07 14:57:31.000000000","message":"Can collapse 73-74 into:\n\nfor agent in chosen agents or []:","commit_id":"b0d2e8080e356a4dc22951b9fb53ba0481c90f19"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"                network \u003d plugin.get_network(adminContext, network_id)"},{"line_number":72,"context_line":"                chosen_agents \u003d plugin.schedule_network(adminContext, network)"},{"line_number":73,"context_line":"                if chosen_agents:"},{"line_number":74,"context_line":"                    for agent in chosen_agents:"},{"line_number":75,"context_line":"                        self._notification_host("},{"line_number":76,"context_line":"                            context, \u0027network_create_end\u0027,"},{"line_number":77,"context_line":"                            {\u0027network\u0027: {\u0027id\u0027: network_id}},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FaoE%3D","line":74,"in_reply_to":"AAAAOn%2F%2FeyY%3D","updated":"2013-05-10 09:26:20.000000000","message":"Indeed I think Mark\u0027s suggestion will work even when it\u0027s none?","commit_id":"b0d2e8080e356a4dc22951b9fb53ba0481c90f19"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"                network \u003d plugin.get_network(adminContext, network_id)"},{"line_number":72,"context_line":"                chosen_agents \u003d plugin.schedule_network(adminContext, network)"},{"line_number":73,"context_line":"                if chosen_agents:"},{"line_number":74,"context_line":"                    for agent in chosen_agents:"},{"line_number":75,"context_line":"                        self._notification_host("},{"line_number":76,"context_line":"                            context, \u0027network_create_end\u0027,"},{"line_number":77,"context_line":"                            {\u0027network\u0027: {\u0027id\u0027: network_id}},"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FeyY%3D","line":74,"in_reply_to":"AAAAOn%2F%2FgYw%3D","updated":"2013-05-08 10:58:22.000000000","message":"chosen_agents can be None.","commit_id":"b0d2e8080e356a4dc22951b9fb53ba0481c90f19"}],"quantum/manager.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":102,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":103,"context_line":"            LOG.critical(msg)"},{"line_number":104,"context_line":"            raise Exception(msg)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # core plugin as a part of plugin collection simplifies"},{"line_number":107,"context_line":"        # checking extensions"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F7AA%3D","line":104,"updated":"2013-05-20 08:28:23.000000000","message":"It is better to define a method to do this check in dhcp_agent_scheduler.py. My idea is to prepare a list of checker methods here, register a checker method to the list in dhcp_agent_scheduler.py and call the method list here.","commit_id":"9ea645706fccf22ba18f8657187b5705019fb050"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":102,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":103,"context_line":"            LOG.critical(msg)"},{"line_number":104,"context_line":"            raise Exception(msg)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # core plugin as a part of plugin collection simplifies"},{"line_number":107,"context_line":"        # checking extensions"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F4Gg%3D","line":104,"in_reply_to":"AAAAPH%2F%2F7AA%3D","updated":"2013-05-21 05:55:36.000000000","message":"Agreed. I\u0027ll provide the method for the scheduler validation. Hopefully after that we can add in the callbacks that you have suggested (which is a very good idea :))","commit_id":"9ea645706fccf22ba18f8657187b5705019fb050"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.plugin \u003d plugin_klass()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Validate the scheduler dhcp configuration"},{"line_number":101,"context_line":"        msg \u003d utils.validate_scheduler_config()"},{"line_number":102,"context_line":"        if msg:"},{"line_number":103,"context_line":"            LOG.critical(msg)"},{"line_number":104,"context_line":"            raise Exception(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPH%2F%2F3us%3D","line":101,"updated":"2013-05-21 09:38:53.000000000","message":"hi, I don\u0027t agree with this stuff in a standalone file. If we need to put it into a function, how about moving the function here.  To put it into a \u0027utils\u0027 does not make much sense since it is used only here.\nalso please see line 78-81, line 87-97, which are also config check codes.","commit_id":"d0ccfb2861a0d9f2f18d178474f199addeadda19"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.plugin \u003d plugin_klass()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Validate the scheduler dhcp configuration"},{"line_number":101,"context_line":"        msg \u003d utils.validate_scheduler_config()"},{"line_number":102,"context_line":"        if msg:"},{"line_number":103,"context_line":"            LOG.critical(msg)"},{"line_number":104,"context_line":"            raise Exception(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPH%2F%2F3TY%3D","line":101,"in_reply_to":"AAAAPH%2F%2F3r0%3D","updated":"2013-05-21 13:11:21.000000000","message":"Sorry my explanation is not clear. The current implementation in patch set 20 also looks good.\n\nAn approach in my mind is similar to \"register_dict_extend_funcs\" concept proposed in https://review.openstack.org/#/c/28479/3/quantum/db/l3_db.py .\nmanager.py is a generic module, so I would like to avoid the implementation specific procedures here as much as possible.","commit_id":"d0ccfb2861a0d9f2f18d178474f199addeadda19"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.plugin \u003d plugin_klass()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Validate the scheduler dhcp configuration"},{"line_number":101,"context_line":"        msg \u003d utils.validate_scheduler_config()"},{"line_number":102,"context_line":"        if msg:"},{"line_number":103,"context_line":"            LOG.critical(msg)"},{"line_number":104,"context_line":"            raise Exception(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPH%2F%2F3r0%3D","line":101,"in_reply_to":"AAAAPH%2F%2F3us%3D","updated":"2013-05-21 10:07:12.000000000","message":"i think that moving forwards akihiro wanted to have callback functions that would do the validations. hence i add the utils.\nWhat you suggested sounds reasonable. I am on it ...","commit_id":"d0ccfb2861a0d9f2f18d178474f199addeadda19"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"        cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":70,"context_line":"        msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":71,"context_line":"                \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":72,"context_line":"        LOG.debug(msg)"},{"line_number":73,"context_line":"        return msg"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3VE%3D","line":72,"updated":"2013-05-21 13:12:03.000000000","message":"The same message is output twice (L.72 and L.128)","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"        cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":70,"context_line":"        msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":71,"context_line":"                \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":72,"context_line":"        LOG.debug(msg)"},{"line_number":73,"context_line":"        return msg"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3HI%3D","line":72,"in_reply_to":"AAAAPH%2F%2F3VE%3D","updated":"2013-05-21 14:19:43.000000000","message":"Done","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    if cfg.CONF.core_plugin is None:"},{"line_number":83,"context_line":"        msg \u003d _(\u0027Quantum core_plugin not configured!\u0027)"},{"line_number":84,"context_line":"        LOG.debug(msg)"},{"line_number":85,"context_line":"        return msg"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3Uw%3D","line":84,"updated":"2013-05-21 13:12:03.000000000","message":"Ditto (here and L.103)","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    if cfg.CONF.core_plugin is None:"},{"line_number":83,"context_line":"        msg \u003d _(\u0027Quantum core_plugin not configured!\u0027)"},{"line_number":84,"context_line":"        LOG.debug(msg)"},{"line_number":85,"context_line":"        return msg"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3HE%3D","line":84,"in_reply_to":"AAAAPH%2F%2F3Uw%3D","updated":"2013-05-21 14:19:43.000000000","message":"Done","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.plugin \u003d plugin_klass()"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # Validate the scheduler dhcp configuration"},{"line_number":126,"context_line":"        msg \u003d validate_scheduler_config()"},{"line_number":127,"context_line":"        if msg:"},{"line_number":128,"context_line":"            LOG.critical(msg)"},{"line_number":129,"context_line":"            raise Exception(msg)"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3UA%3D","line":126,"updated":"2013-05-21 13:12:03.000000000","message":"How about using validate_config_after_core_plugin_loaded or something as the method name? At the moment, only the scheduler configuration is checked, but it is more generic. I am ok to leave it unchanged now and we can change another name if the situation changes.","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.plugin \u003d plugin_klass()"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # Validate the scheduler dhcp configuration"},{"line_number":126,"context_line":"        msg \u003d validate_scheduler_config()"},{"line_number":127,"context_line":"        if msg:"},{"line_number":128,"context_line":"            LOG.critical(msg)"},{"line_number":129,"context_line":"            raise Exception(msg)"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2F3HM%3D","line":126,"in_reply_to":"AAAAPH%2F%2F3UA%3D","updated":"2013-05-21 14:19:43.000000000","message":"Done","commit_id":"3473432af3beacfc53fcb80a4265f7bba2bec515"}],"quantum/scheduler/__init__.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"bad62a5bc3fe6c0bbab62cc3fb64268b5d24bca7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    cfg.BoolOpt(\u0027router_auto_schedule\u0027, default\u003dTrue,"},{"line_number":33,"context_line":"                help\u003d_(\u0027Allow auto scheduling routers to L3 agent.\u0027)),"},{"line_number":34,"context_line":"    cfg.IntOpt(\u0027dhcp_agents_per_network\u0027, default\u003d1,"},{"line_number":35,"context_line":"               help\u003d_(\u0027Number of DHCP agents scheduled to treat a network.\u0027)),"},{"line_number":36,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FmSs%3D","line":35,"updated":"2013-05-02 12:39:00.000000000","message":"(Pedantry) In the comments and log messages the verb \u0027host\u0027 is used instead of \u0027treat\u0027.","commit_id":"37ab046a7daac90bad95379d4a1c8f47c75ad0ea"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":32,"context_line":"    cfg.BoolOpt(\u0027router_auto_schedule\u0027, default\u003dTrue,"},{"line_number":33,"context_line":"                help\u003d_(\u0027Allow auto scheduling routers to L3 agent.\u0027)),"},{"line_number":34,"context_line":"    cfg.IntOpt(\u0027dhcp_agents_per_network\u0027, default\u003d1,"},{"line_number":35,"context_line":"               help\u003d_(\u0027Number of DHCP agents scheduled to treat a network.\u0027)),"},{"line_number":36,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FmQY%3D","line":35,"in_reply_to":"AAAAOn%2F%2FmSs%3D","updated":"2013-05-02 13:00:22.000000000","message":"Done","commit_id":"37ab046a7daac90bad95379d4a1c8f47c75ad0ea"}],"quantum/scheduler/dhcp_agent_scheduler.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9bde851370a52d5a2a5dd02fe586607b6dbd028e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            chosen_agents \u003d random.sample(active_dhcp_agents, n_agents)"},{"line_number":87,"context_line":"            for agent in chosen_agents:"},{"line_number":88,"context_line":"                self.schedule_bind_network(context, agent, network[\u0027id\u0027])"},{"line_number":89,"context_line":"        return chosen_agents[0]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def auto_schedule_networks(self, plugin, context, host):"},{"line_number":92,"context_line":"        \"\"\"Schedule non-hosted networks to the DHCP agent on"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FoEk%3D","line":89,"updated":"2013-05-01 13:34:47.000000000","message":"One of the indirect consumers of the schedule method is code at\nquantum/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py#L72\n\nIs it ok, that only one agent will be notified there?","commit_id":"17cca301383238742bf26be5741a2d9f9ae91016"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"            chosen_agents \u003d random.sample(active_dhcp_agents, n_agents)"},{"line_number":87,"context_line":"            for agent in chosen_agents:"},{"line_number":88,"context_line":"                self.schedule_bind_network(context, agent, network[\u0027id\u0027])"},{"line_number":89,"context_line":"        return chosen_agents[0]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def auto_schedule_networks(self, plugin, context, host):"},{"line_number":92,"context_line":"        \"\"\"Schedule non-hosted networks to the DHCP agent on"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FnqM%3D","line":89,"in_reply_to":"AAAAOn%2F%2FoEk%3D","updated":"2013-05-01 16:54:14.000000000","message":"Good catch. I will update.","commit_id":"17cca301383238742bf26be5741a2d9f9ae91016"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"        is no active DHCP agent hosting it."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"},{"line_number":55,"context_line":"            cfg.CONF.dhcp_agents_per_network \u003d\u003d 0):"},{"line_number":56,"context_line":"            agents_per_network \u003d 1"},{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FjBc%3D","line":55,"updated":"2013-05-05 16:09:51.000000000","message":"How can dhcp_agents_per_network be set to None?\nAlso, I think it\u0027s possible to set it to a negative value, so the check should take that into account.\n\nAnd finally, I would raise rather than implicitly setting it to 1. What do you reckon?","commit_id":"60222032e82aa4c3f6b0686b167716175c667c83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"        is no active DHCP agent hosting it."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"},{"line_number":55,"context_line":"            cfg.CONF.dhcp_agents_per_network \u003d\u003d 0):"},{"line_number":56,"context_line":"            agents_per_network \u003d 1"},{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Fipo%3D","line":55,"in_reply_to":"AAAAOn%2F%2FjBc%3D","updated":"2013-05-06 08:55:05.000000000","message":"By default if the value is not set then it is returned as None by the cfg module.\nI\u0027ll update as you have suggested.","commit_id":"60222032e82aa4c3f6b0686b167716175c667c83"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"    can be introduced later."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def schedule_bind_network(self, context, agent, network_id):"},{"line_number":42,"context_line":"        binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":43,"context_line":"        binding.dhcp_agent \u003d agent"},{"line_number":44,"context_line":"        binding.network_id \u003d network_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fikw%3D","line":41,"updated":"2013-05-06 10:11:48.000000000","message":"maybe start it with \u0027_\u0027 to indicate it is a private function.","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"    can be introduced later."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def schedule_bind_network(self, context, agent, network_id):"},{"line_number":42,"context_line":"        binding \u003d agentschedulers_db.NetworkDhcpAgentBinding()"},{"line_number":43,"context_line":"        binding.dhcp_agent \u003d agent"},{"line_number":44,"context_line":"        binding.network_id \u003d network_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fijw%3D","line":41,"in_reply_to":"AAAAOn%2F%2Fikw%3D","updated":"2013-05-06 11:05:07.000000000","message":"Done","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                   \u0027agent_id\u0027: agent})"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def schedule(self, plugin, context, network):"},{"line_number":52,"context_line":"        \"\"\"Schedule the network to an active DHCP agent if there"},{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fik0%3D","line":52,"updated":"2013-05-06 10:11:48.000000000","message":"change the comment accordingly please.","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                   \u0027agent_id\u0027: agent})"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def schedule(self, plugin, context, network):"},{"line_number":52,"context_line":"        \"\"\"Schedule the network to an active DHCP agent if there"},{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fijs%3D","line":52,"in_reply_to":"AAAAOn%2F%2Fik0%3D","updated":"2013-05-06 11:05:07.000000000","message":"Done","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"},{"line_number":59,"context_line":"            cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":60,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":61,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fif8%3D","line":58,"updated":"2013-05-06 11:42:45.000000000","message":"intOpt is possible to be None?","commit_id":"e52eb9320ec272370cb1f67771a5cb19a3e63ccc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network is None or"},{"line_number":59,"context_line":"            cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":60,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":61,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fifo%3D","line":58,"in_reply_to":"AAAAOn%2F%2Fif8%3D","updated":"2013-05-06 11:51:03.000000000","message":"It is possible when:\n    cfg.IntOpt(\u0027dhcp_agents_per_network\u0027,\n               help\u003d_(\u0027Number of DHCP agents scheduled to host a network.\u0027)),\n\nThe fact that the default in the code is 1 should ensure that it is never None. I\u0027ll remove the None.","commit_id":"e52eb9320ec272370cb1f67771a5cb19a3e63ccc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"            if not enabled_dhcp_agents:"},{"line_number":80,"context_line":"                LOG.warn(_(\u0027No enabled DHCP agents\u0027))"},{"line_number":81,"context_line":"                return"},{"line_number":82,"context_line":"            active_dhcp_agents \u003d [enabled_dhcp_agent for enabled_dhcp_agent in"},{"line_number":83,"context_line":"                                  enabled_dhcp_agents if not"},{"line_number":84,"context_line":"                                  agents_db.AgentDbMixin.is_agent_down("},{"line_number":85,"context_line":"                                  enabled_dhcp_agent[\u0027heartbeat_timestamp\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgX0%3D","line":82,"updated":"2013-05-07 14:57:31.000000000","message":"Consider reformatting a bit to make this easier to read:\n\nactive_dhcp_agents \u003d [\n    agent for agent in (set(enabled_dhcp_agents)\n    if not agents_db.AgentDbMixin.is_agent_down(agent[\u0027heartbeat_timestamp\u0027])\n    and agent not in dhcp_agents\n]","commit_id":"b0d2e8080e356a4dc22951b9fb53ba0481c90f19"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"            if not enabled_dhcp_agents:"},{"line_number":80,"context_line":"                LOG.warn(_(\u0027No enabled DHCP agents\u0027))"},{"line_number":81,"context_line":"                return"},{"line_number":82,"context_line":"            active_dhcp_agents \u003d [enabled_dhcp_agent for enabled_dhcp_agent in"},{"line_number":83,"context_line":"                                  enabled_dhcp_agents if not"},{"line_number":84,"context_line":"                                  agents_db.AgentDbMixin.is_agent_down("},{"line_number":85,"context_line":"                                  enabled_dhcp_agent[\u0027heartbeat_timestamp\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FYgE%3D","line":82,"in_reply_to":"AAAAOn%2F%2FgX0%3D","updated":"2013-05-15 05:52:26.000000000","message":"Done","commit_id":"b0d2e8080e356a4dc22951b9fb53ba0481c90f19"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def schedule(self, plugin, context, network):"},{"line_number":52,"context_line":"        \"\"\"Schedule the network to active DHCP agent(s) if there"},{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2F5w%3D","line":53,"updated":"2013-05-15 06:47:18.000000000","message":"\"if there is no active DHCP agent hosting it\" is not true anymore.","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def schedule(self, plugin, context, network):"},{"line_number":52,"context_line":"        \"\"\"Schedule the network to active DHCP agent(s) if there"},{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2B7g%3D","line":53,"in_reply_to":"AAAAO3%2F%2F%2F5w%3D","updated":"2013-05-15 15:51:21.000000000","message":"Done","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":59,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2F5s%3D","line":56,"updated":"2013-05-15 06:47:18.000000000","message":"It is better to describe that this method returns a list of new scheduled dhcp agents.","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"        is no active DHCP agent hosting it."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        One or more agents can be scheduled. At the moment this is"},{"line_number":56,"context_line":"        global."},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":59,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2B7Y%3D","line":56,"in_reply_to":"AAAAO3%2F%2F%2F5s%3D","updated":"2013-05-15 15:51:21.000000000","message":"Done","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":59,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":60,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":61,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2F6A%3D","line":61,"updated":"2013-05-15 06:47:18.000000000","message":"Sice schedule() is called in dhcp agent rpc notifier, this results in the situation where the notification is not completed, port-create REST API returns an error, but the port itself is created with DOWN status. I think it is a little tricky to users.\n\nIMO, it is better to check the config variable when the plugin starts.","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":58,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":59,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":60,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":61,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2B50%3D","line":61,"in_reply_to":"AAAAO3%2F%2F%2F6A%3D","updated":"2013-05-15 15:51:21.000000000","message":"Done","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":78,"context_line":"                    \u0027admin_state_up\u0027: [True]})"},{"line_number":79,"context_line":"            if not enabled_dhcp_agents:"},{"line_number":80,"context_line":"                LOG.warn(_(\u0027No enabled DHCP agents\u0027))"},{"line_number":81,"context_line":"                return"},{"line_number":82,"context_line":"            active_dhcp_agents \u003d ["},{"line_number":83,"context_line":"                agent for agent in set(enabled_dhcp_agents)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2F5c%3D","line":80,"updated":"2013-05-15 06:47:18.000000000","message":"\"No (more) enabled DHCP agents\" is better since this warning is logged even if one dhcp agent is active and dhcp_agents_per_network is 2.","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    \u0027agent_type\u0027: [constants.AGENT_TYPE_DHCP],"},{"line_number":78,"context_line":"                    \u0027admin_state_up\u0027: [True]})"},{"line_number":79,"context_line":"            if not enabled_dhcp_agents:"},{"line_number":80,"context_line":"                LOG.warn(_(\u0027No enabled DHCP agents\u0027))"},{"line_number":81,"context_line":"                return"},{"line_number":82,"context_line":"            active_dhcp_agents \u003d ["},{"line_number":83,"context_line":"                agent for agent in set(enabled_dhcp_agents)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2B7I%3D","line":80,"in_reply_to":"AAAAO3%2F%2F%2F5c%3D","updated":"2013-05-15 15:51:21.000000000","message":"Done","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"                and agent not in dhcp_agents"},{"line_number":87,"context_line":"            ]"},{"line_number":88,"context_line":"            if not active_dhcp_agents:"},{"line_number":89,"context_line":"                LOG.warn(_(\u0027No active DHCP agents\u0027))"},{"line_number":90,"context_line":"                return"},{"line_number":91,"context_line":"            n_agents \u003d min(len(active_dhcp_agents), n_agents)"},{"line_number":92,"context_line":"            chosen_agents \u003d random.sample(active_dhcp_agents, n_agents)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2F5M%3D","line":89,"updated":"2013-05-15 06:47:18.000000000","message":"Ditto","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"                and agent not in dhcp_agents"},{"line_number":87,"context_line":"            ]"},{"line_number":88,"context_line":"            if not active_dhcp_agents:"},{"line_number":89,"context_line":"                LOG.warn(_(\u0027No active DHCP agents\u0027))"},{"line_number":90,"context_line":"                return"},{"line_number":91,"context_line":"            n_agents \u003d min(len(active_dhcp_agents), n_agents)"},{"line_number":92,"context_line":"            chosen_agents \u003d random.sample(active_dhcp_agents, n_agents)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAO3%2F%2F%2B60%3D","line":89,"in_reply_to":"AAAAO3%2F%2F%2F5M%3D","updated":"2013-05-15 15:51:21.000000000","message":"Done","commit_id":"e1643b1af2ecd6e16ede055051141f6a490909bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":57,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":58,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":59,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAO3%2F%2F9Do%3D","line":59,"updated":"2013-05-16 08:22:16.000000000","message":"There looks no change from patch set 9. I still got an error in port-create when I set dhcp_agents_per_network to 0. But I think it doesn\u0027t matter a lot and am ok to keep it unchanged.","commit_id":"f8484ae59ad83157894887714f3999bf74cfc506"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if (cfg.CONF.dhcp_agents_per_network \u003c\u003d 0):"},{"line_number":57,"context_line":"            msg \u003d _(\"dhcp_agents_per_network must be \u003e\u003d 1. \u0027%s\u0027 \""},{"line_number":58,"context_line":"                    \"is invalid.\") % cfg.CONF.dhcp_agents_per_network"},{"line_number":59,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            agents_per_network \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAO3%2F%2F8%2B4%3D","line":59,"in_reply_to":"AAAAO3%2F%2F9Do%3D","updated":"2013-05-16 09:09:26.000000000","message":"Sorry I tried to address this one but was unsuccessful. Can I do it in an additional patch?","commit_id":"f8484ae59ad83157894887714f3999bf74cfc506"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self._schedule_bind_network(context, agent, network[\u0027id\u0027])"},{"line_number":87,"context_line":"        return chosen_agents"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def auto_schedule_networks(self, plugin, context, host):"},{"line_number":90,"context_line":"        \"\"\"Schedule non-hosted networks to the DHCP agent on"},{"line_number":91,"context_line":"        the specified host."},{"line_number":92,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2F%2FEo%3D","line":89,"updated":"2013-05-17 03:56:00.000000000","message":"shouldn\u0027t we change this method to make the scheduler consistent?\nauto schedule is used when agent is started after ports are created.","commit_id":"d0e3430830dfbff623ca325c2dda4672910e7772"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self._schedule_bind_network(context, agent, network[\u0027id\u0027])"},{"line_number":87,"context_line":"        return chosen_agents"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def auto_schedule_networks(self, plugin, context, host):"},{"line_number":90,"context_line":"        \"\"\"Schedule non-hosted networks to the DHCP agent on"},{"line_number":91,"context_line":"        the specified host."},{"line_number":92,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2F7xw%3D","line":89,"in_reply_to":"AAAAPH%2F%2F%2FEo%3D","updated":"2013-05-19 09:10:36.000000000","message":"Done","commit_id":"d0e3430830dfbff623ca325c2dda4672910e7772"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"                fields \u003d [\u0027network_id\u0027, \u0027enable_dhcp\u0027]"},{"line_number":105,"context_line":"                subnets \u003d plugin.get_subnets(context, fields\u003dfields)"},{"line_number":106,"context_line":"                net_ids \u003d [s[\u0027network_id\u0027] for s in subnets"},{"line_number":107,"context_line":"                           if s[\u0027enable_dhcp\u0027]]"},{"line_number":108,"context_line":"                if not net_ids:"},{"line_number":109,"context_line":"                    LOG.debug(_(\u0027No non-hosted networks\u0027))"},{"line_number":110,"context_line":"                    return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F7JA%3D","line":107,"updated":"2013-05-20 05:50:09.000000000","message":"whether should we  use set to prevent the same net_id from occurring multiple times in net_ids?","commit_id":"1cc29b0ff62b2684bd6579c8ead12b73d7095eb3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"                fields \u003d [\u0027network_id\u0027, \u0027enable_dhcp\u0027]"},{"line_number":105,"context_line":"                subnets \u003d plugin.get_subnets(context, fields\u003dfields)"},{"line_number":106,"context_line":"                net_ids \u003d [s[\u0027network_id\u0027] for s in subnets"},{"line_number":107,"context_line":"                           if s[\u0027enable_dhcp\u0027]]"},{"line_number":108,"context_line":"                if not net_ids:"},{"line_number":109,"context_line":"                    LOG.debug(_(\u0027No non-hosted networks\u0027))"},{"line_number":110,"context_line":"                    return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F7C0%3D","line":107,"in_reply_to":"AAAAPH%2F%2F7JA%3D","updated":"2013-05-20 07:35:40.000000000","message":"good point :). i\u0027ll look into this.","commit_id":"1cc29b0ff62b2684bd6579c8ead12b73d7095eb3"}],"quantum/tests/unit/openvswitch/test_agent_scheduler.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def test_network_ha_scheduling_on_port_creation(self):"},{"line_number":318,"context_line":"        n_agents \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":319,"context_line":"        cfg.CONF.set_override(\u0027dhcp_agents_per_network\u0027, 2)"},{"line_number":320,"context_line":"        with self.subnet() as subnet:"},{"line_number":321,"context_line":"            dhcp_agents \u003d self._list_dhcp_agents_hosting_network("},{"line_number":322,"context_line":"                subnet[\u0027subnet\u0027][\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FilE%3D","line":319,"updated":"2013-05-06 10:11:48.000000000","message":"I don\u0027t think we need to save old value. the set_override will take it care of.","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def test_network_ha_scheduling_on_port_creation(self):"},{"line_number":318,"context_line":"        n_agents \u003d cfg.CONF.dhcp_agents_per_network"},{"line_number":319,"context_line":"        cfg.CONF.set_override(\u0027dhcp_agents_per_network\u0027, 2)"},{"line_number":320,"context_line":"        with self.subnet() as subnet:"},{"line_number":321,"context_line":"            dhcp_agents \u003d self._list_dhcp_agents_hosting_network("},{"line_number":322,"context_line":"                subnet[\u0027subnet\u0027][\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fijo%3D","line":319,"in_reply_to":"AAAAOn%2F%2FilE%3D","updated":"2013-05-06 11:05:07.000000000","message":"Done","commit_id":"8fb742a6cec8efe7740c67cfd85a974634258a55"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":328,"context_line":"                result1 \u003d len(dhcp_agents[\u0027agents\u0027])"},{"line_number":329,"context_line":"        self.assertEqual(0, result0)"},{"line_number":330,"context_line":"        self.assertEqual(2, result1)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_network_scheduler_with_disabled_agent(self):"},{"line_number":333,"context_line":"        dhcp_hosta \u003d {"},{"line_number":334,"context_line":"            \u0027binary\u0027: \u0027quantum-dhcp-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fif4%3D","line":331,"updated":"2013-05-06 11:42:45.000000000","message":"can we add one more case where we have already one agent hosting the network, and then we will schedule more dhcpagents?","commit_id":"e52eb9320ec272370cb1f67771a5cb19a3e63ccc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":328,"context_line":"                result1 \u003d len(dhcp_agents[\u0027agents\u0027])"},{"line_number":329,"context_line":"        self.assertEqual(0, result0)"},{"line_number":330,"context_line":"        self.assertEqual(2, result1)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_network_scheduler_with_disabled_agent(self):"},{"line_number":333,"context_line":"        dhcp_hosta \u003d {"},{"line_number":334,"context_line":"            \u0027binary\u0027: \u0027quantum-dhcp-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fifg%3D","line":331,"in_reply_to":"AAAAOn%2F%2Fif4%3D","updated":"2013-05-06 11:51:03.000000000","message":"Sure. I\u0027ll add it.","commit_id":"e52eb9320ec272370cb1f67771a5cb19a3e63ccc"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":879,"context_line":"                    \u0027agent_updated\u0027,"},{"line_number":880,"context_line":"                    payload\u003d{\u0027admin_state_up\u0027: False}),"},{"line_number":881,"context_line":"                topic\u003d\u0027dhcp_agent.\u0027 + DHCP_HOSTA)"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def test_network_port_create_notification(self):"},{"line_number":884,"context_line":"        dhcp_hosta \u003d {"},{"line_number":885,"context_line":"            \u0027binary\u0027: \u0027quantum-dhcp-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2F%2FFQ%3D","line":882,"updated":"2013-05-17 03:56:00.000000000","message":"can we add a case here for  cfg.CONF.set_override(\u0027dhcp_agents_per_network\u0027, 2)? since it should cast more msg","commit_id":"d0e3430830dfbff623ca325c2dda4672910e7772"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":879,"context_line":"                    \u0027agent_updated\u0027,"},{"line_number":880,"context_line":"                    payload\u003d{\u0027admin_state_up\u0027: False}),"},{"line_number":881,"context_line":"                topic\u003d\u0027dhcp_agent.\u0027 + DHCP_HOSTA)"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def test_network_port_create_notification(self):"},{"line_number":884,"context_line":"        dhcp_hosta \u003d {"},{"line_number":885,"context_line":"            \u0027binary\u0027: \u0027quantum-dhcp-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2F7xA%3D","line":882,"in_reply_to":"AAAAPH%2F%2F%2FFQ%3D","updated":"2013-05-19 09:10:36.000000000","message":"Done","commit_id":"d0e3430830dfbff623ca325c2dda4672910e7772"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":283,"context_line":"            hostc_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":284,"context_line":"                                          DHCP_HOSTC)"},{"line_number":285,"context_line":"            dhcp_rpc.get_active_networks(self.adminContext, host\u003dDHCP_HOSTA)"},{"line_number":286,"context_line":"            # second agent will host all the networks since first is disabled."},{"line_number":287,"context_line":"            dhcp_rpc.get_active_networks(self.adminContext, host\u003dDHCP_HOSTC)"},{"line_number":288,"context_line":"            networks \u003d self._list_networks_hosted_by_dhcp_agent(hostc_id)"},{"line_number":289,"context_line":"            num_hostc_nets \u003d len(networks[\u0027networks\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F7I0%3D","line":286,"updated":"2013-05-20 05:50:09.000000000","message":"do we need this comment?","commit_id":"1cc29b0ff62b2684bd6579c8ead12b73d7095eb3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":283,"context_line":"            hostc_id \u003d self._get_agent_id(constants.AGENT_TYPE_DHCP,"},{"line_number":284,"context_line":"                                          DHCP_HOSTC)"},{"line_number":285,"context_line":"            dhcp_rpc.get_active_networks(self.adminContext, host\u003dDHCP_HOSTA)"},{"line_number":286,"context_line":"            # second agent will host all the networks since first is disabled."},{"line_number":287,"context_line":"            dhcp_rpc.get_active_networks(self.adminContext, host\u003dDHCP_HOSTC)"},{"line_number":288,"context_line":"            networks \u003d self._list_networks_hosted_by_dhcp_agent(hostc_id)"},{"line_number":289,"context_line":"            num_hostc_nets \u003d len(networks[\u0027networks\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F7Cw%3D","line":286,"in_reply_to":"AAAAPH%2F%2F7I0%3D","updated":"2013-05-20 07:35:40.000000000","message":"Done","commit_id":"1cc29b0ff62b2684bd6579c8ead12b73d7095eb3"}]}
