)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"3733b114cd5a0ec684c16440d0356508669e3f6c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch fixes this issue by adding a new routine on"},{"line_number":14,"context_line":"remove_router_interface that checks if a given router has ports on other"},{"line_number":15,"context_line":"subnets but the ones that are getting deleted."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id7d0bd4e1ceca3376b7c1159316d5d69447e4df2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_85f230d1","line":16,"updated":"2015-05-01 00:05:48.000000000","message":"Add the bug no here.\n\nCloses-Bug: #Bugno.","commit_id":"9a57384c7ad7236405e4723405e8ac9ce2760431"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"96005e5dc8491fd35139e2816d7a87cc5fab01bd","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The interfaces should have non-dhcp-enabled subnets associate with it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch fixes this issue by adding an extra check on remove_router_interface"},{"line_number":14,"context_line":"to valifate if there is any other subnet attached to the router before asking"},{"line_number":15,"context_line":"the plugin if there is any port on the l3 agent."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id7d0bd4e1ceca3376b7c1159316d5d69447e4df2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aca2d91_7a589f32","line":14,"updated":"2015-05-08 13:04:23.000000000","message":"nit: valifate -\u003e validate","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cbd5d6ab414b1a7352aa3802422e3bddc6026046","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the plugin if there is any port on the l3 agent."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id7d0bd4e1ceca3376b7c1159316d5d69447e4df2"},{"line_number":18,"context_line":"Closes-Bug: #1443524"},{"line_number":19,"context_line":"Co-Authored-By: Swaminathan Vasudevan \u003cswaminathan.vasudevan@hp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"1a4dcd0f_f6b030ff","line":18,"updated":"2015-08-12 12:28:08.000000000","message":"Parent patch seems fixing the bug as verified by unit (and manual interation) test. Not sure what is this patch supposed to fix. Consider reporting a separate bug","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"122618e44cc263314323b279e503cf8798fec485","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the plugin if there is any port on the l3 agent."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id7d0bd4e1ceca3376b7c1159316d5d69447e4df2"},{"line_number":18,"context_line":"Closes-Bug: #1443524"},{"line_number":19,"context_line":"Co-Authored-By: Swaminathan Vasudevan \u003cswaminathan.vasudevan@hp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"fa1b9901_f18b87c1","line":18,"in_reply_to":"1a4dcd0f_f6b030ff","updated":"2015-08-19 17:30:42.000000000","message":"I updated the bug description.\nThe issue here is all CSNAT ports associated with the router snat namespace is deleted when a single router port is removed.\nThis patch actually fixes that issue.\nI will clarify the commit message to provide more details on this bug.","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"776f927f9594a0c5b5bb170dcd393d4de0980645","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the plugin if there is any port on the l3 agent."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id7d0bd4e1ceca3376b7c1159316d5d69447e4df2"},{"line_number":18,"context_line":"Closes-Bug: #1443524"},{"line_number":19,"context_line":"Co-Authored-By: Swaminathan Vasudevan \u003cswaminathan.vasudevan@hp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"fa1b9901_25c3c3ee","line":18,"in_reply_to":"fa1b9901_f18b87c1","updated":"2015-08-20 15:24:20.000000000","message":"This is exactly what parent patch is fixing. What are steps to reproduce if the problem still exists?","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cbd5d6ab414b1a7352aa3802422e3bddc6026046","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        ports on the host, running the input l3agent."},{"line_number":378,"context_line":"        \"\"\""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if subnet_ids is None:"},{"line_number":381,"context_line":"            subnet_ids \u003d self.get_subnet_ids_on_router(context, router_id)"},{"line_number":382,"context_line":"            if not subnet_ids:"},{"line_number":383,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_9670cc41","line":380,"updated":"2015-08-12 12:28:08.000000000","message":"does it makes sense to continue if passed subnet_ids is [] (not None)","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"122618e44cc263314323b279e503cf8798fec485","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        ports on the host, running the input l3agent."},{"line_number":378,"context_line":"        \"\"\""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if subnet_ids is None:"},{"line_number":381,"context_line":"            subnet_ids \u003d self.get_subnet_ids_on_router(context, router_id)"},{"line_number":382,"context_line":"            if not subnet_ids:"},{"line_number":383,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa1b9901_14af09e3","line":380,"in_reply_to":"1a4dcd0f_9670cc41","updated":"2015-08-19 17:30:42.000000000","message":"I would prefer that we check for the empty list and if empty just look for subnet_ids on the router.","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"3733b114cd5a0ec684c16440d0356508669e3f6c","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                                             [router[\u0027id\u0027]])"},{"line_number":333,"context_line":"            for l3_agent in l3_agents:"},{"line_number":334,"context_line":"                other_ports \u003d self._check_ports_on_other_subnets("},{"line_number":335,"context_line":"                        context, router, subnets)"},{"line_number":336,"context_line":"                ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":337,"context_line":"                        context, l3_agent, router[\u0027id\u0027])"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_45b778d8","line":335,"updated":"2015-05-01 00:05:48.000000000","message":"David\ncheck_ports_exist_on_l3agent does a call to get all the subnets for the router, so what we can do here is may be call that function get_subnet_ids_on_router in here and pass the \"subnets\" as an optional argument to the \"check_ports_exist_on_l3agent\".\nIn that you don\u0027t need to do multiple query to the db.","commit_id":"9a57384c7ad7236405e4723405e8ac9ce2760431"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c385ac72b5a7d7abe0e1376f1440cd225c3d1d84","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                                             [router[\u0027id\u0027]])"},{"line_number":321,"context_line":"            for l3_agent in l3_agents:"},{"line_number":322,"context_line":"                subnet_ids \u003d plugin.get_subnet_ids_on_router(context,"},{"line_number":323,"context_line":"                router[\u0027id\u0027])"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"                ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":326,"context_line":"                        context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_32ab3977","line":323,"updated":"2015-05-05 21:35:57.000000000","message":"Just  move the \"context\" to the next line and intend it.","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c385ac72b5a7d7abe0e1376f1440cd225c3d1d84","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"                if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:"},{"line_number":329,"context_line":"                    plugin.remove_router_from_l3_agent(context, l3_agent[\u0027id\u0027],"},{"line_number":330,"context_line":"                            router[\u0027id\u0027])"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        router_interface_info \u003d self._make_router_interface_info("},{"line_number":333,"context_line":"            router[\u0027id\u0027], port[\u0027tenant_id\u0027], port[\u0027id\u0027], subnets[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_32c21935","line":330,"updated":"2015-05-05 21:35:57.000000000","message":"Ditto: Intend the line properly as above.","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c385ac72b5a7d7abe0e1376f1440cd225c3d1d84","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            port, subnets \u003d self._remove_interface_by_subnet("},{"line_number":357,"context_line":"                    context, router_id, subnet_id, device_owner)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        router_interface_info \u003d ("},{"line_number":360,"context_line":"            self._validate_dvr_router_interface_remove_and_notify_agent("},{"line_number":361,"context_line":"                context, router, port, subnets))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_f2dee10f","line":358,"updated":"2015-05-05 21:35:57.000000000","message":"Why is there an additional line here?","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from neutron import manager"},{"line_number":37,"context_line":"from neutron.plugins.common import constants"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_DVR_INTERFACE"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_5948e35b","side":"PARENT","line":39,"updated":"2015-07-11 04:29:49.000000000","message":"Delete blank line?","commit_id":"49e88555b0916b07d3906bfb4e07e2f0afb06d97"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from neutron import manager"},{"line_number":37,"context_line":"from neutron.plugins.common import constants"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_DVR_INTERFACE"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_6fceef84","side":"PARENT","line":39,"in_reply_to":"9a41bdd9_5948e35b","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"49e88555b0916b07d3906bfb4e07e2f0afb06d97"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":45,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"},{"line_number":46,"context_line":"SNAT_ROUTER_INTF_KEY \u003d l3_const.SNAT_ROUTER_INTF_KEY"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"router_distributed_opts \u003d ["},{"line_number":50,"context_line":"    cfg.BoolOpt(\u0027router_distributed\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_f973f7b2","side":"PARENT","line":47,"updated":"2015-07-11 04:29:49.000000000","message":"Here too.","commit_id":"49e88555b0916b07d3906bfb4e07e2f0afb06d97"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":44,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":45,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"},{"line_number":46,"context_line":"SNAT_ROUTER_INTF_KEY \u003d l3_const.SNAT_ROUTER_INTF_KEY"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"router_distributed_opts \u003d ["},{"line_number":50,"context_line":"    cfg.BoolOpt(\u0027router_distributed\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_afb39709","side":"PARENT","line":47,"in_reply_to":"9a41bdd9_f973f7b2","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"49e88555b0916b07d3906bfb4e07e2f0afb06d97"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":314,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":315,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:"},{"line_number":318,"context_line":"            return False"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_3962bfd9","line":316,"updated":"2015-07-11 04:29:49.000000000","message":"Extra blank line here and at 319 not needed.","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":314,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":315,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:"},{"line_number":318,"context_line":"            return False"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_4fc3eb57","line":316,"in_reply_to":"9a41bdd9_3962bfd9","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                        context, plugin, l3_agent, router):"},{"line_number":335,"context_line":"                    plugin.remove_router_from_l3_agent("},{"line_number":336,"context_line":"                            context, l3_agent[\u0027id\u0027], router[\u0027id\u0027])"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        router_interface_info \u003d self._make_router_interface_info("},{"line_number":339,"context_line":"            router[\u0027id\u0027], port[\u0027tenant_id\u0027], port[\u0027id\u0027], subnets[0][\u0027id\u0027],"},{"line_number":340,"context_line":"            [subnet[\u0027id\u0027] for subnet in subnets])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_1979fb93","line":337,"updated":"2015-07-11 04:29:49.000000000","message":"Added blank line?","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                        context, plugin, l3_agent, router):"},{"line_number":335,"context_line":"                    plugin.remove_router_from_l3_agent("},{"line_number":336,"context_line":"                            context, l3_agent[\u0027id\u0027], router[\u0027id\u0027])"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        router_interface_info \u003d self._make_router_interface_info("},{"line_number":339,"context_line":"            router[\u0027id\u0027], port[\u0027tenant_id\u0027], port[\u0027id\u0027], subnets[0][\u0027id\u0027],"},{"line_number":340,"context_line":"            [subnet[\u0027id\u0027] for subnet in subnets])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_6fa34f9f","line":337,"in_reply_to":"9a41bdd9_1979fb93","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        else:"},{"line_number":362,"context_line":"            port, subnets \u003d self._remove_interface_by_subnet("},{"line_number":363,"context_line":"                    context, router_id, subnet_id, device_owner)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        router_interface_info \u003d ("},{"line_number":366,"context_line":"            self._check_dvr_router_remove_required_and_notify_agent("},{"line_number":367,"context_line":"                context, router, port, subnets))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_19a01bf4","line":364,"updated":"2015-07-11 04:29:49.000000000","message":"Add blank line?","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        else:"},{"line_number":362,"context_line":"            port, subnets \u003d self._remove_interface_by_subnet("},{"line_number":363,"context_line":"                    context, router_id, subnet_id, device_owner)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        router_interface_info \u003d ("},{"line_number":366,"context_line":"            self._check_dvr_router_remove_required_and_notify_agent("},{"line_number":367,"context_line":"                context, router, port, subnets))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_8f9ed352","line":364,"in_reply_to":"9a41bdd9_19a01bf4","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cbd5d6ab414b1a7352aa3802422e3bddc6026046","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"},{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _check_l3_agent_has_ports(self, context, plugin, l3_agent, router):"},{"line_number":322,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":323,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":324,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_f6fa7076","line":321,"updated":"2015-08-12 12:28:08.000000000","message":"no need to pass the whole router object if only id is needed","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"122618e44cc263314323b279e503cf8798fec485","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"},{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _check_l3_agent_has_ports(self, context, plugin, l3_agent, router):"},{"line_number":322,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":323,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":324,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa1b9901_f49855c2","line":321,"in_reply_to":"1a4dcd0f_f6fa7076","updated":"2015-08-19 17:30:42.000000000","message":"will fix it.","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cbd5d6ab414b1a7352aa3802422e3bddc6026046","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _check_l3_agent_has_ports(self, context, plugin, l3_agent, router):"},{"line_number":322,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":323,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":324,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"},{"line_number":325,"context_line":"        if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_9643ecae","line":322,"updated":"2015-08-12 12:28:08.000000000","message":"not sure what gives us extracting get_subnet_ids_on_router() from check_ports_exist_on_l3agent()  to this method","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"122618e44cc263314323b279e503cf8798fec485","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _check_l3_agent_has_ports(self, context, plugin, l3_agent, router):"},{"line_number":322,"context_line":"        subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])"},{"line_number":323,"context_line":"        ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent("},{"line_number":324,"context_line":"                context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)"},{"line_number":325,"context_line":"        if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa1b9901_940c79ee","line":322,"in_reply_to":"1a4dcd0f_9643ecae","updated":"2015-08-19 17:30:42.000000000","message":"Yes this is valid, since we are checking out the number of subnets on the router and then we are checking if ports exits on l3agent for the given subnets.\nIf ports exist, we take necessary action.","commit_id":"ad53a370b9adf874a716623bbe197e1ed1eee69b"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c385ac72b5a7d7abe0e1376f1440cd225c3d1d84","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                self.mixin, \u0027_make_router_interface_info\u0027),"},{"line_number":520,"context_line":"            mock.patch.object("},{"line_number":521,"context_line":"                self.mixin, \u0027notify_router_interface_action\u0027),"},{"line_number":522,"context_line":"                             ) as (grtr, d_csnat, splug, mkrtinf, notif):"},{"line_number":523,"context_line":"            grtr.return_value \u003d router"},{"line_number":524,"context_line":"            mkrtinf.return_value \u003d mock.Mock()"},{"line_number":525,"context_line":"            notif.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_72fad176","line":522,"updated":"2015-05-05 21:35:57.000000000","message":"There is no need to modify this line","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"96005e5dc8491fd35139e2816d7a87cc5fab01bd","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                self.mixin, \u0027_make_router_interface_info\u0027),"},{"line_number":520,"context_line":"            mock.patch.object("},{"line_number":521,"context_line":"                self.mixin, \u0027notify_router_interface_action\u0027),"},{"line_number":522,"context_line":"                             ) as (grtr, d_csnat, splug, mkrtinf, notif):"},{"line_number":523,"context_line":"            grtr.return_value \u003d router"},{"line_number":524,"context_line":"            mkrtinf.return_value \u003d mock.Mock()"},{"line_number":525,"context_line":"            notif.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_3a28e7e1","line":522,"in_reply_to":"3acd31a7_72fad176","updated":"2015-05-08 13:04:23.000000000","message":"Same with L592","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"96005e5dc8491fd35139e2816d7a87cc5fab01bd","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            mkrtinf.return_value \u003d mock.Mock()"},{"line_number":525,"context_line":"            notif.return_value \u003d None"},{"line_number":526,"context_line":"            splug.return_value \u003d {plugin_const.L3_ROUTER_NAT: plugin}"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"            self.mixin._validate_dvr_router_interface_remove_and_notify_agent("},{"line_number":529,"context_line":"                self.ctx, router, port, [subnet])"},{"line_number":530,"context_line":"            self.assertTrue(plugin.get_l3_agents_hosting_routers.called)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_fa214ffc","line":527,"updated":"2015-05-08 13:04:23.000000000","message":"extraneous change","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c385ac72b5a7d7abe0e1376f1440cd225c3d1d84","unresolved":false,"context_lines":[{"line_number":533,"context_line":"            self.mixin.delete_csnat_router_interface_ports.\\"},{"line_number":534,"context_line":"                assert_called_once_with("},{"line_number":535,"context_line":"                    mock.ANY, router, subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def test_remove_rtr_int_by_port_sends_subnet_to_validate_dvr_routers(self):"},{"line_number":538,"context_line":"        interface_info \u003d {\u0027port_id\u0027: \u0027123\u0027}"},{"line_number":539,"context_line":"        port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_d29be516","line":536,"updated":"2015-05-05 21:35:57.000000000","message":"Add an additional unit test to check the condition if assertFalse for \"notify\" when the router has more than one subnet associated with it.","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"96005e5dc8491fd35139e2816d7a87cc5fab01bd","unresolved":false,"context_lines":[{"line_number":533,"context_line":"            self.mixin.delete_csnat_router_interface_ports.\\"},{"line_number":534,"context_line":"                assert_called_once_with("},{"line_number":535,"context_line":"                    mock.ANY, router, subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def test_remove_rtr_int_by_port_sends_subnet_to_validate_dvr_routers(self):"},{"line_number":538,"context_line":"        interface_info \u003d {\u0027port_id\u0027: \u0027123\u0027}"},{"line_number":539,"context_line":"        port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_3a6fc72c","line":536,"in_reply_to":"3acd31a7_d29be516","updated":"2015-05-08 13:04:23.000000000","message":"+! should be a test for the logic change.","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":15840,"name":"David Pinheiro","email":"davrodpin@gmail.com","username":"davrodpin"},"change_message_id":"f7a2699e5a6e17e5dd793aa38c7ac20e1fde60ca","unresolved":false,"context_lines":[{"line_number":533,"context_line":"            self.mixin.delete_csnat_router_interface_ports.\\"},{"line_number":534,"context_line":"                assert_called_once_with("},{"line_number":535,"context_line":"                    mock.ANY, router, subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def test_remove_rtr_int_by_port_sends_subnet_to_validate_dvr_routers(self):"},{"line_number":538,"context_line":"        interface_info \u003d {\u0027port_id\u0027: \u0027123\u0027}"},{"line_number":539,"context_line":"        port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_86301858","line":536,"in_reply_to":"3acd31a7_d29be516","updated":"2015-05-06 17:53:24.000000000","message":"How about extract a function from the code that query and check ports (database and l3_agent)? Then I can right unit tests for this new function.\n\nTalking about extract a function from the code below (l3_dvr_db.py):\n\nl3_agents \u003d plugin.get_l3_agents_hosting_routers(context, [router[\u0027id\u0027]])\nfor l3_agent in l3_agents:\n  subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router[\u0027id\u0027])\n  ports_on_l3agent \u003d plugin.check_ports_exist_on_l3agent(context, l3_agent, router[\u0027id\u0027], subnet_ids\u003dsubnet_ids)\n  if len(subnet_ids) \u003d\u003d 0 and not ports_on_l3agent:","commit_id":"e87910aea4dff14553eece7d920fecf32b6f60ee"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c6b38b53a4e19a05f33403120a88b1a73dfb307e","unresolved":false,"context_lines":[{"line_number":508,"context_line":"            return_value\u003dFalse)"},{"line_number":509,"context_line":"        plugin.remove_router_from_l3_agent \u003d mock.Mock("},{"line_number":510,"context_line":"            return_value\u003dNone)"},{"line_number":511,"context_line":"        with contextlib.nested("},{"line_number":512,"context_line":"            mock.patch.object("},{"line_number":513,"context_line":"                self.mixin, \u0027_get_router\u0027),"},{"line_number":514,"context_line":"            mock.patch.object("}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_5b63d2dc","line":511,"updated":"2015-06-08 13:19:18.000000000","message":"You\u0027ll need to convert this to a with clause to pass PEP8. The contextlib.nested() is not pyton3 compatible and has some issues.\n\nExample resoluton... https://review.openstack.org/#/c/182670/","commit_id":"2908937d26ee5daa41923a174ac0825998a80b09"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"a3e504171f7bbca7707bf902d37e7f3cc81c3a3c","unresolved":false,"context_lines":[{"line_number":600,"context_line":"            mock_notify.assert_called_once_with("},{"line_number":601,"context_line":"                \u0027router\u0027, \u0027before_update\u0027, self.mixin, **kwargs)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"    def test__check_l3_agent_has_ports(self):"},{"line_number":604,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":605,"context_line":"        plugin.get_subnet_ids_on_router \u003d mock.Mock(return_value\u003d[])"},{"line_number":606,"context_line":"        plugin.check_ports_exist_on_l3agent \u003d mock.Mock(return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_39b95f2f","line":603,"updated":"2015-07-11 04:29:49.000000000","message":"Consider splitting this into multiple tests.","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"575dad1dd768e95db435e53e565d7590db900969","unresolved":false,"context_lines":[{"line_number":600,"context_line":"            mock_notify.assert_called_once_with("},{"line_number":601,"context_line":"                \u0027router\u0027, \u0027before_update\u0027, self.mixin, **kwargs)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"    def test__check_l3_agent_has_ports(self):"},{"line_number":604,"context_line":"        plugin \u003d mock.MagicMock()"},{"line_number":605,"context_line":"        plugin.get_subnet_ids_on_router \u003d mock.Mock(return_value\u003d[])"},{"line_number":606,"context_line":"        plugin.check_ports_exist_on_l3agent \u003d mock.Mock(return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_efb51fd0","line":603,"in_reply_to":"9a41bdd9_39b95f2f","updated":"2015-07-17 22:47:38.000000000","message":"Done","commit_id":"b904d91dfbda83c731bcf88ba9c585c15122247e"}]}
