)]}'
{"neutron/agent/l3/agent.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"21bd151818902c3f525262b633d44ef7c857e8d4","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":493,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":494,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":495,"context_line":"        is_ha_router \u003d hasattr(router, \u0027ha_state\u0027)"},{"line_number":496,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":497,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":498,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_6bb9f212","line":495,"updated":"2018-03-15 15:08:59.000000000","message":"ha_state is in the router_info object, so that init would need to move from L500 and this should pull the info from there.","commit_id":"183cb1c2923bc021ad0b1f18c4b9e51ccbf44958"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6eedb76ae661c4247490ac5cd99349bd2eb5ce4a","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d hasattr(ri, \u0027ha_state\u0027)"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_bf39f63f","line":496,"range":{"start_line":496,"start_character":23,"end_line":496,"end_character":46},"updated":"2018-03-21 19:12:58.000000000","message":"Please read this blog post: https://hynek.me/articles/hasattr/\n\nha_state is implemented as a property:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/l3/ha_router.py#L78\n\nTo be on the safe side, could we follow the recommendation of the blog post and implement this change with getattr()?","commit_id":"76552291f0b905dece5cf2eed03e9f971fdb1aa4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"3f2cc2d01168975f5622a3f7aece48c855c4104e","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d hasattr(ri, \u0027ha_state\u0027)"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_f540ef09","line":496,"range":{"start_line":496,"start_character":23,"end_line":496,"end_character":46},"in_reply_to":"df7087c5_bf39f63f","updated":"2018-03-21 20:25:27.000000000","message":"Thx for this blog post. I\u0027m learning something new every day","commit_id":"76552291f0b905dece5cf2eed03e9f971fdb1aa4"},{"author":{"_account_id":15952,"name":"Daniel Gonzalez","email":"lentil.backup_0v@icloud.com"},"change_message_id":"2a2d828e6a3a870656101edbb6350358102d17a0","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d hasattr(ri, \u0027ha_state\u0027)"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_b57d971d","line":496,"range":{"start_line":496,"start_character":23,"end_line":496,"end_character":46},"in_reply_to":"df7087c5_f540ef09","updated":"2018-03-21 20:32:54.000000000","message":"That\u0027s a very good suggestion.\nI\u0027ll think about how to best implement the fix with getattr(), or maybe even with try, except AttributeError.","commit_id":"76552291f0b905dece5cf2eed03e9f971fdb1aa4"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"df2c04896090c6168b451f5c355a07be162b8eb1","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_68d06620","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"updated":"2018-03-22 19:07:15.000000000","message":"Is this required?","commit_id":"b515d8cf5553341ddb55f3ef2b275a4134cf98c6"},{"author":{"_account_id":15952,"name":"Daniel Gonzalez","email":"lentil.backup_0v@icloud.com"},"change_message_id":"54ddafb1e36221cbbf52279c2f74869da1883a24","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_9c53bc6b","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"df7087c5_68d06620","updated":"2018-03-22 20:33:27.000000000","message":"I think it isn\u0027t strictly required, but IMHO being explicit with None checks is a good thing to do.\n\nIf, for some reason, ha_state would be an empty string leaving \u0027is not None\u0027 out here could lead to wrongly setting is_ha_router \u003d False. This would omit the state checks, when they actually should be checked.","commit_id":"b515d8cf5553341ddb55f3ef2b275a4134cf98c6"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8d6ce24e9d2e89763ba72531060abf294a1947f3","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        self.l3_ext_manager.add_router(self.context, router)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def _process_updated_router(self, router):"},{"line_number":492,"context_line":"        ri \u003d self.router_info[router[\u0027id\u0027]]"},{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_394dd499","line":492,"updated":"2018-03-23 08:04:49.000000000","message":"It looks that this causes issues in functional tests now, see: http://logs.openstack.org/97/552097/7/check/neutron-functional/4092f63/logs/testr_results.html.gz","commit_id":"63418241dc20eeebc1c9bb0bc753b1591fb73805"},{"author":{"_account_id":15952,"name":"Daniel Gonzalez","email":"lentil.backup_0v@icloud.com"},"change_message_id":"96e95e1344c0be19df620f8a7e5c143714f8ab26","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        self.l3_ext_manager.add_router(self.context, router)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def _process_updated_router(self, router):"},{"line_number":492,"context_line":"        ri \u003d self.router_info[router[\u0027id\u0027]]"},{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_ab50a1d6","line":492,"in_reply_to":"df7087c5_394dd499","updated":"2018-03-23 11:59:29.000000000","message":"Yes, I found the cause of the issue now:\nI created router2 on \u0027failover_agent\u0027 and later called _process_updated_router(router2.router) on \u0027agent\u0027.\n\nNo surprise that \u0027agent\u0027 does not have the id of router2 :D\nI\u0027ll update the patch with a fix for this.","commit_id":"63418241dc20eeebc1c9bb0bc753b1591fb73805"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f29f6b244d75ce7e6933578b9c3b9d5426a25541","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_0df5c1cb","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"updated":"2018-03-23 20:32:01.000000000","message":"nit: i guess as Swami asked it\u0027s not totally necessary, perhaps the best follow-on is to have ha_state() not return \u0027\u0027, which could only happen if the state file is empty.  But the code isn\u0027t wrong.","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"12d3b9b01a3213c16777aa13a773755db6125a7b","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_ff2bda7e","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"bf659307_088788d9","updated":"2018-03-28 17:07:52.000000000","message":"Yes that is a valid point.","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d72628ef90f00fc730fab81a84a25442d72970b9","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_6d2a3de8","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"bf659307_0df5c1cb","updated":"2018-03-23 20:45:26.000000000","message":"ok, Let\u0027s merge this and we can follow up with Brian\u0027s optimization.","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4f9d2b614ca43ea6b892d42719057cec659ea95b","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_c2ef93e7","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"bf659307_6d2a3de8","updated":"2018-03-26 17:42:25.000000000","message":"make sense.","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"},{"author":{"_account_id":15952,"name":"Daniel Gonzalez","email":"lentil.backup_0v@icloud.com"},"change_message_id":"12c406e7f826ae4bec5efe746eadf9a2f67f1cab","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_088788d9","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"bf659307_889ab86b","updated":"2018-03-28 09:25:54.000000000","message":"I could image that creating a DvrEdgeHaRouter in such a situation could lead to further problems.\nFor instance, \u0027max_l3_agents_per_router\u0027 limits the maximum number of HaRouters. If we create a DvrEdgeHaRouter we will have more HaRouters than allowed by \u0027max_l3_agents_per_router\u0027.\nNot sure what happens then...","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"},{"author":{"_account_id":23430,"name":"sunzuohua","email":"zuohuasun@gmail.com","username":"ZuohuaSun"},"change_message_id":"e2d3e1f355962dc86412a09313817ad6a37b2143","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        is_dvr_only_agent \u003d (self.conf.agent_mode in"},{"line_number":494,"context_line":"                             [lib_const.L3_AGENT_MODE_DVR,"},{"line_number":495,"context_line":"                              lib_const.L3_AGENT_MODE_DVR_NO_EXTERNAL])"},{"line_number":496,"context_line":"        is_ha_router \u003d getattr(ri, \u0027ha_state\u0027, None) is not None"},{"line_number":497,"context_line":"        # For HA routers check that DB state matches actual state"},{"line_number":498,"context_line":"        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and is_ha_router:"},{"line_number":499,"context_line":"            self.check_ha_state_for_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_889ab86b","line":496,"range":{"start_line":496,"start_character":53,"end_line":496,"end_character":64},"in_reply_to":"bf659307_c2ef93e7","updated":"2018-03-28 09:20:08.000000000","message":"I think the real problem is why a \"DvrEdgeRouter\" is created?\nShould a \"DvrEdgeHaRouter\" be created?","commit_id":"8c2dae659a806fdc20331de4b8a917ec3ae0e6f6"}],"neutron/agent/l3/ha.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bbfb9aa6d3afe88604e7e0e50ea1a7d09233da10","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if not hasattr(ri, \u0027ha_state\u0027):"},{"line_number":96,"context_line":"            LOG.debug(\"Ignoring router %s because it does not \""},{"line_number":97,"context_line":"                      \"have a state.\", router_id)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":"        if ri and current_state !\u003d TRANSLATION_MAP[ri.ha_state]:"},{"line_number":100,"context_line":"            LOG.debug(\"Updating server with state %(state)s for router \""},{"line_number":101,"context_line":"                      \"%(router_id)s\", {\u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_17647db8","line":98,"updated":"2018-03-12 18:02:12.000000000","message":"I think this check should be done in the caller, _process_updated_router(), as it is already loading the router_info.","commit_id":"af5419f209f983dd67176395dc2426151d40832d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"db772690bd6ffc6da9eb0fe9808d58c45710e3f9","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def check_ha_state_for_router(self, router_id, current_state):"},{"line_number":94,"context_line":"        ri \u003d self._get_router_info(router_id)"},{"line_number":95,"context_line":"        if not hasattr(ri, \u0027ha_state\u0027):"},{"line_number":96,"context_line":"            LOG.debug(\"Ignoring router %s because it does not \""},{"line_number":97,"context_line":"                      \"have a state.\", router_id)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":"        if ri and current_state !\u003d TRANSLATION_MAP[ri.ha_state]:"},{"line_number":100,"context_line":"            LOG.debug(\"Updating server with state %(state)s for router \""},{"line_number":101,"context_line":"                      \"%(router_id)s\", {\u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_636ad7b3","line":98,"range":{"start_line":95,"start_character":7,"end_line":98,"end_character":18},"updated":"2018-03-12 21:17:03.000000000","message":"Yes. I agree.\nThis code can go in here in \u0027agent.py\u0027\n\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/l3/agent.py#L495\n\n  # For HA routers check that DB state matches actual state\n        ri \u003d self.router_info[router[\u0027id\u0027]]\n        if router.get(\u0027ha\u0027) and not is_dvr_only_agent and not hasattr(ri, \u0027ha_state\u0027):\n            self.check_ha_state_for_router(\n                router[\u0027id\u0027],   router.get(l3_constants.HA_ROUTER_STATE_KEY))","commit_id":"af5419f209f983dd67176395dc2426151d40832d"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"df2c04896090c6168b451f5c355a07be162b8eb1","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"    def _create_dvr_ha_router_no_ha_interface(self, agent, enable_gw\u003dTrue,"},{"line_number":1184,"context_line":"                                              enable_centralized_fip\u003dFalse,"},{"line_number":1185,"context_line":"                                              snat_bound_fip\u003dFalse):"},{"line_number":1186,"context_line":"        get_ns_name \u003d mock.patch.object(namespaces.RouterNamespace,"},{"line_number":1187,"context_line":"                                        \u0027_get_ns_name\u0027).start()"},{"line_number":1188,"context_line":"        get_snat_ns_name \u003d mock.patch.object(dvr_snat_ns.SnatNamespace,"},{"line_number":1189,"context_line":"                                             \u0027get_snat_ns_name\u0027).start()"},{"line_number":1190,"context_line":"        (r_info,"},{"line_number":1191,"context_line":"         mocked_r_ns_name,"},{"line_number":1192,"context_line":"         mocked_r_snat_ns_name) \u003d self._mocked_dvr_ha_router("},{"line_number":1193,"context_line":"             agent, False, enable_gw, enable_centralized_fip, snat_bound_fip)"},{"line_number":1194,"context_line":"        r_info[\u0027ha\u0027] \u003d True"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        get_ns_name.return_value \u003d mocked_r_ns_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_a63c6f2f","line":1193,"range":{"start_line":1186,"start_character":8,"end_line":1193,"end_character":77},"updated":"2018-03-22 19:07:15.000000000","message":"Is it possible to just pass in \u0027ha_interface\u0027\u003dTrue/False to the _create_dvr_ha_router rather than creating a new function.\n\nBased on the condition, you can then pass in \u0027True/False\u0027 to the \u0027_mocked_dvr_ha_router.","commit_id":"b515d8cf5553341ddb55f3ef2b275a4134cf98c6"},{"author":{"_account_id":15952,"name":"Daniel Gonzalez","email":"lentil.backup_0v@icloud.com"},"change_message_id":"54ddafb1e36221cbbf52279c2f74869da1883a24","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"    def _create_dvr_ha_router_no_ha_interface(self, agent, enable_gw\u003dTrue,"},{"line_number":1184,"context_line":"                                              enable_centralized_fip\u003dFalse,"},{"line_number":1185,"context_line":"                                              snat_bound_fip\u003dFalse):"},{"line_number":1186,"context_line":"        get_ns_name \u003d mock.patch.object(namespaces.RouterNamespace,"},{"line_number":1187,"context_line":"                                        \u0027_get_ns_name\u0027).start()"},{"line_number":1188,"context_line":"        get_snat_ns_name \u003d mock.patch.object(dvr_snat_ns.SnatNamespace,"},{"line_number":1189,"context_line":"                                             \u0027get_snat_ns_name\u0027).start()"},{"line_number":1190,"context_line":"        (r_info,"},{"line_number":1191,"context_line":"         mocked_r_ns_name,"},{"line_number":1192,"context_line":"         mocked_r_snat_ns_name) \u003d self._mocked_dvr_ha_router("},{"line_number":1193,"context_line":"             agent, False, enable_gw, enable_centralized_fip, snat_bound_fip)"},{"line_number":1194,"context_line":"        r_info[\u0027ha\u0027] \u003d True"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        get_ns_name.return_value \u003d mocked_r_ns_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_3cc2b035","line":1193,"range":{"start_line":1186,"start_character":8,"end_line":1193,"end_character":77},"in_reply_to":"df7087c5_a63c6f2f","updated":"2018-03-22 20:33:27.000000000","message":"good idea, I\u0027ll do it.","commit_id":"b515d8cf5553341ddb55f3ef2b275a4134cf98c6"}]}
