)]}'
{"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":533,"context_line":"    def get_ha_sync_data_for_host(self, context, host\u003dNone, agent\u003dNone,"},{"line_number":534,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":535,"context_line":"        dvr_agent_mode \u003d False"},{"line_number":536,"context_line":"        if host and agent:"},{"line_number":537,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":538,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":539,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_9ca99b26","line":536,"updated":"2015-11-12 08:57:35.000000000","message":"Why would the host be in the if condition? I don\u0027t see it is used in the if~","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2b4cc506f75afe00c86aa12a79baf61e0063a9a4","unresolved":false,"context_lines":[{"line_number":533,"context_line":"    def get_ha_sync_data_for_host(self, context, host\u003dNone, agent\u003dNone,"},{"line_number":534,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":535,"context_line":"        dvr_agent_mode \u003d False"},{"line_number":536,"context_line":"        if host and agent:"},{"line_number":537,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":538,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":539,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_374f2894","line":536,"in_reply_to":"da85f559_9ca99b26","updated":"2015-11-16 16:33:08.000000000","message":"Well, I just want to do a quick check here. It\u0027s the way how we get sync_data in L545-546 and L548-549, the former will need host, but not the later one, so if host is None here, we can directly go to get_sync_data without checking agent_mode. Hope this makes sense to you. :)","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        if host and agent:"},{"line_number":537,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":538,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":539,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"},{"line_number":540,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":541,"context_line":"                                             constants.L3_AGENT_MODE_DVR])"},{"line_number":542,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_bcec9fbb","line":539,"updated":"2015-11-12 08:57:35.000000000","message":"Try using self._get_agent_mode(agent) here.","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"3544adeb986c73b5b779d3ceedff81e6c00d5d82","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        if host and agent:"},{"line_number":537,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":538,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":539,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"},{"line_number":540,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":541,"context_line":"                                             constants.L3_AGENT_MODE_DVR])"},{"line_number":542,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_4ba98bde","line":539,"in_reply_to":"da85f559_bcec9fbb","updated":"2015-11-18 05:38:59.000000000","message":"Done","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2b4cc506f75afe00c86aa12a79baf61e0063a9a4","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        if host and agent:"},{"line_number":537,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":538,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":539,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"},{"line_number":540,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":541,"context_line":"                                             constants.L3_AGENT_MODE_DVR])"},{"line_number":542,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_e9f6a8d6","line":539,"in_reply_to":"da85f559_bcec9fbb","updated":"2015-11-16 16:33:08.000000000","message":"I checked inherit relationship of L3_HA_NAT_db_mixin, seems we cannot directly use that method here.","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e7787d976b76342fc7a5e6fb7ce3ebe6a12c1360","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if host and agent:"},{"line_number":538,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":539,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":540,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"},{"line_number":541,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":542,"context_line":"                                             constants.L3_AGENT_MODE_DVR])"},{"line_number":543,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_0c0f68e2","line":540,"updated":"2015-11-16 23:03:38.000000000","message":"nit: There is a _get_agent_mode() method in l3_agentschedulers_db.py that does these two, can it not be used (or moved) so you don\u0027t duplicate code?","commit_id":"342cdcb8c198a69cf94372bd3f009934fb513b2a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"0f279f9239e34ef26844154d717da3992d2195e6","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if host and agent:"},{"line_number":538,"context_line":"            agent_conf \u003d self.get_configuration_dict(agent)"},{"line_number":539,"context_line":"            agent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,"},{"line_number":540,"context_line":"                                        constants.L3_AGENT_MODE_LEGACY)"},{"line_number":541,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":542,"context_line":"                                             constants.L3_AGENT_MODE_DVR])"},{"line_number":543,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_ebb07f45","line":540,"in_reply_to":"ba8a016a_0c0f68e2","updated":"2015-11-18 05:39:09.000000000","message":"Done","commit_id":"342cdcb8c198a69cf94372bd3f009934fb513b2a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eb0e1fea16cfc43142de7897faa9de216e44ca89","unresolved":false,"context_lines":[{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def get_ha_sync_data_for_host(self, context, host\u003dNone, agent\u003dNone,"},{"line_number":535,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":536,"context_line":"        dvr_agent_mode \u003d False"},{"line_number":537,"context_line":"        if host and agent:"},{"line_number":538,"context_line":"            agent_mode \u003d self._get_agent_mode(agent)"},{"line_number":539,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_b3dfff38","line":536,"updated":"2016-01-06 11:34:51.000000000","message":"wouldn\u0027t it be safer to default this to True so if this function is called without an agent it defaults to the original behavior of providing all info?","commit_id":"77dee37a96372903683dc7f249a8878381223ce8"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"366ca4eec45ab242db2d27e2596e7733d52e98ac","unresolved":false,"context_lines":[{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def get_ha_sync_data_for_host(self, context, host\u003dNone, agent\u003dNone,"},{"line_number":535,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":536,"context_line":"        dvr_agent_mode \u003d False"},{"line_number":537,"context_line":"        if host and agent:"},{"line_number":538,"context_line":"            agent_mode \u003d self._get_agent_mode(agent)"},{"line_number":539,"context_line":"            dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_b8e80cb4","line":536,"in_reply_to":"fa69d971_b3dfff38","updated":"2016-01-08 05:04:48.000000000","message":"I know your points about no agent pass-in case, but seems get_snyc_data is the one will providing all info, without additional filter processing for DVR scenario.","commit_id":"77dee37a96372903683dc7f249a8878381223ce8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9ffcc6c9ea327c8fb5b1fafd17f1efac2b212e8e","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    def get_ha_sync_data_for_host(self, context, host, agent,"},{"line_number":592,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":593,"context_line":"        agent_mode \u003d self._get_agent_mode(agent)"},{"line_number":594,"context_line":"        dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":595,"context_line":"                                         constants.L3_AGENT_MODE_DVR])"},{"line_number":596,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("},{"line_number":597,"context_line":"                self, constants.L3_DISTRIBUTED_EXT_ALIAS)):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6ed579_f503e3bc","line":594,"range":{"start_line":594,"start_character":8,"end_line":594,"end_character":22},"updated":"2016-01-15 23:43:53.000000000","message":"Make it clear this is a boolean by naming it is_dvr_agent_mode","commit_id":"294324d6970980e8f95f441727204c66478b4684"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9ffcc6c9ea327c8fb5b1fafd17f1efac2b212e8e","unresolved":false,"context_lines":[{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def get_ha_sync_data_for_host(self, context, host, agent,"},{"line_number":592,"context_line":"                                  router_ids\u003dNone, active\u003dNone):"},{"line_number":593,"context_line":"        agent_mode \u003d self._get_agent_mode(agent)"},{"line_number":594,"context_line":"        dvr_agent_mode \u003d (agent_mode in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":595,"context_line":"                                         constants.L3_AGENT_MODE_DVR])"},{"line_number":596,"context_line":"        if (dvr_agent_mode and n_utils.is_extension_supported("},{"line_number":597,"context_line":"                self, constants.L3_DISTRIBUTED_EXT_ALIAS)):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6ed579_3575fb31","line":594,"range":{"start_line":593,"start_character":0,"end_line":594,"end_character":74},"updated":"2016-01-15 23:43:53.000000000","message":"These lines are meaningless if the is_extension_supported call below is False.  For that reason, I think the following would read more naturally:\n\n  is_dvr \u003d n_utils.is_extension_supported(\n      self, constants.L3_DISTRIBUTED_EXT_ALIAS)\n  is_dvr |\u003d (self._get_agent_mode(agent) in [...])\n  if is_dvr:\n      ...\n  else:\n      ...","commit_id":"294324d6970980e8f95f441727204c66478b4684"}],"neutron/tests/unit/db/test_l3_hamode_db.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"9a3bcb9e5e8c72d9d4d32947e6a101b4a3a5be88","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):"},{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertFalse(self.plugin.get_configuration_dict("},{"line_number":272,"context_line":"                         self.agent1).get(constants.L3_AGENT_MODE)"},{"line_number":273,"context_line":"                         in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":274,"context_line":"                             constants.L3_AGENT_MODE_DVR])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_187d3c6e","line":271,"updated":"2015-10-29 10:21:25.000000000","message":"Should be used assertNotIn","commit_id":"aa07d8f5a93f366f90a1b5b696ea82d5e6e6dcfd"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"41303b14c4e105618b5747839b08769790d016f7","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):"},{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertFalse(self.plugin.get_configuration_dict("},{"line_number":272,"context_line":"                         self.agent1).get(constants.L3_AGENT_MODE)"},{"line_number":273,"context_line":"                         in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":274,"context_line":"                             constants.L3_AGENT_MODE_DVR])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_93ba8f22","line":271,"in_reply_to":"1a26ad4f_187d3c6e","updated":"2015-10-29 11:02:20.000000000","message":"Done","commit_id":"aa07d8f5a93f366f90a1b5b696ea82d5e6e6dcfd"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"9a3bcb9e5e8c72d9d4d32947e6a101b4a3a5be88","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertTrue(self.plugin.get_configuration_dict("},{"line_number":287,"context_line":"                        self.agent2).get(constants.L3_AGENT_MODE)"},{"line_number":288,"context_line":"                        in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                            constants.L3_AGENT_MODE_DVR])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_d8dee46c","line":286,"updated":"2015-10-29 10:21:25.000000000","message":"You should use assertIn","commit_id":"aa07d8f5a93f366f90a1b5b696ea82d5e6e6dcfd"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"41303b14c4e105618b5747839b08769790d016f7","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertTrue(self.plugin.get_configuration_dict("},{"line_number":287,"context_line":"                        self.agent2).get(constants.L3_AGENT_MODE)"},{"line_number":288,"context_line":"                        in [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                            constants.L3_AGENT_MODE_DVR])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_b3b54b32","line":286,"in_reply_to":"1a26ad4f_d8dee46c","updated":"2015-10-29 11:02:20.000000000","message":"Done . Thanks :)","commit_id":"aa07d8f5a93f366f90a1b5b696ea82d5e6e6dcfd"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"badc835ac29f3c6d183f7b31936a159e5769dbca","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertNotIn(self.plugin.get_configuration_dict("},{"line_number":272,"context_line":"                         self.agent1).get(constants.L3_AGENT_MODE),"},{"line_number":273,"context_line":"                         [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":274,"context_line":"                          constants.L3_AGENT_MODE_DVR])"},{"line_number":275,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_fba59546","line":272,"updated":"2015-11-02 07:07:26.000000000","message":"Indentation should be increased because it\u0027s parameter for get_configuration_dict","commit_id":"8ddf97fca34740e14357b8d885a6cc2df24bc0e1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"3ec442d2b3ccfada2cabbc5a663201b821105aa5","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertNotIn(self.plugin.get_configuration_dict("},{"line_number":272,"context_line":"                         self.agent1).get(constants.L3_AGENT_MODE),"},{"line_number":273,"context_line":"                         [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":274,"context_line":"                          constants.L3_AGENT_MODE_DVR])"},{"line_number":275,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_5e1ef75f","line":272,"in_reply_to":"1a26ad4f_fba59546","updated":"2015-11-02 07:18:19.000000000","message":"Done","commit_id":"8ddf97fca34740e14357b8d885a6cc2df24bc0e1"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"badc835ac29f3c6d183f7b31936a159e5769dbca","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertIn(self.plugin.get_configuration_dict("},{"line_number":287,"context_line":"                      self.agent2).get(constants.L3_AGENT_MODE),"},{"line_number":288,"context_line":"                      [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                       constants.L3_AGENT_MODE_DVR])"},{"line_number":290,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_bb6abdec","line":287,"updated":"2015-11-02 07:07:26.000000000","message":"Same situation here","commit_id":"8ddf97fca34740e14357b8d885a6cc2df24bc0e1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"3ec442d2b3ccfada2cabbc5a663201b821105aa5","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertIn(self.plugin.get_configuration_dict("},{"line_number":287,"context_line":"                      self.agent2).get(constants.L3_AGENT_MODE),"},{"line_number":288,"context_line":"                      [constants.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                       constants.L3_AGENT_MODE_DVR])"},{"line_number":290,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_7e23b3a7","line":287,"in_reply_to":"1a26ad4f_bb6abdec","updated":"2015-11-02 07:18:19.000000000","message":"Done","commit_id":"8ddf97fca34740e14357b8d885a6cc2df24bc0e1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertNotIn("},{"line_number":272,"context_line":"            self.plugin.get_configuration_dict(self.agent1).get("},{"line_number":273,"context_line":"                constants.L3_AGENT_MODE),"},{"line_number":274,"context_line":"            [constants.L3_AGENT_MODE_DVR_SNAT, constants.L3_AGENT_MODE_DVR])"},{"line_number":275,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_705c1b7d","line":272,"updated":"2015-11-12 08:57:35.000000000","message":"Try using self.plugin._get_agent_mode(self.agent1) here. \n\nActually, I don\u0027t think the assert here has any meaning. agent1 was created at setup. It is legacy, if no one change the code there. What do you think?","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2b4cc506f75afe00c86aa12a79baf61e0063a9a4","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        router \u003d self._create_router()"},{"line_number":270,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":271,"context_line":"        self.assertNotIn("},{"line_number":272,"context_line":"            self.plugin.get_configuration_dict(self.agent1).get("},{"line_number":273,"context_line":"                constants.L3_AGENT_MODE),"},{"line_number":274,"context_line":"            [constants.L3_AGENT_MODE_DVR_SNAT, constants.L3_AGENT_MODE_DVR])"},{"line_number":275,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_698dd830","line":272,"in_reply_to":"da85f559_705c1b7d","updated":"2015-11-16 16:33:08.000000000","message":"Done","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            self.plugin.get_ha_sync_data_for_host(self.admin_ctx,"},{"line_number":279,"context_line":"                                                  self.agent1[\u0027host\u0027],"},{"line_number":280,"context_line":"                                                  self.agent1)"},{"line_number":281,"context_line":"            self.assertFalse(mock_get_sync.called)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":284,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_d0a94725","line":281,"updated":"2015-11-12 08:57:35.000000000","message":"Should you need to consider the call of \"get_sync_data\"?","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2b4cc506f75afe00c86aa12a79baf61e0063a9a4","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            self.plugin.get_ha_sync_data_for_host(self.admin_ctx,"},{"line_number":279,"context_line":"                                                  self.agent1[\u0027host\u0027],"},{"line_number":280,"context_line":"                                                  self.agent1)"},{"line_number":281,"context_line":"            self.assertFalse(mock_get_sync.called)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":284,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_29035075","line":281,"in_reply_to":"da85f559_d0a94725","updated":"2015-11-16 16:33:08.000000000","message":"For _get_dvr_sync_data and get_sync_data are in a if-else block, they are opposite by default, so I think assert one of them here is enough.","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertIn("},{"line_number":287,"context_line":"            self.plugin.get_configuration_dict(self.agent2).get("},{"line_number":288,"context_line":"                constants.L3_AGENT_MODE),"},{"line_number":289,"context_line":"            [constants.L3_AGENT_MODE_DVR_SNAT, constants.L3_AGENT_MODE_DVR])"},{"line_number":290,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_90cadf19","line":287,"updated":"2015-11-12 08:57:35.000000000","message":"The same comment as line 272","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2b4cc506f75afe00c86aa12a79baf61e0063a9a4","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        router \u003d self._create_router()"},{"line_number":285,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":286,"context_line":"        self.assertIn("},{"line_number":287,"context_line":"            self.plugin.get_configuration_dict(self.agent2).get("},{"line_number":288,"context_line":"                constants.L3_AGENT_MODE),"},{"line_number":289,"context_line":"            [constants.L3_AGENT_MODE_DVR_SNAT, constants.L3_AGENT_MODE_DVR])"},{"line_number":290,"context_line":"        with mock.patch.object(self.plugin,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_2987d010","line":287,"in_reply_to":"da85f559_90cadf19","updated":"2015-11-16 16:33:08.000000000","message":"Done","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c16a9258a2dcf21915db846dbfd5ed6afd079881","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            self.plugin.get_ha_sync_data_for_host(self.admin_ctx,"},{"line_number":294,"context_line":"                                                  self.agent2[\u0027host\u0027],"},{"line_number":295,"context_line":"                                                  self.agent2)"},{"line_number":296,"context_line":"            self.assertTrue(mock_get_sync.called)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_l3_agent_routers_query_interface(self):"},{"line_number":299,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_305d3347","line":296,"updated":"2015-11-12 08:57:35.000000000","message":"The same comment ast line 281","commit_id":"5764f3f8f2f1ddb812890007d95abc57b1975f8a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"415dea27a591d23b3ae78a2c6fe0e18d30c80c10","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):"},{"line_number":291,"context_line":"        router \u003d self._create_router()"},{"line_number":292,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":293,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":294,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":295,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_a4e2fb9d","line":292,"range":{"start_line":292,"start_character":8,"end_line":292,"end_character":39},"updated":"2016-01-12 15:05:00.000000000","message":"why is it needed for the test?","commit_id":"23d182bdf88babb7583ade34c8df2f4f762bdd25"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"415dea27a591d23b3ae78a2c6fe0e18d30c80c10","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":302,"context_line":"        router \u003d self._create_router()"},{"line_number":303,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":304,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":305,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":306,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_a4f99b4f","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":39},"updated":"2016-01-12 15:05:00.000000000","message":"ditto","commit_id":"23d182bdf88babb7583ade34c8df2f4f762bdd25"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59f7dc3a57a8129d5587d14d86e7bf03823c6d5b","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self.assertEqual(2, mock_manager.call_count)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):"},{"line_number":291,"context_line":"        router \u003d self._create_router()"},{"line_number":292,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":293,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":294,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":295,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da6ed579_189a9eb9","line":292,"range":{"start_line":291,"start_character":8,"end_line":292,"end_character":39},"updated":"2016-01-15 07:52:23.000000000","message":"seems we don\u0027t need this for the test","commit_id":"2725a44ec13a30da0d15c7629db8a19da1a4fcb9"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"aaa130c855edb34e9491bf7635a8fb9cc9c45caa","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self.assertEqual(2, mock_manager.call_count)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):"},{"line_number":291,"context_line":"        router \u003d self._create_router()"},{"line_number":292,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":293,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":294,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":295,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da6ed579_aee308d8","line":292,"range":{"start_line":291,"start_character":8,"end_line":292,"end_character":39},"in_reply_to":"da6ed579_189a9eb9","updated":"2016-01-15 08:48:26.000000000","message":"Done","commit_id":"2725a44ec13a30da0d15c7629db8a19da1a4fcb9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59f7dc3a57a8129d5587d14d86e7bf03823c6d5b","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            self.assertFalse(mock_get_sync.called)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":302,"context_line":"        router \u003d self._create_router()"},{"line_number":303,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":304,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":305,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":306,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da6ed579_38952286","line":303,"range":{"start_line":302,"start_character":8,"end_line":303,"end_character":39},"updated":"2016-01-15 07:52:23.000000000","message":"ditto","commit_id":"2725a44ec13a30da0d15c7629db8a19da1a4fcb9"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"aaa130c855edb34e9491bf7635a8fb9cc9c45caa","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            self.assertFalse(mock_get_sync.called)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_get_ha_sync_data_for_host_with_dvr_agent(self):"},{"line_number":302,"context_line":"        router \u003d self._create_router()"},{"line_number":303,"context_line":"        self._bind_router(router[\u0027id\u0027])"},{"line_number":304,"context_line":"        with mock.patch.object(self.plugin,"},{"line_number":305,"context_line":"                               \u0027_get_dvr_sync_data\u0027) as mock_get_sync:"},{"line_number":306,"context_line":"            self.plugin.supported_extension_aliases \u003d [\u0027dvr\u0027, \u0027l3-ha\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da6ed579_4ee60ce9","line":303,"range":{"start_line":302,"start_character":8,"end_line":303,"end_character":39},"in_reply_to":"da6ed579_38952286","updated":"2016-01-15 08:48:26.000000000","message":"Done","commit_id":"2725a44ec13a30da0d15c7629db8a19da1a4fcb9"}]}
