)]}'
{"networking_bagpipe/agent/bagpipe_bgp_agent.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        # Starts a greenthread for bagpipe-bgp status polling"},{"line_number":178,"context_line":"        self._start_bagpipe_bgp_status_polling(self.ping_interval)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        self.build_callbacks \u003d dict()"},{"line_number":181,"context_line":"        self.port_lists \u003d dict()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _check_bagpipe_bgp_status(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_8a9ae0c2","line":180,"range":{"start_line":180,"start_character":35,"end_line":180,"end_character":37},"updated":"2017-09-19 13:23:06.000000000","message":"add comment: maps service name to callback function used to generate the content of bagpipe-bgp API calls\n\n(something like that ?)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        self._start_bagpipe_bgp_status_polling(self.ping_interval)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        self.build_callbacks \u003d dict()"},{"line_number":181,"context_line":"        self.port_lists \u003d dict()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _check_bagpipe_bgp_status(self):"},{"line_number":184,"context_line":"        \"\"\"Trigger refresh on bagpipe-bgp restarts"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_4aa4e808","line":181,"range":{"start_line":181,"start_character":0,"end_line":181,"end_character":32},"updated":"2017-09-19 13:23:06.000000000","message":"\"maps service name to list of ports for which a given service has a service enabled\"","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                if vpn_type in service_attach_info[service]:"},{"line_number":257,"context_line":"                    network_id \u003d service_attach_info[service][\u0027network_id\u0027]"},{"line_number":258,"context_line":"                    if not attach_info:"},{"line_number":259,"context_line":"                        attach_info \u003d self._get_common_attach_info("},{"line_number":260,"context_line":"                            service_attach_info[service])"},{"line_number":261,"context_line":"                        attach_info.update({\u0027vpn_instance_id\u0027: \u0027%s_%s\u0027 %"},{"line_number":262,"context_line":"                                            (network_id, vpn_type)})"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"                    service_vpn_info \u003d service_attach_info[service][vpn_type]"},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_aa5004d6","line":262,"range":{"start_line":259,"start_character":0,"end_line":262,"end_character":68},"updated":"2017-09-19 13:23:06.000000000","message":"I think that local_port/ip_address/mac_address/gateway_ip and vpn_instance_id should all be added by the same piece of code; I don\u0027t see why in fact we have the first ones done in get_common_attach_info and the others here.\n\nSince _get_common_attach_info is small and not used elsewhere, I suggest to remove this method and do everything here.","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    else:"},{"line_number":279,"context_line":"                        attach_info[\u0027local_port\u0027].update("},{"line_number":280,"context_line":"                            service_vpn_info.pop(\u0027local_port\u0027, {})"},{"line_number":281,"context_line":"                        )"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"                    # Check if static routes"},{"line_number":284,"context_line":"                    static_routes \u003d service_vpn_info.pop(\u0027static_routes\u0027, [])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_6a88cc70","line":281,"updated":"2017-09-19 13:23:06.000000000","message":"why move this block of code ?","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    else:"},{"line_number":279,"context_line":"                        attach_info[\u0027local_port\u0027].update("},{"line_number":280,"context_line":"                            service_vpn_info.pop(\u0027local_port\u0027, {})"},{"line_number":281,"context_line":"                        )"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"                    # Check if static routes"},{"line_number":284,"context_line":"                    static_routes \u003d service_vpn_info.pop(\u0027static_routes\u0027, [])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_434eb56f","line":281,"in_reply_to":"ff5d4b2f_6a88cc70","updated":"2017-09-27 12:51:25.000000000","message":"Moved to have correct local port informations for static routes","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"80e586d97dea85b235bac2852f3c4c497e5e5fcc","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            for unplug_detail in all_unplug_details[vpn_type]:"},{"line_number":365,"context_line":"                self._send_detach_local_port(unplug_detail)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _do_port_plug_refresh(self, port_id, detach_infos):"},{"line_number":368,"context_line":"        \"\"\"Send port detach request to bagpipe-bgp.\"\"\""},{"line_number":369,"context_line":"        plug_details \u003d self._compile_port_attach_info(port_id)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_6a2c4c99","line":367,"range":{"start_line":367,"start_character":8,"end_line":367,"end_character":29},"updated":"2017-09-19 11:47:52.000000000","message":"without _ ?\n(because called from outside the class)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"80e586d97dea85b235bac2852f3c4c497e5e5fcc","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        \"\"\"Send port detach request to bagpipe-bgp.\"\"\""},{"line_number":369,"context_line":"        plug_details \u003d self._compile_port_attach_info(port_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        for detach_type in detach_infos.keys():"},{"line_number":372,"context_line":"            if detach_type not in plug_details.keys():"},{"line_number":373,"context_line":"                network_id \u003d detach_infos[detach_type].pop(\u0027network_id\u0027)"},{"line_number":374,"context_line":"                detach_infos[detach_type].update({\u0027vpn_instance_id\u0027: \u0027%s_%s\u0027 %"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_6a51ec0e","line":371,"range":{"start_line":371,"start_character":27,"end_line":371,"end_character":46},"updated":"2017-09-19 11:47:52.000000000","message":"For Python3 compat:\n\n   for detach_type in list(detach_infos.keys()):\n\nbecause in python3 .keys() returns an iterator, not a list of the keys","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        \"\"\"Send port detach request to bagpipe-bgp.\"\"\""},{"line_number":369,"context_line":"        plug_details \u003d self._compile_port_attach_info(port_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        for detach_type in detach_infos.keys():"},{"line_number":372,"context_line":"            if detach_type not in plug_details.keys():"},{"line_number":373,"context_line":"                network_id \u003d detach_infos[detach_type].pop(\u0027network_id\u0027)"},{"line_number":374,"context_line":"                detach_infos[detach_type].update({\u0027vpn_instance_id\u0027: \u0027%s_%s\u0027 %"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_8ab780d9","line":371,"range":{"start_line":371,"start_character":27,"end_line":371,"end_character":46},"in_reply_to":"ff5d4b2f_6a51ec0e","updated":"2017-09-19 13:23:06.000000000","message":"I think  the following would be better:\n\n  for detach_vpn_type, detach_info in list(detach_infos.items()):","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                                  (network_id, detach_type),"},{"line_number":376,"context_line":"                                                  \u0027vpn_type\u0027: detach_type})"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"                # Check if plugging an EVPN into an IPVPN"},{"line_number":379,"context_line":"                if (detach_type \u003d\u003d b_const.IPVPN and"},{"line_number":380,"context_line":"                        b_const.EVPN in plug_details):"},{"line_number":381,"context_line":"                    detach_infos[detach_type][\u0027local_port\u0027] \u003d {"},{"line_number":382,"context_line":"                        b_const.EVPN: {"},{"line_number":383,"context_line":"                            \u0027id\u0027: \u0027%s_evpn\u0027 % network_id"},{"line_number":384,"context_line":"                        }"},{"line_number":385,"context_line":"                    }"},{"line_number":386,"context_line":"            else:"},{"line_number":387,"context_line":"                del detach_infos[detach_type]"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_0ad030f7","line":385,"range":{"start_line":378,"start_character":0,"end_line":385,"end_character":21},"updated":"2017-09-19 13:23:06.000000000","message":"This piece of code is duplicated","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"abf8f0b335e085280a205ac8594ad6b55967c103","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        \"\"\""},{"line_number":354,"context_line":"        plug_details \u003d self._compile_port_attach_info(port_id)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        for detach_type in list(detach_infos.keys()):"},{"line_number":357,"context_line":"            if detach_type not in plug_details.keys():"},{"line_number":358,"context_line":"                network_id \u003d detach_infos[detach_type].pop(\u0027network_id\u0027)"},{"line_number":359,"context_line":"                detach_infos[detach_type].update({\u0027vpn_instance_id\u0027: \u0027%s_%s\u0027 %"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_64fd18b0","line":356,"updated":"2017-09-27 13:21:47.000000000","message":"As said earlier: I think  the following would be better:\n\n  for detach_vpn_type, detach_info in list(detach_infos.items()):","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"abf8f0b335e085280a205ac8594ad6b55967c103","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                                                  (network_id, detach_type),"},{"line_number":361,"context_line":"                                                  \u0027vpn_type\u0027: detach_type})"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"                # Check if plugging an EVPN into an IPVPN"},{"line_number":364,"context_line":"                if (detach_type \u003d\u003d b_const.IPVPN and"},{"line_number":365,"context_line":"                        b_const.EVPN in plug_details):"},{"line_number":366,"context_line":"                    detach_infos[detach_type][\u0027local_port\u0027] \u003d {"},{"line_number":367,"context_line":"                        b_const.EVPN: {"},{"line_number":368,"context_line":"                            \u0027id\u0027: \u0027%s_evpn\u0027 % network_id"},{"line_number":369,"context_line":"                        }"},{"line_number":370,"context_line":"                    }"},{"line_number":371,"context_line":"            else:"},{"line_number":372,"context_line":"                del detach_infos[detach_type]"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_641638f4","line":370,"range":{"start_line":363,"start_character":0,"end_line":370,"end_character":21},"updated":"2017-09-27 13:21:47.000000000","message":"As said earlier: this piece of code is duplicated with lines around line 266","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"}],"networking_bagpipe/agent/bagpipe_linuxbridge_neutron_agent.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0e6d582e42849f132106fa5b3aaec40116dee254","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from oslo_service import service"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from networking_bagpipe.agent import agent_base_info"},{"line_number":30,"context_line":"from networking_bagpipe.agent.common import constants as b_const"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from networking_bagpipe.agent.bagpipe_bgp_agent import BaGPipeBGPAgent"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_b1baa4de","line":29,"range":{"start_line":29,"start_character":37,"end_line":29,"end_character":52},"updated":"2017-09-01 13:16:35.000000000","message":"missing file ?","commit_id":"e2eda290345b9f461e99707b734eb54ef97d687a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def initialize(self, connection, driver_type):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # Create an HTTP client for BaGPipe BGP component REST service"},{"line_number":85,"context_line":"        self.bagpipe_bgp_agent \u003d ("},{"line_number":86,"context_line":"            bagpipe_bgp_agent.BaGPipeBGPAgent.get_instance("},{"line_number":87,"context_line":"                n_const.AGENT_TYPE_LINUXBRIDGE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_4a34e84a","line":84,"range":{"start_line":84,"start_character":0,"end_line":84,"end_character":70},"updated":"2017-09-19 13:23:06.000000000","message":"(remove, obsolete description: BaGPipeBGPAgent is much more than an HTTP client)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def initialize(self, connection, driver_type):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # Create an HTTP client for BaGPipe BGP component REST service"},{"line_number":85,"context_line":"        self.bagpipe_bgp_agent \u003d ("},{"line_number":86,"context_line":"            bagpipe_bgp_agent.BaGPipeBGPAgent.get_instance("},{"line_number":87,"context_line":"                n_const.AGENT_TYPE_LINUXBRIDGE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_4318f273","line":84,"range":{"start_line":84,"start_character":0,"end_line":84,"end_character":70},"in_reply_to":"ff5d4b2f_4a34e84a","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                                                  self.ports)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _setup_rpc(self, connection):"},{"line_number":101,"context_line":"            connection.create_consumer(topics.get_topic_name(topics.AGENT,"},{"line_number":102,"context_line":"                                                             topics_BAGPIPE,"},{"line_number":103,"context_line":"                                                             topics.UPDATE,"},{"line_number":104,"context_line":"                                                             cfg.CONF.host),"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_0a271015","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":12},"updated":"2017-09-19 13:23:06.000000000","message":"too much indent here","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                                                  self.ports)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _setup_rpc(self, connection):"},{"line_number":101,"context_line":"            connection.create_consumer(topics.get_topic_name(topics.AGENT,"},{"line_number":102,"context_line":"                                                             topics_BAGPIPE,"},{"line_number":103,"context_line":"                                                             topics.UPDATE,"},{"line_number":104,"context_line":"                                                             cfg.CONF.host),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_032c3a97","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":12},"in_reply_to":"ff5d4b2f_0a271015","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                                                             cfg.CONF.host),"},{"line_number":105,"context_line":"                                       [self], fanout\u003dFalse)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _build_bagpipe_l2_attach_info(self, port_id):"},{"line_number":108,"context_line":"        if port_id not in self.ports_info:"},{"line_number":109,"context_line":"            LOG.warning(\"Service %s has no PortInfo for port %s\","},{"line_number":110,"context_line":"                        BAGPIPE_L2_SERVICE, port_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_ca7fb8a9","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":37},"updated":"2017-09-19 13:23:06.000000000","message":"Remove _ \u003d\u003e this callback will be called from outside this class","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                                                             cfg.CONF.host),"},{"line_number":105,"context_line":"                                       [self], fanout\u003dFalse)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _build_bagpipe_l2_attach_info(self, port_id):"},{"line_number":108,"context_line":"        if port_id not in self.ports_info:"},{"line_number":109,"context_line":"            LOG.warning(\"Service %s has no PortInfo for port %s\","},{"line_number":110,"context_line":"                        BAGPIPE_L2_SERVICE, port_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_e3223ea4","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":37},"in_reply_to":"ff5d4b2f_ca7fb8a9","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            }"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        attach_info[b_const.EVPN].update(dict("},{"line_number":131,"context_line":"            linuxbr\u003dLinuxBridgeManager.get_bridge_name(port_info.network.id)))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        return attach_info"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_0a039044","line":131,"range":{"start_line":130,"start_character":0,"end_line":131,"end_character":78},"updated":"2017-09-19 13:23:06.000000000","message":"why not do this in the dict above (L127) ?","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            }"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        attach_info[b_const.EVPN].update(dict("},{"line_number":131,"context_line":"            linuxbr\u003dLinuxBridgeManager.get_bridge_name(port_info.network.id)))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        return attach_info"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_63364ee9","line":131,"range":{"start_line":130,"start_character":0,"end_line":131,"end_character":78},"in_reply_to":"ff5d4b2f_0a039044","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        return attach_info"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _build_bagpipe_l2_detach_info(self, port_id):"},{"line_number":136,"context_line":"        if port_id not in self.ports_info:"},{"line_number":137,"context_line":"            return {}"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_6a50cc33","line":135,"range":{"start_line":135,"start_character":8,"end_line":135,"end_character":9},"updated":"2017-09-19 13:23:06.000000000","message":"(ok to keep _ here)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        LOG.debug(\"Detaching port %s from bagpipe-bgp\", port_id)"},{"line_number":188,"context_line":"        try:"},{"line_number":189,"context_line":"            detach_info \u003d self._build_bagpipe_l2_detach_info(port_id)"},{"line_number":190,"context_line":"            self.bagpipe_bgp_agent._do_port_plug_refresh(port_id, detach_info)"},{"line_number":191,"context_line":"        except bagpipe_bgp_agent.BaGPipeBGPException as e:"},{"line_number":192,"context_line":"            LOG.error(\"Can\u0027t detach port from bagpipe-bgp: %s\", str(e))"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_8a62e015","line":189,"range":{"start_line":189,"start_character":31,"end_line":189,"end_character":60},"updated":"2017-09-19 13:23:06.000000000","message":"why move the code in yet another function called only once ?","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"abf8f0b335e085280a205ac8594ad6b55967c103","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        LOG.debug(\"Detaching port %s from bagpipe-bgp\", port_id)"},{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            detach_info \u003d self._build_bagpipe_l2_detach_info(port_id)"},{"line_number":189,"context_line":"            self.bagpipe_bgp_agent.do_port_plug_refresh(port_id, detach_info)"},{"line_number":190,"context_line":"        except bagpipe_bgp_agent.BaGPipeBGPException as e:"},{"line_number":191,"context_line":"            LOG.error(\"Can\u0027t detach port from bagpipe-bgp: %s\", str(e))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_44be9cd5","line":188,"range":{"start_line":188,"start_character":31,"end_line":188,"end_character":60},"updated":"2017-09-27 13:21:47.000000000","message":"As said on PS3: why move the code in yet another function called only once ?","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"}],"networking_bagpipe/agent/bgpvpn/agent_extension.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.bagpipe_bgp_agent.register_port_list(bgpvpn_const.BGPVPN_SERVICE,"},{"line_number":151,"context_line":"                                                  self.ports)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.vlan_manager \u003d vlanmanager.LocalVlanManager()"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _setup_rpc(self, connection):"},{"line_number":156,"context_line":"        connection.create_consumer(topics.get_topic_name(topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_ea095c31","line":153,"range":{"start_line":153,"start_character":0,"end_line":153,"end_character":58},"updated":"2017-09-19 13:23:06.000000000","message":"only if agent type is OVS \u003d\u003e move to around line 130 ?","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.bagpipe_bgp_agent.register_port_list(bgpvpn_const.BGPVPN_SERVICE,"},{"line_number":151,"context_line":"                                                  self.ports)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.vlan_manager \u003d vlanmanager.LocalVlanManager()"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _setup_rpc(self, connection):"},{"line_number":156,"context_line":"        connection.create_consumer(topics.get_topic_name(topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_a0255cc4","line":153,"range":{"start_line":153,"start_character":0,"end_line":153,"end_character":58},"in_reply_to":"ff5d4b2f_ea095c31","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":324,"context_line":"    @log_helpers.log_method_call"},{"line_number":325,"context_line":"    def _check_arp_voodoo_plug(self, net_info, gateway_info):"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if (self.bagpipe_bgp_agent.agent_type !\u003d n_const.AGENT_TYPE_OVS):"},{"line_number":328,"context_line":"            return"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # See if we need to update gateway redirection and gateway ARP"},{"line_number":331,"context_line":"        # voodoo"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_050f012f","line":328,"range":{"start_line":327,"start_character":0,"end_line":328,"end_character":18},"updated":"2017-09-19 13:23:06.000000000","message":"I would suggest to add a self.is_ovs() method instead of doing such a long test in multiple places.  And I would suggest the implementation of the test to be done rather like L116.","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":324,"context_line":"    @log_helpers.log_method_call"},{"line_number":325,"context_line":"    def _check_arp_voodoo_plug(self, net_info, gateway_info):"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if (self.bagpipe_bgp_agent.agent_type !\u003d n_const.AGENT_TYPE_OVS):"},{"line_number":328,"context_line":"            return"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # See if we need to update gateway redirection and gateway ARP"},{"line_number":331,"context_line":"        # voodoo"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_402a2890","line":328,"range":{"start_line":327,"start_character":0,"end_line":328,"end_character":18},"in_reply_to":"ff5d4b2f_050f012f","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    @log_helpers.log_method_call"},{"line_number":347,"context_line":"    def _check_arp_voodoo_unplug(self, net_id):"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        if (self.bagpipe_bgp_agent.agent_type !\u003d n_const.AGENT_TYPE_OVS):"},{"line_number":350,"context_line":"            return"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        net_info \u003d self.networks_info.get(net_id)"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_452619ba","line":350,"range":{"start_line":349,"start_character":0,"end_line":350,"end_character":18},"updated":"2017-09-19 13:23:06.000000000","message":"see L327","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    @log_helpers.log_method_call"},{"line_number":347,"context_line":"    def _check_arp_voodoo_unplug(self, net_id):"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        if (self.bagpipe_bgp_agent.agent_type !\u003d n_const.AGENT_TYPE_OVS):"},{"line_number":350,"context_line":"            return"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        net_info \u003d self.networks_info.get(net_id)"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_201bac81","line":350,"range":{"start_line":349,"start_character":0,"end_line":350,"end_character":18},"in_reply_to":"ff5d4b2f_452619ba","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                    LOG.warning(\"BGPVPN type L2 (EVPN) is not supported with \""},{"line_number":500,"context_line":"                                \"OVS yet\")"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"                detach_infos[service_type].update({"},{"line_number":503,"context_line":"                    \u0027local_port\u0027: {"},{"line_number":504,"context_line":"                        \u0027ovs\u0027: {"},{"line_number":505,"context_line":"                            \u0027plugged\u0027: True,"},{"line_number":506,"context_line":"                            \u0027port_number\u0027: self.patch_mpls_from_tun_ofport,"},{"line_number":507,"context_line":"                            \u0027to_vm_port_number\u0027: self.patch_mpls_to_tun_ofport,"},{"line_number":508,"context_line":"                            \u0027vlan\u0027: vlan"},{"line_number":509,"context_line":"                        }"},{"line_number":510,"context_line":"                    }"},{"line_number":511,"context_line":"                })"},{"line_number":512,"context_line":"            else:"},{"line_number":513,"context_line":"                if b_const.IPVPN in detach_infos:"},{"line_number":514,"context_line":"                    # the interface we need to pass to bagpipe is the"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_c5fe89ad","line":511,"range":{"start_line":502,"start_character":0,"end_line":511,"end_character":18},"updated":"2017-09-19 13:23:06.000000000","message":"really needed for a detach ?\n(if yes, maybe we should file a LP bug to track the fact that it would be better if bagpipe-bgp would track that)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            self._is_last_bgpvpn_info(net_info, bgpvpn)"},{"line_number":575,"context_line":"        )"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"        if self.bagpipe_bgp_agent.agent_type \u003d\u003d n_const.AGENT_TYPE_OVS:"},{"line_number":578,"context_line":"            if (last_bgpvpn or"},{"line_number":579,"context_line":"                    not has_attachement(updated_info, bgpvpn_const.BGPVPN_L3)):"},{"line_number":580,"context_line":"                self._check_arp_voodoo_unplug(net_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_65dc7d46","line":577,"range":{"start_line":577,"start_character":0,"end_line":577,"end_character":71},"updated":"2017-09-19 13:23:06.000000000","message":"this check can be removed since its also done inside check_arp_voodo_unplug","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            self._is_last_bgpvpn_info(net_info, bgpvpn)"},{"line_number":575,"context_line":"        )"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"        if self.bagpipe_bgp_agent.agent_type \u003d\u003d n_const.AGENT_TYPE_OVS:"},{"line_number":578,"context_line":"            if (last_bgpvpn or"},{"line_number":579,"context_line":"                    not has_attachement(updated_info, bgpvpn_const.BGPVPN_L3)):"},{"line_number":580,"context_line":"                self._check_arp_voodoo_unplug(net_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_a313265c","line":577,"range":{"start_line":577,"start_character":0,"end_line":577,"end_character":71},"in_reply_to":"ff5d4b2f_65dc7d46","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"dc6d1869606c9041bc77eb49299786829c548537","unresolved":false,"context_lines":[{"line_number":663,"context_line":"        finally:"},{"line_number":664,"context_line":"            self._remove_network_port_infos(net_id, port_id)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"            self.ports.remove(port_id)"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"    @log_helpers.log_method_call"},{"line_number":669,"context_line":"    def handle_port(self, context, data):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_3beea888","line":666,"range":{"start_line":666,"start_character":0,"end_line":666,"end_character":38},"updated":"2017-09-19 13:45:14.000000000","message":"fulstack tests are raising an exception here (port_id not in self.ports): I think this can happen if a detach RPC is sent while not attach RPC was sent (the bgpvpn driver sometimes does this), we need better error handling here to avoid poluting the logs","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"753bd4632f3ae06ae37fd63ccaae8e3a57ceb2c2","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"bagpipe_bgp_opts \u003d ["},{"line_number":69,"context_line":"    cfg.StrOpt(\u0027mpls_bridge\u0027, default\u003d\u0027br-mpls\u0027,"},{"line_number":70,"context_line":"               help\u003d_(\"OVS MPLS bridge to use\")),"},{"line_number":71,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_62f18b95","line":68,"range":{"start_line":68,"start_character":0,"end_line":68,"end_character":16},"updated":"2017-09-27 13:13:39.000000000","message":"For documentation, we need this list to be included in the method at https://github.com/openstack/networking-bagpipe/blob/master/networking_bagpipe/opts.py#L32","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"abf8f0b335e085280a205ac8594ad6b55967c103","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                    LOG.warning(\"BGPVPN type L2 (EVPN) is not supported with \""},{"line_number":496,"context_line":"                                \"OVS yet\")"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"                detach_infos[service_type].update({"},{"line_number":499,"context_line":"                    \u0027local_port\u0027: {"},{"line_number":500,"context_line":"                        \u0027ovs\u0027: {"},{"line_number":501,"context_line":"                            \u0027plugged\u0027: True,"},{"line_number":502,"context_line":"                            \u0027port_number\u0027: self.patch_mpls_to_tun_ofport,"},{"line_number":503,"context_line":"                            \u0027vlan\u0027: vlan"},{"line_number":504,"context_line":"                        }"},{"line_number":505,"context_line":"                    }"},{"line_number":506,"context_line":"                })"},{"line_number":507,"context_line":"            else:"},{"line_number":508,"context_line":"                if b_const.IPVPN in detach_infos:"},{"line_number":509,"context_line":"                    # the interface we need to pass to bagpipe is the"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_c4d16c25","line":506,"range":{"start_line":498,"start_character":0,"end_line":506,"end_character":18},"updated":"2017-09-27 13:21:47.000000000","message":"As said on PS3: really needed for a detach ? (if yes, maybe we should file a LP bug to track the fact that it would be better if bagpipe-bgp would track that)","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"abf8f0b335e085280a205ac8594ad6b55967c103","unresolved":false,"context_lines":[{"line_number":655,"context_line":"        finally:"},{"line_number":656,"context_line":"            self._remove_network_port_infos(net_id, port_id)"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"            self.ports.remove(port_id)"},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"    @log_helpers.log_method_call"},{"line_number":661,"context_line":"    def handle_port(self, context, data):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_64a758a9","line":658,"range":{"start_line":658,"start_character":22,"end_line":658,"end_character":23},"updated":"2017-09-27 13:21:47.000000000","message":"As said on PS3: fulstack tests are raising an exception here (port_id not in self.ports): I think this can happen if a detach RPC is sent while not attach RPC was sent (the bgpvpn driver sometimes does this), we need better error handling here to avoid poluting the logs","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"}],"networking_bagpipe/agent/bgpvpn/constants.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":21,"context_line":"FALLBACK_SRC_MAC \u003d \"00:00:5e:2a:10:00\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# BGPVPN service VPN types"},{"line_number":24,"context_line":"BGPVPN_L2 \u003d \u0027l2vpn\u0027"},{"line_number":25,"context_line":"BGPVPN_L3 \u003d \u0027l3vpn\u0027"},{"line_number":26,"context_line":"BGPVPN_TYPES \u003d [BGPVPN_L2, BGPVPN_L3]"},{"line_number":27,"context_line":"# Map from BGPVPN service VPN types to bagpipe-bgp VPN types"},{"line_number":28,"context_line":"BGPVPN_TYPES_MAP \u003d {BGPVPN_L2: b_const.EVPN, BGPVPN_L3: b_const.IPVPN}"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_25944544","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":19},"updated":"2017-09-19 13:23:06.000000000","message":"import these consts from networking_bgpvpn ?","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":19990,"name":"Yannick Thomas","email":"ythomas1.ext@orange.com","username":"ythomas1"},"change_message_id":"e3a8330bfe4aa10a17045ae3f15574910a1eae35","unresolved":false,"context_lines":[{"line_number":21,"context_line":"FALLBACK_SRC_MAC \u003d \"00:00:5e:2a:10:00\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# BGPVPN service VPN types"},{"line_number":24,"context_line":"BGPVPN_L2 \u003d \u0027l2vpn\u0027"},{"line_number":25,"context_line":"BGPVPN_L3 \u003d \u0027l3vpn\u0027"},{"line_number":26,"context_line":"BGPVPN_TYPES \u003d [BGPVPN_L2, BGPVPN_L3]"},{"line_number":27,"context_line":"# Map from BGPVPN service VPN types to bagpipe-bgp VPN types"},{"line_number":28,"context_line":"BGPVPN_TYPES_MAP \u003d {BGPVPN_L2: b_const.EVPN, BGPVPN_L3: b_const.IPVPN}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_a060bc02","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":19},"in_reply_to":"ff5d4b2f_25944544","updated":"2017-09-27 12:51:25.000000000","message":"Done","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"}],"networking_bagpipe/tests/unit/agent/bagpipe_bgp_agent/base.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    service_info[vpn_type][rt_type]"},{"line_number":140,"context_line":"                )"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if self.agent.agent_type \u003d\u003d n_const.AGENT_TYPE_OVS:"},{"line_number":143,"context_line":"            for vpn_type in (vt for vt in b_const.VPN_TYPES"},{"line_number":144,"context_line":"                             if vt in attach_info):"},{"line_number":145,"context_line":"                attach_info[vpn_type].update({"},{"line_number":146,"context_line":"                    \u0027local_port\u0027: {"},{"line_number":147,"context_line":"                        \u0027ovs\u0027: {"},{"line_number":148,"context_line":"                            \u0027plugged\u0027: True,"},{"line_number":149,"context_line":"                            \u0027port_number\u0027: PATCH_MPLS_FROM_TUN_OFPORT,"},{"line_number":150,"context_line":"                            \u0027to_vm_port_number\u0027: PATCH_MPLS_TO_TUN_OFPORT,"},{"line_number":151,"context_line":"                            \u0027vlan\u0027: 1"},{"line_number":152,"context_line":"                        }"},{"line_number":153,"context_line":"                    }"},{"line_number":154,"context_line":"                })"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            if b_const.IPVPN in attach_info:"},{"line_number":157,"context_line":"                # Add fallback information if needed as well"},{"line_number":158,"context_line":"                if port_info.network.gateway_info.mac:"},{"line_number":159,"context_line":"                    attach_info[b_const.IPVPN].update({"},{"line_number":160,"context_line":"                        \u0027fallback\u0027: {"},{"line_number":161,"context_line":"                            \u0027dst_mac\u0027: port_info.network.gateway_info.mac,"},{"line_number":162,"context_line":"                            \u0027src_mac\u0027: bgpvpn_const.FALLBACK_SRC_MAC,"},{"line_number":163,"context_line":"                            \u0027ovs_port_number\u0027: PATCH_MPLS_TO_INT_OFPORT"},{"line_number":164,"context_line":"                        }"},{"line_number":165,"context_line":"                    })"},{"line_number":166,"context_line":"        else:"},{"line_number":167,"context_line":"            if b_const.EVPN in attach_info:"},{"line_number":168,"context_line":"                attach_info[b_const.EVPN][\u0027linuxbr\u0027] \u003d \u0027bridge1\u0027"},{"line_number":169,"context_line":"            if b_const.IPVPN in attach_info:"},{"line_number":170,"context_line":"                # the interface we need to pass to bagpipe is the"},{"line_number":171,"context_line":"                # bridge"},{"line_number":172,"context_line":"                attach_info[b_const.IPVPN][\u0027local_port\u0027] \u003d {"},{"line_number":173,"context_line":"                    \u0027linuxif\u0027: \u0027bridge1\u0027"},{"line_number":174,"context_line":"                }"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        return attach_info"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_e01bbb70","line":174,"range":{"start_line":142,"start_character":0,"end_line":174,"end_character":17},"updated":"2017-09-19 13:23:06.000000000","message":"We need to discuss how the unit tests are done, because if our unit test code is a near copy-paste of the code we test, it is a sign that we are on the wrong track: we don\u0027t test that the tested code actually does what we want, but just check that we have the same thing on both sides (which if we do a near copy paste is likely). It is also much more code to maintain.","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"}],"networking_bagpipe/tests/unit/agent/bagpipe_bgp_agent/test_multiple_agent_extension.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Orange."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_80519f11","line":1,"range":{"start_line":1,"start_character":18,"end_line":1,"end_character":20},"updated":"2017-09-19 13:23:06.000000000","message":"17","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"8b608461aca33eee786c8ba16624e1b92a083842","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                                           self.agent_ext2._build_port_info)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _merge_rts(self, rt1, rt2):"},{"line_number":47,"context_line":"        return {k: rt1[k] + rt2[k] for k in rt1}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_evpns_port_plug(self):"},{"line_number":50,"context_line":"        port_info1 \u003d copy.copy(const.PORT_INFO1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_c405ec47","line":47,"range":{"start_line":47,"start_character":19,"end_line":47,"end_character":34},"updated":"2017-09-27 13:25:51.000000000","message":"See http://logs.openstack.org/82/499982/4/check/gate-networking-bagpipe-python27-ubuntu-xenial/571d046/testr_results.html.gz\n\nI think you need as values of this dict, instead of lists, things that will compare without taking the order into account, because the order in which the processing is done is not predictable.","commit_id":"ca4ae4c0c7c266ec78891a85015c523061831ef4"}],"networking_bagpipe/tests/unit/agent/test_bgpvpn_agent_extension.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        self.agent_ext.update_bgpvpn(None, dummy_bgpvpn1)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        self.assertEqual(0, self.mocked_bagpipe_agent._do_port_plug.call_count,"},{"line_number":37,"context_line":"                         \"Do port plug mustn\u0027t be called\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_update_bgpvpn_already_plugged_ports(self):"},{"line_number":40,"context_line":"        dummy_port10 \u003d base.DummyPort(base.NETWORK1,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_0047ef1f","line":37,"range":{"start_line":36,"start_character":0,"end_line":37,"end_character":58},"updated":"2017-09-19 13:23:06.000000000","message":"x.assert_not_called ?\n(no need for a comment)","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.assertEqual(self.mocked_bagpipe_agent._do_port_plug.call_count, 0)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Verify attachments list consistency"},{"line_number":55,"context_line":"        self._check_network_info(base.NETWORK1[\u0027id\u0027],"},{"line_number":56,"context_line":"                                 2)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self.agent_ext.update_bgpvpn(None, dummy_bgpvpn1)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_a0b703d9","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":35},"updated":"2017-09-19 13:23:06.000000000","message":"I think we should perhaps write the test in a way that does not depend on how the extension stores the information internally, but only checks that the callback produce the expected output when called after an RPC call (only the part at L71+).","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"172806cc138156fc354c6859cbc9f6f9ae50c480","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            port_with_bgpvpn.update(dummy_bgpvpn1)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            self.assertEqual("},{"line_number":77,"context_line":"                self._expected_build_callback([bgpvpn_const.BGPVPN_L3],"},{"line_number":78,"context_line":"                                              port_with_bgpvpn),"},{"line_number":79,"context_line":"                self.agent_ext._build_bgpvpn_attach_info(port[\u0027id\u0027])"},{"line_number":80,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff5d4b2f_007a4f23","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":45},"updated":"2017-09-19 13:23:06.000000000","message":"The trouble is that we end up with a method in BaseTestAgentExtension._expected_build_callback which has the details about specific feature/behavior of a specific service or agent type (linuxbr, or fallback): this is a sign that the code is too much factored out for a test. We have to read to much code to understand what is expected output of a function being tested.","commit_id":"234a4ce7e1a9ae0d1e0fac23b0d87e28281a3669"}]}
