)]}'
{"networking_bagpipe/agent/bagpipe_bgp_agent.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0d7674eb1dc6eeee33102932f0df3b3f38cc854e","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    def get_instance(cls, agent_type, connection, **kwargs):"},{"line_number":287,"context_line":"        # double checked locking"},{"line_number":288,"context_line":"        if not cls.has_instance():"},{"line_number":289,"context_line":"            cls._create_instance(agent_type, connection, **kwargs)"},{"line_number":290,"context_line":"        return cls._instance"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def __init__(self, agent_type, connection, int_br\u003dNone, tun_br\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_51a7d950","line":289,"updated":"2017-09-04 12:05:32.000000000","message":"else:\n    # check here that agent_type matches the agent_type of\n    # the already created instance","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"dd09615d239225aedfdb4b00aa65113b76c64006","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    _instance \u003d None"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    agent_type \u003d None"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    # bagpipe-bgp status"},{"line_number":270,"context_line":"    BAGPIPEBGP_UP \u003d \u0027UP\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_09d7e551","line":267,"range":{"start_line":267,"start_character":0,"end_line":267,"end_character":21},"updated":"2017-09-04 13:57:24.000000000","message":"I think agent_type should be instance scope.","commit_id":"550bdecf72433a37b66db2bdd85e47707586758b"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"dd09615d239225aedfdb4b00aa65113b76c64006","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not cls.has_instance():"},{"line_number":291,"context_line":"            cls._create_instance(agent_type, connection, **kwargs)"},{"line_number":292,"context_line":"        else:"},{"line_number":293,"context_line":"            if cls.agent_type !\u003d agent_type:"},{"line_number":294,"context_line":"                raise Exception(\"Agent already configured with another type\")"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        return cls._instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_89d4f548","line":293,"range":{"start_line":293,"start_character":15,"end_line":293,"end_character":18},"updated":"2017-09-04 13:57:24.000000000","message":"cls._instance.agent_type","commit_id":"550bdecf72433a37b66db2bdd85e47707586758b"}],"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":"4d75d3ea8845de862d1fed591706fc9698511b97","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LB_BAGPIPE_AGENT_BINARY \u003d \u0027neutron-bagpipe-linuxbridge-agent\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"eventlet.monkey_patch()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class LinuxBridgeManagerBaGPipe(LinuxBridgeManager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_7c6bfbf0","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":23},"updated":"2017-09-01 09:11:13.000000000","message":"If I\u0027m correct, there were strong reason to have the eventlet monkey patching done very early, why the change ?","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4d75d3ea8845de862d1fed591706fc9698511b97","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            n_const.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":72,"context_line":"            connection)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if (self.bagpipe_bgp_agent.agent_type !\u003d"},{"line_number":75,"context_line":"                n_const.AGENT_TYPE_LINUXBRIDGE):"},{"line_number":76,"context_line":"            raise Exception(\"agent already configured with another type\")"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def handle_port(self, context, data):"},{"line_number":79,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_9c66a729","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":73},"updated":"2017-09-01 09:11:13.000000000","message":"It seems to me that we will never hit this one, because that would mean that in a common process BaGPipeBGPAgent has been instantiated with a different agent type.","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"dd09615d239225aedfdb4b00aa65113b76c64006","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from oslo_service import service"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from networking_bagpipe.agent.bagpipe_bgp_agent import BaGPipeBGPAgent"},{"line_number":28,"context_line":"from networking_bagpipe.driver.type_route_target import TYPE_ROUTE_TARGET"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from neutron.agent.l2 import agent_extension"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_2973c182","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":70},"updated":"2017-09-04 13:57:24.000000000","message":"better not to change this import (openstack policy to avoid direct imports into a module)","commit_id":"550bdecf72433a37b66db2bdd85e47707586758b"}],"networking_bagpipe/agent/bgpvpn/agent_extension.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4d75d3ea8845de862d1fed591706fc9698511b97","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                tun_br\u003dtun_br"},{"line_number":53,"context_line":"            )"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            if self.bagpipe_bgp_agent.agent_type !\u003d n_const.AGENT_TYPE_OVS:"},{"line_number":56,"context_line":"                raise Exception(\"agent already configured with another type\")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        elif driver_type \u003d\u003d lnxbridge_agt_constants.EXTENSION_DRIVER_TYPE:"},{"line_number":59,"context_line":"            self.bagpipe_bgp_agent \u003d BaGPipeBGPAgent.get_instance("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_3c7573cd","line":56,"range":{"start_line":55,"start_character":8,"end_line":56,"end_character":77},"updated":"2017-09-01 09:11:13.000000000","message":"(same comment as earlier)","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4d75d3ea8845de862d1fed591706fc9698511b97","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                n_const.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":61,"context_line":"                connection)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"            if (self.bagpipe_bgp_agent.agent_type !\u003d"},{"line_number":64,"context_line":"                    n_const.AGENT_TYPE_LINUXBRIDGE):"},{"line_number":65,"context_line":"                raise Exception(\"agent already configured with another type\")"},{"line_number":66,"context_line":"        else:"},{"line_number":67,"context_line":"            raise Exception(\"driver type not supported: %s\", driver_type)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_9c4fc791","line":65,"range":{"start_line":63,"start_character":10,"end_line":65,"end_character":77},"updated":"2017-09-01 09:11:13.000000000","message":"ditto","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"dd09615d239225aedfdb4b00aa65113b76c64006","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"from oslo_log import helpers as log_helpers"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from networking_bagpipe.agent.bagpipe_bgp_agent import BaGPipeBGPAgent"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from neutron_lib import constants as n_const"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_890755ca","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":70},"updated":"2017-09-04 13:57:24.000000000","message":"ditto","commit_id":"550bdecf72433a37b66db2bdd85e47707586758b"}],"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":"0d7674eb1dc6eeee33102932f0df3b3f38cc854e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                  ovs_agt_constants.EXTENSION_DRIVER_TYPE,"},{"line_number":49,"context_line":"                                  )"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def tearDown(self):"},{"line_number":52,"context_line":"        self.agent_ext.bagpipe_bgp_agent.clear_instance()"},{"line_number":53,"context_line":"        super(TestOVSAgentExtension, self).tearDown()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class TestLinuxbridgeAgentExtension(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_d13e29d9","line":53,"range":{"start_line":51,"start_character":0,"end_line":53,"end_character":53},"updated":"2017-09-04 12:05:32.000000000","message":"Since tests run in parallel, this does not seem like a reliable solution to ensure that tests don\u0027t interfere between each other.  I think it would be better to *not* use a singleton in these unit tests, but instead patch BaGPipeBGPAgent.get_instance to return a new instance at each call.","commit_id":"24f6c21e0c8ed1367867e01dede70e0e2325a356"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b0d8f8d9dcd64b21b5c9283ee95a3ae534445787","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        self.mocked_bagpipe_bgp_agent \u003d mock.Mock(spec\u003dBaGPipeBGPAgent)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_initialize(self, ):"},{"line_number":70,"context_line":"        agent_extension_api \u003d mock.Mock()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.agent_ext.consume_api(agent_extension_api)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_4cb85be4","line":69,"range":{"start_line":69,"start_character":28,"end_line":69,"end_character":30},"updated":"2017-09-04 14:38:45.000000000","message":"??","commit_id":"760ac0db3f7a1d9f090820daee45b7a2ab1285a0"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4cee36cfbd8a91f2f6715eb8b7e900fe0653311f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            spec\u003dbagpipe_bgp_agent.BaGPipeBGPAgent"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @mock.patch(\u0027networking_bagpipe.agent.bagpipe_bgp_agent.\u0027"},{"line_number":45,"context_line":"                \u0027BaGPipeBGPAgent._setup_mpls_br\u0027)"},{"line_number":46,"context_line":"    def test_initialize(self, mocked_mpls_br):"},{"line_number":47,"context_line":"        int_br \u003d self.br_int_cls(\"br-int\")"},{"line_number":48,"context_line":"        tun_br \u003d self.br_tun_cls(\"br-tun\")"},{"line_number":49,"context_line":"        agent_extension_api \u003d ovs_ext_agt.OVSAgentExtensionAPI(int_br,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_6f98a969","line":46,"range":{"start_line":44,"start_character":0,"end_line":46,"end_character":46},"updated":"2017-09-04 15:20:29.000000000","message":"why this mock ?","commit_id":"bcec5039605bd206549ba4d68498c6984af10fe4"}]}
