)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"036ac39042bc2347405b2912f50a1a447636ff38","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-12-05 17:34:23 +0100"},{"line_number":4,"context_line":"Commit:     marios \u003cmarios@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-08 17:48:00 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds base in-tree functional testing of the ovs_neutron_agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Base setup and utility methods for functional testing of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_f06ddc05","line":6,"updated":"2014-12-08 15:59:08.000000000","message":"We need to decide the scope of this patch, or what is the minimum. I think creation of the bridges is less interesting... The obvious candidate is checking the main flow of creation and binding a port and security groups configuration. What do you think Marios?","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30c2e3c3e4120f0779de86ac7636b91a461ba416","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-12-05 17:34:23 +0100"},{"line_number":4,"context_line":"Commit:     marios \u003cmarios@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-08 17:48:00 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds base in-tree functional testing of the ovs_neutron_agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Base setup and utility methods for functional testing of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_7f6fe292","line":6,"in_reply_to":"3a961159_f06ddc05","updated":"2014-12-09 06:59:32.000000000","message":"agreed - this is just to get the bits into play - working out how to initialize the agent etc - I will be adding test cases over the next few days","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adds base in-tree functional testing of the ovs_neutron_agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Base setup and utility methods for functional testing of the"},{"line_number":10,"context_line":"OVS L2 agent. Related to the Functional tests section of the"},{"line_number":11,"context_line":"\"Restructure L2 agent \" spec @"},{"line_number":12,"context_line":"I51a351a53ab896661b65a18bc2993a7ed232b0ac"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_f7eb0bae","line":10,"updated":"2014-12-16 18:02:39.000000000","message":"instead of these lines why not simply\n\nImplements: blueprint restructure-l2-agent","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"}],"neutron/tests/functional/agent/test_l2_ovs_agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4b32c021c65c34f968f6e603f2e34c45234c054c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(L2AgentOVSTestFramework, self).setUp()"},{"line_number":41,"context_line":"        self.check_sudo_enabled()"},{"line_number":42,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027 +"},{"line_number":43,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":44,"context_line":"        mock.patch(plugin_str).start()"},{"line_number":45,"context_line":"        self.agent \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fdf3da70","line":42,"updated":"2014-12-09 09:17:51.000000000","message":"Plus is not needed here.","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"64e84ed072772389312d2e1fcad510348255610e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(L2AgentOVSTestFramework, self).setUp()"},{"line_number":41,"context_line":"        self.check_sudo_enabled()"},{"line_number":42,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027 +"},{"line_number":43,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":44,"context_line":"        mock.patch(plugin_str).start()"},{"line_number":45,"context_line":"        self.agent \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_38bef4b4","line":42,"in_reply_to":"3a961159_fdf3da70","updated":"2014-12-11 13:23:15.000000000","message":"thanks! bad habbits ;)","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4b32c021c65c34f968f6e603f2e34c45234c054c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def new_agent(self, tunnel_types\u003dp_const.TYPE_VXLAN):"},{"line_number":62,"context_line":"        local_ip \u003d \u0027192.168.1.1\u0027"},{"line_number":63,"context_line":"        bridge_mappings \u003d {}"},{"line_number":64,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"},{"line_number":65,"context_line":"                                               local_ip, bridge_mappings,"},{"line_number":66,"context_line":"                                               cfg.CONF.root_helper,"},{"line_number":67,"context_line":"                                               polling_interval\u003d10,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_7848d82d","line":64,"updated":"2014-12-09 09:17:51.000000000","message":"Suggestion: Consider returning the agent and calling it:\n\n self.agent \u003d self.create_agent()","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"64e84ed072772389312d2e1fcad510348255610e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def new_agent(self, tunnel_types\u003dp_const.TYPE_VXLAN):"},{"line_number":62,"context_line":"        local_ip \u003d \u0027192.168.1.1\u0027"},{"line_number":63,"context_line":"        bridge_mappings \u003d {}"},{"line_number":64,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"},{"line_number":65,"context_line":"                                               local_ip, bridge_mappings,"},{"line_number":66,"context_line":"                                               cfg.CONF.root_helper,"},{"line_number":67,"context_line":"                                               polling_interval\u003d10,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d8f09093","line":64,"in_reply_to":"3a961159_7848d82d","updated":"2014-12-11 13:23:15.000000000","message":"sure, will probably make more sense once it is used elsewhere too (right now am just initialising it), will revisit.","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4b32c021c65c34f968f6e603f2e34c45234c054c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            ovs.delete_bridge(bridge)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def assert_bridge(self, br, exists\u003dTrue):"},{"line_number":80,"context_line":"        if exists:"},{"line_number":81,"context_line":"            self.assertEqual(True, self.ovs.bridge_exists(br))"},{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            self.assertEqual(False, self.ovs.bridge_exists(br))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5d894ec9","line":80,"updated":"2014-12-09 09:17:51.000000000","message":"self.assertEqual(exists, self.ovs.bridge_exists(br))","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"64e84ed072772389312d2e1fcad510348255610e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            ovs.delete_bridge(bridge)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def assert_bridge(self, br, exists\u003dTrue):"},{"line_number":80,"context_line":"        if exists:"},{"line_number":81,"context_line":"            self.assertEqual(True, self.ovs.bridge_exists(br))"},{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            self.assertEqual(False, self.ovs.bridge_exists(br))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_f8ed4cb8","line":80,"in_reply_to":"3a961159_5d894ec9","updated":"2014-12-11 13:23:15.000000000","message":"thanks :)","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4b32c021c65c34f968f6e603f2e34c45234c054c","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        ports \u003d [self.patch_tun, self.patch_int]"},{"line_number":92,"context_line":"        for i, port in enumerate(ports):"},{"line_number":93,"context_line":"            toks \u003d ovs_res.split(\"Interface %s\" % port)"},{"line_number":94,"context_line":"            self.assertTrue(\u0027options: {peer\u003d%s}\u0027 % ports[(i + 1) % 2]"},{"line_number":95,"context_line":"                            in toks[1])"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def assert_bridge_ports(self, port_names\u003d[]):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_f804c816","line":94,"updated":"2014-12-09 09:17:51.000000000","message":"Nice","commit_id":"77a17e405f4fc1e94d9ed6eb22b7e2b5ad64e262"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":28,"context_line":"from neutron.tests.functional.common import utils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo.config import cfg"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1725f709","line":30,"updated":"2014-12-16 18:02:39.000000000","message":"nit: you should move this line before line 19, see http://docs.openstack.org/developer/hacking/#imports","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":28,"context_line":"from neutron.tests.functional.common import utils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo.config import cfg"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5e02f63e","line":30,"in_reply_to":"3a961159_1725f709","updated":"2014-12-23 17:01:25.000000000","message":"thanks!","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027"},{"line_number":49,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":50,"context_line":"        mock.patch(plugin_str).start()"},{"line_number":51,"context_line":"        self.agent \u003d None"},{"line_number":52,"context_line":"        self._configure_agent()"},{"line_number":53,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(cfg.CONF.root_helper)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3a649ae4","line":51,"updated":"2014-12-16 18:02:39.000000000","message":"Is this line needed?","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027"},{"line_number":49,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":50,"context_line":"        mock.patch(plugin_str).start()"},{"line_number":51,"context_line":"        self.agent \u003d None"},{"line_number":52,"context_line":"        self._configure_agent()"},{"line_number":53,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(cfg.CONF.root_helper)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_bee03a97","line":51,"in_reply_to":"3a961159_3a649ae4","updated":"2014-12-23 17:01:25.000000000","message":"mostly for clarify -  want to be explicit about the agent being set when new_agent is called for test cases that need it","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            mask \u003d netaddr.IPNetwork(subnet_dict.cidr).prefixlen"},{"line_number":96,"context_line":"            ip_cidrs \u003d [\"%s/%s\" % (port_dict.fixed_ips[0][\u0027ip_address\u0027], mask)]"},{"line_number":97,"context_line":"            driver.init_l3(vif_name, ip_cidrs)"},{"line_number":98,"context_line":"            self.agent.port_bound(vif_port, net_id, p_const.TYPE_VXLAN,"},{"line_number":99,"context_line":"                                  None, \"%s\" % (i), [], \u0027foo\u0027, False)"},{"line_number":100,"context_line":"            ports.append(port_dict)"},{"line_number":101,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_da25565d","line":98,"updated":"2014-12-16 18:02:39.000000000","message":"I don\u0027t think in a functional test you should call the agent method directly. We actually want to test that the agent binds the port...I understand that in order to do that the test needs to be modified a lot. For example you will have to use the plugin method to create ports, subnets, ecc. I am just wondering if there\u0027s a value in the test the way it is. I see some value in checking that the agent at startup correctly configures the bridges. I\u0027d probably remove this method and lines 142-144 and create another test, test_assert_port_binding or something like that where you issue a plugin.create_port and you check that the agent has actually bound the port. What do you think?","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            mask \u003d netaddr.IPNetwork(subnet_dict.cidr).prefixlen"},{"line_number":96,"context_line":"            ip_cidrs \u003d [\"%s/%s\" % (port_dict.fixed_ips[0][\u0027ip_address\u0027], mask)]"},{"line_number":97,"context_line":"            driver.init_l3(vif_name, ip_cidrs)"},{"line_number":98,"context_line":"            self.agent.port_bound(vif_port, net_id, p_const.TYPE_VXLAN,"},{"line_number":99,"context_line":"                                  None, \"%s\" % (i), [], \u0027foo\u0027, False)"},{"line_number":100,"context_line":"            ports.append(port_dict)"},{"line_number":101,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d27e67e3","line":98,"in_reply_to":"3a961159_ad8cd636","updated":"2014-12-23 17:01:25.000000000","message":"thanks very much Rossella and Assaf -- I\u0027m still trying to work out the right thing to do here...\n\nso in my mind when working on both this and the dhcp tests was testing the agent functionally but in isolation (and mocking/initialising only so much of the system as is necessary) - I have moved this as a comment to the front page for discussion visibilitiy","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"0faa405e80ce2c70f3c06986c9ac39deef8a8ad0","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            mask \u003d netaddr.IPNetwork(subnet_dict.cidr).prefixlen"},{"line_number":96,"context_line":"            ip_cidrs \u003d [\"%s/%s\" % (port_dict.fixed_ips[0][\u0027ip_address\u0027], mask)]"},{"line_number":97,"context_line":"            driver.init_l3(vif_name, ip_cidrs)"},{"line_number":98,"context_line":"            self.agent.port_bound(vif_port, net_id, p_const.TYPE_VXLAN,"},{"line_number":99,"context_line":"                                  None, \"%s\" % (i), [], \u0027foo\u0027, False)"},{"line_number":100,"context_line":"            ports.append(port_dict)"},{"line_number":101,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_ad8cd636","line":98,"in_reply_to":"3a961159_da25565d","updated":"2014-12-16 18:33:43.000000000","message":"I disagree. These agent functional tests (L3 agent, and now metadata, OVS and DHCP) are supposed to test agents in isolation since our agent unit tests kind of suck. The full-stack integration testing and Tempest test the interaction between the controller and its agents.","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            ports.append(port_dict)"},{"line_number":101,"context_line":"        return ports"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _assert_port_data(self, port_dict, bind_port):"},{"line_number":104,"context_line":"            test_utils \u003d utils.FunctionalTestUtils()"},{"line_number":105,"context_line":"            utils._serve_single_request(port_dict.fixed_ips[0][\u0027ip_address\u0027],"},{"line_number":106,"context_line":"                                        bind_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_fa9db25a","line":103,"updated":"2014-12-16 18:02:39.000000000","message":"if I understand correctly bind_port is actually the port number to use for the tcp connection. Consider renaming.","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            ports.append(port_dict)"},{"line_number":101,"context_line":"        return ports"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _assert_port_data(self, port_dict, bind_port):"},{"line_number":104,"context_line":"            test_utils \u003d utils.FunctionalTestUtils()"},{"line_number":105,"context_line":"            utils._serve_single_request(port_dict.fixed_ips[0][\u0027ip_address\u0027],"},{"line_number":106,"context_line":"                                        bind_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d2658745","line":103,"in_reply_to":"3a961159_fa9db25a","updated":"2014-12-23 17:01:25.000000000","message":"Done - based on tidy up and your other comments, I have renamed the method too \u0027def _assert_port_tcp_test(self, port_dict, tcp_port)\u0027","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _assert_port_data(self, port_dict, bind_port):"},{"line_number":104,"context_line":"            test_utils \u003d utils.FunctionalTestUtils()"},{"line_number":105,"context_line":"            utils._serve_single_request(port_dict.fixed_ips[0][\u0027ip_address\u0027],"},{"line_number":106,"context_line":"                                        bind_port)"},{"line_number":107,"context_line":"            self.assertTrue(test_utils._make_single_request("},{"line_number":108,"context_line":"                            port_dict.fixed_ips[0][\u0027ip_address\u0027], bind_port))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_9a4cae78","line":105,"updated":"2014-12-16 18:02:39.000000000","message":"can you add a comment explaining what the method does please? Also consider renaming it. As far as I understand you check that a tcp connection can be established, how does that related to port date? Moreover I think the underscore from _serve_single_request should be removed since it\u0027s used outside of its class","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _assert_port_data(self, port_dict, bind_port):"},{"line_number":104,"context_line":"            test_utils \u003d utils.FunctionalTestUtils()"},{"line_number":105,"context_line":"            utils._serve_single_request(port_dict.fixed_ips[0][\u0027ip_address\u0027],"},{"line_number":106,"context_line":"                                        bind_port)"},{"line_number":107,"context_line":"            self.assertTrue(test_utils._make_single_request("},{"line_number":108,"context_line":"                            port_dict.fixed_ips[0][\u0027ip_address\u0027], bind_port))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_32608b00","line":105,"in_reply_to":"3a961159_9a4cae78","updated":"2014-12-23 17:01:25.000000000","message":"Done","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def assert_bridges(self):"},{"line_number":119,"context_line":"        for br in (self.br_tun, self.br_int):"},{"line_number":120,"context_line":"            self.assert_bridge(br, exists\u003dTrue)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def assert_patch_ports(self):"},{"line_number":123,"context_line":"        ovs_res \u003d self.ovs.run_vsctl([\u0027show\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1a951e88","line":120,"updated":"2014-12-16 18:02:39.000000000","message":"exists\u003dTrue can be removed","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def assert_bridges(self):"},{"line_number":119,"context_line":"        for br in (self.br_tun, self.br_int):"},{"line_number":120,"context_line":"            self.assert_bridge(br, exists\u003dTrue)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def assert_patch_ports(self):"},{"line_number":123,"context_line":"        ovs_res \u003d self.ovs.run_vsctl([\u0027show\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b2339b12","line":120,"in_reply_to":"3a961159_1a951e88","updated":"2014-12-23 17:01:25.000000000","message":"Done","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assert_patch_ports()"},{"line_number":142,"context_line":"        ports \u003d self._create_and_bind_ports()"},{"line_number":143,"context_line":"        for i, port in enumerate(ports):"},{"line_number":144,"context_line":"            self._assert_port_data(port, 9999 + i)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_assert_bridges_ports_no_tunnel(self):"},{"line_number":147,"context_line":"        self.new_agent(tunnel_types\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5ac7a664","line":144,"updated":"2014-12-16 18:02:39.000000000","message":"what\u0027s this magic 9999?","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assert_patch_ports()"},{"line_number":142,"context_line":"        ports \u003d self._create_and_bind_ports()"},{"line_number":143,"context_line":"        for i, port in enumerate(ports):"},{"line_number":144,"context_line":"            self._assert_port_data(port, 9999 + i)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_assert_bridges_ports_no_tunnel(self):"},{"line_number":147,"context_line":"        self.new_agent(tunnel_types\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d2366702","line":144,"in_reply_to":"3a961159_5ac7a664","updated":"2014-12-23 17:01:25.000000000","message":"Done","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"57ef2f9d8de675e388cd0d16243f6684379ace2d","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        for i, port in enumerate(ports):"},{"line_number":91,"context_line":"            vif_name \u003d port.get(\u0027vif_name\u0027)"},{"line_number":92,"context_line":"            vif_port \u003d ovs_lib.VifPort("},{"line_number":93,"context_line":"                vif_name, \"%s\" % (i), \u0027id-%s\u0027 % (i),"},{"line_number":94,"context_line":"                port.get(\u0027mac_address\u0027), self.agent.int_br)"},{"line_number":95,"context_line":"            self.agent.port_bound(vif_port, network.get(\u0027id\u0027),"},{"line_number":96,"context_line":"                                  p_const.TYPE_VLAN,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_3f27ebb7","line":93,"updated":"2015-04-30 22:22:12.000000000","message":"() are not needed","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6e8fa4444401c140b5c044808ef8c7d1264210cb","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        for i, port in enumerate(ports):"},{"line_number":91,"context_line":"            vif_name \u003d port.get(\u0027vif_name\u0027)"},{"line_number":92,"context_line":"            vif_port \u003d ovs_lib.VifPort("},{"line_number":93,"context_line":"                vif_name, \"%s\" % (i), \u0027id-%s\u0027 % (i),"},{"line_number":94,"context_line":"                port.get(\u0027mac_address\u0027), self.agent.int_br)"},{"line_number":95,"context_line":"            self.agent.port_bound(vif_port, network.get(\u0027id\u0027),"},{"line_number":96,"context_line":"                                  p_const.TYPE_VLAN,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_ac1ccc77","line":93,"in_reply_to":"3acd31a7_3f27ebb7","updated":"2015-05-04 11:56:31.000000000","message":"Done","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"57ef2f9d8de675e388cd0d16243f6684379ace2d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self.agent.port_bound(vif_port, network.get(\u0027id\u0027),"},{"line_number":96,"context_line":"                                  p_const.TYPE_VLAN,"},{"line_number":97,"context_line":"                                  physical_network\u003dNone,"},{"line_number":98,"context_line":"                                  segmentation_id\u003d(\"%s\" % (i)),"},{"line_number":99,"context_line":"                                  fixed_ips\u003dport.get(\u0027fixed_ips\u0027),"},{"line_number":100,"context_line":"                                  device_owner\u003dnetwork.get(\u0027tenant_id\u0027),"},{"line_number":101,"context_line":"                                  ovs_restarted\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_1f2aef7e","line":98,"updated":"2015-04-30 22:22:12.000000000","message":"itto","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6e8fa4444401c140b5c044808ef8c7d1264210cb","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self.agent.port_bound(vif_port, network.get(\u0027id\u0027),"},{"line_number":96,"context_line":"                                  p_const.TYPE_VLAN,"},{"line_number":97,"context_line":"                                  physical_network\u003dNone,"},{"line_number":98,"context_line":"                                  segmentation_id\u003d(\"%s\" % (i)),"},{"line_number":99,"context_line":"                                  fixed_ips\u003dport.get(\u0027fixed_ips\u0027),"},{"line_number":100,"context_line":"                                  device_owner\u003dnetwork.get(\u0027tenant_id\u0027),"},{"line_number":101,"context_line":"                                  ovs_restarted\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_8c135066","line":98,"in_reply_to":"3acd31a7_1f2aef7e","updated":"2015-05-04 11:56:31.000000000","message":"Done","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"57ef2f9d8de675e388cd0d16243f6684379ace2d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                \u0027ip_address\u0027], ip_mask)]"},{"line_number":124,"context_line":"            self.driver.init_l3(port.get(\u0027vif_name\u0027), ip_cidrs, namespace\u003dNone)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _cleanup_bridges(self, bridges\u003d[]):"},{"line_number":127,"context_line":"        ovs \u003d ovs_lib.BaseOVS()"},{"line_number":128,"context_line":"        for bridge in bridges:"},{"line_number":129,"context_line":"            ovs.delete_bridge(bridge)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_7f6323dd","line":126,"updated":"2015-04-30 22:22:12.000000000","message":"no need to define a default value for bridges (even more a mutable default)","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6e8fa4444401c140b5c044808ef8c7d1264210cb","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                \u0027ip_address\u0027], ip_mask)]"},{"line_number":124,"context_line":"            self.driver.init_l3(port.get(\u0027vif_name\u0027), ip_cidrs, namespace\u003dNone)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _cleanup_bridges(self, bridges\u003d[]):"},{"line_number":127,"context_line":"        ovs \u003d ovs_lib.BaseOVS()"},{"line_number":128,"context_line":"        for bridge in bridges:"},{"line_number":129,"context_line":"            ovs.delete_bridge(bridge)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_6c16b456","line":126,"in_reply_to":"3acd31a7_7f6323dd","updated":"2015-05-04 11:56:31.000000000","message":"Right","commit_id":"9236f49bd25923b357f5e9f3436fe9f3196ddff1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2219f258b1a04d583b07f39c088a78cec2039914","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":214,"context_line":"        self.polling_manager.start()"},{"line_number":215,"context_line":"        agent_utils.wait_until_true("},{"line_number":216,"context_line":"            lambda: self.polling_manager._monitor.is_active() is True)"},{"line_number":217,"context_line":"        for x in range(3):"},{"line_number":218,"context_line":"            self.ports.append(self._create_test_port_dict())"},{"line_number":219,"context_line":"        self.network \u003d self._create_test_network_dict()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3acd31a7_735d4578","line":216,"updated":"2015-05-09 19:20:02.000000000","message":"you can use directly:\n\n  self.polling_manager._monitor.is_active\n\nas condition method","commit_id":"57256a482f9f38dd3fe888758b1b94a7ffd6bf48"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from oslo_log import log as logging"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":"MAX_LEN_BR \u003d 15"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class L2AgentOVSTestFramework(base.BaseOVSLinuxTestCase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_db8ab41a","line":37,"updated":"2015-05-31 18:15:59.000000000","message":"Is there a reason not to use neutron.common.constants.DEVICE_NAME_MAX_LEN instead?","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from oslo_log import log as logging"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":"MAX_LEN_BR \u003d 15"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class L2AgentOVSTestFramework(base.BaseOVSLinuxTestCase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_2ae685b4","line":37,"in_reply_to":"7a016987_db8ab41a","updated":"2015-06-03 11:17:48.000000000","message":"nope","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                \u0027neutron.agent.linux.iptables_firewall.IptablesFirewallDriver\u0027,"},{"line_number":73,"context_line":"                \"SECURITYGROUP\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def new_agent(self, tunnel_types\u003dp_const.TYPE_VXLAN):"},{"line_number":76,"context_line":"        local_ip \u003d \u0027192.168.10.1\u0027"},{"line_number":77,"context_line":"        bridge_mappings \u003d {\u0027physnet\u0027: self.br_int}"},{"line_number":78,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_9b80bcf8","line":75,"updated":"2015-05-31 18:15:59.000000000","message":"\u0027tunnel_types\u0027 suggests the parameter requires a list, but the default is not a list.  The documentation for OVSNeutronAgent.__init__ also indicates a list is required.  Mindful of the fact that default arguments cannot be lists, consider setting the default in the method body or using a tuple.\n\n(No action required) new_agent -\u003e create_agent\n\nFunction names read better if they are action statements (do_something) rather than result statements (desired_result).","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                \u0027neutron.agent.linux.iptables_firewall.IptablesFirewallDriver\u0027,"},{"line_number":73,"context_line":"                \"SECURITYGROUP\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def new_agent(self, tunnel_types\u003dp_const.TYPE_VXLAN):"},{"line_number":76,"context_line":"        local_ip \u003d \u0027192.168.10.1\u0027"},{"line_number":77,"context_line":"        bridge_mappings \u003d {\u0027physnet\u0027: self.br_int}"},{"line_number":78,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_8a70d9dd","line":75,"in_reply_to":"7a016987_9b80bcf8","updated":"2015-06-03 11:17:48.000000000","message":"Done, thanks!","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"129141406b332d4bda1f6a0d9027a426c2cd632d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        local_ip \u003d \u0027192.168.10.1\u0027"},{"line_number":77,"context_line":"        bridge_mappings \u003d {\u0027physnet\u0027: self.br_int}"},{"line_number":78,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"},{"line_number":79,"context_line":"                                               local_ip, bridge_mappings,"},{"line_number":80,"context_line":"                                               polling_interval\u003d10,"},{"line_number":81,"context_line":"                                               tunnel_types\u003dtunnel_types,"},{"line_number":82,"context_line":"                                               prevent_arp_spoofing\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_196614bb","line":79,"updated":"2015-06-01 01:04:43.000000000","message":"The arguments for OVSNeutronAgent() have changed. You need to rebase and provide two more positional arguments here.","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        local_ip \u003d \u0027192.168.10.1\u0027"},{"line_number":77,"context_line":"        bridge_mappings \u003d {\u0027physnet\u0027: self.br_int}"},{"line_number":78,"context_line":"        self.agent \u003d ovs_agent.OVSNeutronAgent(self.br_int, self.br_tun,"},{"line_number":79,"context_line":"                                               local_ip, bridge_mappings,"},{"line_number":80,"context_line":"                                               polling_interval\u003d10,"},{"line_number":81,"context_line":"                                               tunnel_types\u003dtunnel_types,"},{"line_number":82,"context_line":"                                               prevent_arp_spoofing\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_35ab8a1f","line":79,"in_reply_to":"7a016987_196614bb","updated":"2015-06-03 11:17:48.000000000","message":"Thanks","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    def _bind_ports(self, ports):"},{"line_number":92,"context_line":"        devices \u003d []"},{"line_number":93,"context_line":"        for port in ports:"},{"line_number":94,"context_line":"            dev \u003d self._get_device_details(port)"},{"line_number":95,"context_line":"            vif_name \u003d port.get(\u0027vif_name\u0027)"},{"line_number":96,"context_line":"            vif_id \u003d random.randint(1, 99)"},{"line_number":97,"context_line":"            vif_port \u003d ovs_lib.VifPort("}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_1baccc8a","line":94,"updated":"2015-05-31 18:15:59.000000000","message":"Why is there a dependency on a method that is defined in a subclass?","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    def _bind_ports(self, ports):"},{"line_number":92,"context_line":"        devices \u003d []"},{"line_number":93,"context_line":"        for port in ports:"},{"line_number":94,"context_line":"            dev \u003d self._get_device_details(port)"},{"line_number":95,"context_line":"            vif_name \u003d port.get(\u0027vif_name\u0027)"},{"line_number":96,"context_line":"            vif_id \u003d random.randint(1, 99)"},{"line_number":97,"context_line":"            vif_port \u003d ovs_lib.VifPort("}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_f54a9282","line":94,"in_reply_to":"7a016987_1baccc8a","updated":"2015-06-03 11:17:48.000000000","message":"will move it","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                port.get(\u0027mac_address\u0027), self.agent.int_br)"},{"line_number":100,"context_line":"            dev[\u0027vif_port\u0027] \u003d vif_port"},{"line_number":101,"context_line":"            devices.append(dev)"},{"line_number":102,"context_line":"            self.agent._bind_devices(devices)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _create_test_port_dict(self):"},{"line_number":105,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_5bcda464","line":102,"updated":"2015-05-31 18:15:59.000000000","message":"(No action required) Consider separating creation of the devices from their binding.","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"129141406b332d4bda1f6a0d9027a426c2cd632d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        agent_utils.wait_until_true("},{"line_number":149,"context_line":"            lambda: get_peer(self.patch_tun) \u003d\u003d {\u0027peer\u0027: self.patch_int})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def assert_bridge_ports(self, port_names\u003d[]):"},{"line_number":152,"context_line":"        for port in [self.patch_tun, self.patch_int]:"},{"line_number":153,"context_line":"            self.assertTrue(self.ovs.port_exists(port))"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_79fce8b7","line":151,"updated":"2015-06-01 01:04:43.000000000","message":"port_names not used","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        agent_utils.wait_until_true("},{"line_number":149,"context_line":"            lambda: get_peer(self.patch_tun) \u003d\u003d {\u0027peer\u0027: self.patch_int})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def assert_bridge_ports(self, port_names\u003d[]):"},{"line_number":152,"context_line":"        for port in [self.patch_tun, self.patch_int]:"},{"line_number":153,"context_line":"            self.assertTrue(self.ovs.port_exists(port))"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_953ebed8","line":151,"in_reply_to":"7a016987_79fce8b7","updated":"2015-06-03 11:17:48.000000000","message":"Done","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                self.assertTrue(res)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"class L2AgentOVSTestCase(L2AgentOVSTestFramework):"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":170,"context_line":"                                  missing_devices\u003d[]):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_5b980478","line":167,"updated":"2015-05-31 18:15:59.000000000","message":"(No action required) L2AgentOvsTestCase -\u003e TestL2OvsAgent\n\nPrefixing classes containing tests with \u0027Test\u0027 is a good way to indicate that overriding the class will result in duplicate test execution.","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                self.assertTrue(res)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"class L2AgentOVSTestCase(L2AgentOVSTestFramework):"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":170,"context_line":"                                  missing_devices\u003d[]):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_152bee95","line":167,"in_reply_to":"7a016987_5b980478","updated":"2015-06-03 11:17:48.000000000","message":"Thanks!","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"129141406b332d4bda1f6a0d9027a426c2cd632d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"class L2AgentOVSTestCase(L2AgentOVSTestFramework):"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":170,"context_line":"                                  missing_devices\u003d[]):"},{"line_number":171,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":172,"context_line":"        if not missing_devices:"},{"line_number":173,"context_line":"            missing_devices.extend(expected_devices)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_3919d022","line":170,"updated":"2015-06-01 01:04:43.000000000","message":"Don\u0027t use mutable default arguments, see [1]. But this argument is not used by any caller so I suggest remove it from the args. Just make it a local function variable.\n\n[1] http://docs.python-guide.org/en/latest/writing/gotchas/","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":167,"context_line":"class L2AgentOVSTestCase(L2AgentOVSTestFramework):"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":170,"context_line":"                                  missing_devices\u003d[]):"},{"line_number":171,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":172,"context_line":"        if not missing_devices:"},{"line_number":173,"context_line":"            missing_devices.extend(expected_devices)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_5047341d","line":170,"in_reply_to":"7a016987_3919d022","updated":"2015-06-03 11:17:48.000000000","message":"I used a mutable on purpose. If you look for example at line 236, the goal is to make sure that the server got an update_device_up message for all the devices. There\u0027s no guarantee that the devices will be updated in the same rpc call, could be 2 calls or 3. _expected_plugin_rpc_call will be run until a update_device_up is received for all expected_devices . I need to keep the list of missing devices for subsequent calls of _expected_plugin_rpc_call . Hope it\u0027s clear now.","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"129141406b332d4bda1f6a0d9027a426c2cd632d","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        for dev in args:"},{"line_number":175,"context_line":"            try:"},{"line_number":176,"context_line":"                missing_devices.remove(dev)"},{"line_number":177,"context_line":"            except Exception:"},{"line_number":178,"context_line":"                continue"},{"line_number":179,"context_line":"            if not missing_devices:"},{"line_number":180,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_d9d87c55","line":177,"updated":"2015-06-01 01:04:43.000000000","message":"Can you check for one or a few specific exceptions?","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        for dev in args:"},{"line_number":175,"context_line":"            try:"},{"line_number":176,"context_line":"                missing_devices.remove(dev)"},{"line_number":177,"context_line":"            except Exception:"},{"line_number":178,"context_line":"                continue"},{"line_number":179,"context_line":"            if not missing_devices:"},{"line_number":180,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_b0266866","line":177,"in_reply_to":"7a016987_d9d87c55","updated":"2015-06-03 11:17:48.000000000","message":"yes","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1c5fe725e1ce1f13f929f447048f899f0d2f849c","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            if not missing_devices:"},{"line_number":180,"context_line":"                return True"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _get_ports_details(self):"},{"line_number":183,"context_line":"        details \u003d []"},{"line_number":184,"context_line":"        for port in self.ports:"},{"line_number":185,"context_line":"            dev \u003d {\u0027device\u0027: port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_fba690a9","line":182,"updated":"2015-05-31 18:15:59.000000000","message":"This appears unused.","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"04ead1fd23edccddec85e1af70ebe57c98a7f727","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            if not missing_devices:"},{"line_number":180,"context_line":"                return True"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _get_ports_details(self):"},{"line_number":183,"context_line":"        details \u003d []"},{"line_number":184,"context_line":"        for port in self.ports:"},{"line_number":185,"context_line":"            dev \u003d {\u0027device\u0027: port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_f0d3c036","line":182,"in_reply_to":"7a016987_fba690a9","updated":"2015-06-03 11:17:48.000000000","message":"removed","commit_id":"fc7efa3688a65c76c69255367d5c085e79b396c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8132bb594c156ecb24d90c5fb6d011927faa44cf","unresolved":false,"context_lines":[{"line_number":197,"context_line":"class TestL2OvsAgent(TestFrameworkL2OvsAgent):"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":200,"context_line":"                                  missing_devices\u003d[]):"},{"line_number":201,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":202,"context_line":"        if not missing_devices:"},{"line_number":203,"context_line":"            missing_devices.extend(expected_devices)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_5c9f2ab4","line":200,"updated":"2015-06-04 03:38:39.000000000","message":"A mutable default argument is global to the module because it is instantiated when the file is imported/loaded. This means that missing_devices is one instance shared among all the test cases that use it and they will stomp over each other. This probably explains why the functional test job fails on your patch.\n\nI would just drain expected_devices:\n\n        args \u003d (args[0][1] for args in call.call_args_list)\n        for dev in args:\n            try:\n                expected_devices.remove(dev)\n            except ValueError:\n                continue\n            if not expected_devices:\n                return True\n\nJust make sure the caller provides a freshly-populated expected_devices before each wait_until_true invocation.\n\nI tried the above change and the functional tests pass locally.","commit_id":"c2e51691c9f02d6333584deff3d9d4f99413b064"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1359ba28973395ab493818db570effc938f2ae51","unresolved":false,"context_lines":[{"line_number":197,"context_line":"class TestL2OvsAgent(TestFrameworkL2OvsAgent):"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices,"},{"line_number":200,"context_line":"                                  missing_devices\u003d[]):"},{"line_number":201,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":202,"context_line":"        if not missing_devices:"},{"line_number":203,"context_line":"            missing_devices.extend(expected_devices)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_e9015f07","line":200,"in_reply_to":"5afe65bd_5c9f2ab4","updated":"2015-06-04 15:07:12.000000000","message":"The test is failing for another reason. Anyway I will modify this, as you say it might cause problems when multiple test cases run","commit_id":"c2e51691c9f02d6333584deff3d9d4f99413b064"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8132bb594c156ecb24d90c5fb6d011927faa44cf","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                self.agent.plugin_rpc.update_device_up, ports_ids))"},{"line_number":242,"context_line":"        for port in self.ports:"},{"line_number":243,"context_line":"            self.agent.int_br.delete_port(port[\u0027vif_name\u0027])"},{"line_number":244,"context_line":"        agent_utils.wait_until_true("},{"line_number":245,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":246,"context_line":"                self.agent.plugin_rpc.update_device_down, ports_ids))"},{"line_number":247,"context_line":"        self.agent.run_daemon_loop \u003d False"}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_bc561ed0","line":244,"updated":"2015-06-04 03:38:39.000000000","message":"Re-populate ports-ids here if you take my advice above.","commit_id":"c2e51691c9f02d6333584deff3d9d4f99413b064"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from oslo_config import cfg"},{"line_number":38,"context_line":"from oslo_log import log as logging"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_ec39e642","line":38,"updated":"2015-06-05 13:49:00.000000000","message":"the recommended import group order is std, 3rd-party, and then neutron.","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from oslo_config import cfg"},{"line_number":38,"context_line":"from oslo_log import log as logging"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_686366dd","line":38,"in_reply_to":"3afb71cf_ec39e642","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.br_tun \u003d base.get_rand_name(n_const.DEVICE_NAME_MAX_LEN,"},{"line_number":54,"context_line":"                                         prefix\u003d\u0027br-tun\u0027)"},{"line_number":55,"context_line":"        self.patch_tun \u003d \"%s-patch-tun\" % self.br_int"},{"line_number":56,"context_line":"        self.patch_int \u003d \"%s-patch-int\" % self.br_tun"},{"line_number":57,"context_line":"        self.agent \u003d None"},{"line_number":58,"context_line":"        self._configure_agent()"},{"line_number":59,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_879feb5e","line":56,"updated":"2015-06-05 13:49:00.000000000","message":"is it intentional to use this long (longer than DEVICE_NAME_MAX_LEN) names for patch ports?","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.br_tun \u003d base.get_rand_name(n_const.DEVICE_NAME_MAX_LEN,"},{"line_number":54,"context_line":"                                         prefix\u003d\u0027br-tun\u0027)"},{"line_number":55,"context_line":"        self.patch_tun \u003d \"%s-patch-tun\" % self.br_int"},{"line_number":56,"context_line":"        self.patch_int \u003d \"%s-patch-int\" % self.br_tun"},{"line_number":57,"context_line":"        self.agent \u003d None"},{"line_number":58,"context_line":"        self._configure_agent()"},{"line_number":59,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_285faee6","line":56,"in_reply_to":"3afb71cf_879feb5e","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _create_test_port_dict(self):"},{"line_number":123,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":124,"context_line":"                \u0027mac_address\u0027: \u002702:%d:01:00:%d:04\u0027 % (random.randint(10, 99),"},{"line_number":125,"context_line":"                                                      random.randint(10, 99)),"},{"line_number":126,"context_line":"                \u0027fixed_ips\u0027: [{"},{"line_number":127,"context_line":"                    \u0027ip_address\u0027: \u002710.10.10.%d\u0027 % random.randint(3, 254)}],"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_070c1b93","line":124,"range":{"start_line":124,"start_character":35,"end_line":124,"end_character":37},"updated":"2015-06-05 13:49:00.000000000","message":"as these are hex values, \"%02x\" % random.randint(0, 255) would be more natural.","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _create_test_port_dict(self):"},{"line_number":123,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":124,"context_line":"                \u0027mac_address\u0027: \u002702:%d:01:00:%d:04\u0027 % (random.randint(10, 99),"},{"line_number":125,"context_line":"                                                      random.randint(10, 99)),"},{"line_number":126,"context_line":"                \u0027fixed_ips\u0027: [{"},{"line_number":127,"context_line":"                    \u0027ip_address\u0027: \u002710.10.10.%d\u0027 % random.randint(3, 254)}],"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_db822200","line":124,"in_reply_to":"3afb71cf_070c1b93","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":133,"context_line":"                \u0027tenant_id\u0027: uuidutils.generate_uuid()}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _plug_ports(self, network, ports, ip_mask\u003d24):"},{"line_number":136,"context_line":"        for port in ports:"},{"line_number":137,"context_line":"            self.driver.plug("},{"line_number":138,"context_line":"                network.get(\u0027id\u0027), port.get(\u0027id\u0027), port.get(\u0027vif_name\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_67906fed","line":135,"range":{"start_line":135,"start_character":42,"end_line":135,"end_character":49},"updated":"2015-06-05 13:49:00.000000000","message":"as it isn\u0027t a mask value, how about \"prefix_len\"?","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":133,"context_line":"                \u0027tenant_id\u0027: uuidutils.generate_uuid()}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _plug_ports(self, network, ports, ip_mask\u003d24):"},{"line_number":136,"context_line":"        for port in ports:"},{"line_number":137,"context_line":"            self.driver.plug("},{"line_number":138,"context_line":"                network.get(\u0027id\u0027), port.get(\u0027id\u0027), port.get(\u0027vif_name\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_dbb0e2df","line":135,"in_reply_to":"3afb71cf_67906fed","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        def get_peer(port):"},{"line_number":172,"context_line":"            a \u003d self.agent.int_br.db_get_val("},{"line_number":173,"context_line":"                \u0027Interface\u0027, port, \u0027options\u0027, check_error\u003dTrue)"},{"line_number":174,"context_line":"            return a"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        agent_utils.wait_until_true("},{"line_number":177,"context_line":"            lambda: get_peer(self.patch_int) \u003d\u003d {\u0027peer\u0027: self.patch_tun})"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_a7ad4733","line":174,"updated":"2015-06-05 13:49:00.000000000","message":"this variable \"a\" is unnecessary.","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        def get_peer(port):"},{"line_number":172,"context_line":"            a \u003d self.agent.int_br.db_get_val("},{"line_number":173,"context_line":"                \u0027Interface\u0027, port, \u0027options\u0027, check_error\u003dTrue)"},{"line_number":174,"context_line":"            return a"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        agent_utils.wait_until_true("},{"line_number":177,"context_line":"            lambda: get_peer(self.patch_int) \u003d\u003d {\u0027peer\u0027: self.patch_tun})"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_fb2efef8","line":174,"in_reply_to":"3afb71cf_a7ad4733","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":203,"context_line":"          WARNING: This list is modified by this method"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":206,"context_line":"        for dev in args:"},{"line_number":207,"context_line":"            try:"},{"line_number":208,"context_line":"                expected_devices.remove(dev)"},{"line_number":209,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_624bbdb1","line":206,"updated":"2015-06-05 13:49:00.000000000","message":"how about:\n\nreturn not (set(expected_devices) - set(args))","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":203,"context_line":"          WARNING: This list is modified by this method"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":206,"context_line":"        for dev in args:"},{"line_number":207,"context_line":"            try:"},{"line_number":208,"context_line":"                expected_devices.remove(dev)"},{"line_number":209,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_e512df61","line":206,"in_reply_to":"3afb71cf_624bbdb1","updated":"2015-06-08 13:33:04.000000000","message":"I like it but I think it\u0027s less readable","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        agent_utils.wait_until_true("},{"line_number":248,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":249,"context_line":"                self.agent.plugin_rpc.update_device_down, down_ports_ids))"},{"line_number":250,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_assert_resync_devices_set_up_after_exception(self):"},{"line_number":253,"context_line":"        self._set_up_env_port_test()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_a23775e2","line":250,"updated":"2015-06-05 13:49:00.000000000","message":"it\u0027s better to wait() on the spawned thread.","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        agent_utils.wait_until_true("},{"line_number":248,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":249,"context_line":"                self.agent.plugin_rpc.update_device_down, down_ports_ids))"},{"line_number":250,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_assert_resync_devices_set_up_after_exception(self):"},{"line_number":253,"context_line":"        self._set_up_env_port_test()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_3b2b7696","line":250,"in_reply_to":"3afb71cf_a23775e2","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6774b1aa3a3e5de009fda73328b4cd64767140a1","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        agent_utils.wait_until_true("},{"line_number":261,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":262,"context_line":"                self.agent.plugin_rpc.update_device_up, ports_ids))"},{"line_number":263,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_assert_port_vlan_tags(self):"},{"line_number":266,"context_line":"        self.create_agent()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_a23e55b6","line":263,"updated":"2015-06-05 13:49:00.000000000","message":"ditto","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35ded4fec8b82153550761d3ef0152bfd0bbf8eb","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        agent_utils.wait_until_true("},{"line_number":261,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":262,"context_line":"                self.agent.plugin_rpc.update_device_up, ports_ids))"},{"line_number":263,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_assert_port_vlan_tags(self):"},{"line_number":266,"context_line":"        self.create_agent()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3afb71cf_db122262","line":263,"in_reply_to":"3afb71cf_a23e55b6","updated":"2015-06-08 13:33:04.000000000","message":"Done","commit_id":"b700f0e134dce9dba0a140ae4731add9a7931037"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"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":""},{"line_number":43,"context_line":"class TestFrameworkL2OvsAgent(base.BaseOVSLinuxTestCase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_430ccb40","line":42,"updated":"2015-06-09 20:39:08.000000000","message":"The unofficial naming convention that I see used a lot is that the \u0027framework\u0027 class does not start with \u0027Test\u0027, but only test classes do as a signal that it\u0027s a class with tests.\n\nAlso I think that the \"L2\" characters are redundant, so it becomes \"OVSAgentTestFramework\" and \"TestOVSAgent\" for example.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"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":""},{"line_number":43,"context_line":"class TestFrameworkL2OvsAgent(base.BaseOVSLinuxTestCase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_a5d91c59","line":42,"in_reply_to":"3afb71cf_430ccb40","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"class TestFrameworkL2OvsAgent(base.BaseOVSLinuxTestCase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"},{"line_number":46,"context_line":"        super(TestFrameworkL2OvsAgent, self).setUp()"},{"line_number":47,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027"},{"line_number":48,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":49,"context_line":"        mock.patch(plugin_str).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_264afd55","line":46,"updated":"2015-06-09 20:39:08.000000000","message":"plugin_str is kind of a weird variable name because it doesn\u0027t represent a plugin, but an RPC client.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":43,"context_line":"class TestFrameworkL2OvsAgent(base.BaseOVSLinuxTestCase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"},{"line_number":46,"context_line":"        super(TestFrameworkL2OvsAgent, self).setUp()"},{"line_number":47,"context_line":"        plugin_str \u003d (\u0027neutron.plugins.openvswitch.agent.\u0027"},{"line_number":48,"context_line":"                      \u0027ovs_neutron_agent.OVSPluginApi\u0027)"},{"line_number":49,"context_line":"        mock.patch(plugin_str).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_e5c27452","line":46,"in_reply_to":"3afb71cf_264afd55","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.agent \u003d None"},{"line_number":59,"context_line":"        self._configure_agent()"},{"line_number":60,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"},{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_12f5f055","line":61,"updated":"2015-06-09 20:39:08.000000000","message":"This should not be a class instance. It is advisable to not use class instances in these tests if at all possible for readability. It\u0027s just much easier IMO to read a test and not having to know that there\u0027s a bunch more state at the class instance level, just what you see before your eyes when you read a specific test. Same for self.network.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"86fb8d3d9bad979192420af49ffa2775b2f1ea0e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.agent \u003d None"},{"line_number":59,"context_line":"        self._configure_agent()"},{"line_number":60,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"},{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_aaa9ab92","line":61,"in_reply_to":"3afb71cf_038b0f20","updated":"2015-06-11 14:22:55.000000000","message":"Maybe not wrong but unusual. We are on the same wavelength anyway...I updated the code correctly even if I misunderstood your comment.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.agent \u003d None"},{"line_number":59,"context_line":"        self._configure_agent()"},{"line_number":60,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"},{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_25f76c8c","line":61,"in_reply_to":"3afb71cf_12f5f055","updated":"2015-06-11 09:29:38.000000000","message":"Regarding driver I disagree. It doesn\u0027t contain any state, it\u0027s just configuration and it\u0027s the same for all the tests.  Defining it in every test wouldn\u0027t increase the readability IMO. I will remove network and ports.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"080daeaea4e661e60131eb08127cfc2c3da2bac8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.agent \u003d None"},{"line_number":59,"context_line":"        self._configure_agent()"},{"line_number":60,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS()"},{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_038b0f20","line":61,"in_reply_to":"3afb71cf_25f76c8c","updated":"2015-06-11 13:06:07.000000000","message":"I meant ports and network sorry. I leave a comment pertaining to the line below, some leave a comment pertaining to the line above. I think I\u0027m in the wrong \u003dD","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _configure_agent(self):"},{"line_number":66,"context_line":"        cfg.CONF.register_opts(interface.OPTS)"},{"line_number":67,"context_line":"        cfg.CONF.register_opts(ovs_config.ovs_opts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_e6918548","line":64,"updated":"2015-06-09 20:39:08.000000000","message":"I\u0027d rather not impact the global cfg.CONF, but rather create a new cfg.ConfigOpts object, register and override everything it needs then pass it to create_agent. Changing cfg.CONF actually impacts other tests. This is what we do with the L3 agent functional tests.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"080daeaea4e661e60131eb08127cfc2c3da2bac8","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _configure_agent(self):"},{"line_number":66,"context_line":"        cfg.CONF.register_opts(interface.OPTS)"},{"line_number":67,"context_line":"        cfg.CONF.register_opts(ovs_config.ovs_opts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_a3ff9b64","line":64,"in_reply_to":"3afb71cf_7922a8a4","updated":"2015-06-11 13:06:07.000000000","message":"Another case of rewriting code to be more testable and improving it along the way.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"86fb8d3d9bad979192420af49ffa2775b2f1ea0e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _configure_agent(self):"},{"line_number":66,"context_line":"        cfg.CONF.register_opts(interface.OPTS)"},{"line_number":67,"context_line":"        cfg.CONF.register_opts(ovs_config.ovs_opts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_2a9edb63","line":64,"in_reply_to":"3afb71cf_a3ff9b64","updated":"2015-06-11 14:22:55.000000000","message":"Yuppie!","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":62,"context_line":"        self.ports \u003d []"},{"line_number":63,"context_line":"        self.network \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _configure_agent(self):"},{"line_number":66,"context_line":"        cfg.CONF.register_opts(interface.OPTS)"},{"line_number":67,"context_line":"        cfg.CONF.register_opts(ovs_config.ovs_opts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_7922a8a4","line":64,"in_reply_to":"3afb71cf_e6918548","updated":"2015-06-11 09:29:38.000000000","message":"I had to create a dependant patch for that since the ovs agent doesn\u0027t take the config as parameter","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \u0027br_phys\u0027: br_phys.OVSPhysicalBridge,"},{"line_number":86,"context_line":"            \u0027br_tun\u0027: br_tun.OVSTunnelBridge"},{"line_number":87,"context_line":"        }"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def create_agent(self, create_tunnels\u003dTrue):"},{"line_number":90,"context_line":"        if create_tunnels:"},{"line_number":91,"context_line":"            tunnel_types \u003d [p_const.TYPE_VXLAN]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_324c6c9d","line":88,"updated":"2015-06-09 20:39:08.000000000","message":"I don\u0027t think that self.agent should be a class instance. Rather create_agent should instantiate an agent and return it.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \u0027br_phys\u0027: br_phys.OVSPhysicalBridge,"},{"line_number":86,"context_line":"            \u0027br_tun\u0027: br_tun.OVSTunnelBridge"},{"line_number":87,"context_line":"        }"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def create_agent(self, create_tunnels\u003dTrue):"},{"line_number":90,"context_line":"        if create_tunnels:"},{"line_number":91,"context_line":"            tunnel_types \u003d [p_const.TYPE_VXLAN]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_46538b6b","line":88,"in_reply_to":"3afb71cf_324c6c9d","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                               polling_interval\u003d10,"},{"line_number":100,"context_line":"                                               tunnel_types\u003dtunnel_types,"},{"line_number":101,"context_line":"                                               prevent_arp_spoofing\u003dFalse)"},{"line_number":102,"context_line":"        self.polling_manager \u003d polling.InterfacePollingMinimizer()"},{"line_number":103,"context_line":"        if tunnel_types:"},{"line_number":104,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int, self.br_tun])"},{"line_number":105,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_06ba610a","line":102,"updated":"2015-06-09 20:39:08.000000000","message":"bridges \u003d [self.br_int]\nif tunnel_types:\n    bridges.append(self.br_tun)\nself.addCleanup(self._cleanup_bridges, bridges)\n\nOr the ternary operator for the first three lines if you like it.\n\nBetter yet, I think that _cleanup_bridges can be deleted, then this becomes:\n\nself.addCleanup(self.ovs.delete_bridge, self.br_int)\nif tunnel_types:\n    self.addCleanup(self.ovs.delete_bridge, self.br_tun)","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                               polling_interval\u003d10,"},{"line_number":100,"context_line":"                                               tunnel_types\u003dtunnel_types,"},{"line_number":101,"context_line":"                                               prevent_arp_spoofing\u003dFalse)"},{"line_number":102,"context_line":"        self.polling_manager \u003d polling.InterfacePollingMinimizer()"},{"line_number":103,"context_line":"        if tunnel_types:"},{"line_number":104,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int, self.br_tun])"},{"line_number":105,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_d99e3cb8","line":102,"in_reply_to":"3afb71cf_06ba610a","updated":"2015-06-11 09:29:38.000000000","message":"Good point!","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if tunnel_types:"},{"line_number":104,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int, self.br_tun])"},{"line_number":105,"context_line":"        else:"},{"line_number":106,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int])"},{"line_number":107,"context_line":"        self.agent.plugin_rpc \u003d mock.Mock()"},{"line_number":108,"context_line":"        self.agent.sg_agent \u003d mock.Mock()"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_e6d2a55b","line":106,"updated":"2015-06-09 20:39:08.000000000","message":"Is this plugin_rpc mock needed? It should already be mocked in line 49?","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if tunnel_types:"},{"line_number":104,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int, self.br_tun])"},{"line_number":105,"context_line":"        else:"},{"line_number":106,"context_line":"            self.addCleanup(self._cleanup_bridges, [self.br_int])"},{"line_number":107,"context_line":"        self.agent.plugin_rpc \u003d mock.Mock()"},{"line_number":108,"context_line":"        self.agent.sg_agent \u003d mock.Mock()"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_19905494","line":106,"in_reply_to":"3afb71cf_e6d2a55b","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            self.agent._bind_devices(devices)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _create_test_port_dict(self):"},{"line_number":124,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":125,"context_line":"                \u0027mac_address\u0027: \u002702:%02x:01:00:%02x:04\u0027 % ("},{"line_number":126,"context_line":"                    random.randint(0, 255), random.randint(0, 255)),"},{"line_number":127,"context_line":"                \u0027fixed_ips\u0027: [{"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_c6ce892d","line":124,"updated":"2015-06-09 20:39:08.000000000","message":"(No action required) Here I think that you can use neutron.common.utils.get_random_mac.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            self.agent._bind_devices(devices)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _create_test_port_dict(self):"},{"line_number":124,"context_line":"        return {\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":125,"context_line":"                \u0027mac_address\u0027: \u002702:%02x:01:00:%02x:04\u0027 % ("},{"line_number":126,"context_line":"                    random.randint(0, 255), random.randint(0, 255)),"},{"line_number":127,"context_line":"                \u0027fixed_ips\u0027: [{"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_19f174cd","line":124,"in_reply_to":"3afb71cf_c6ce892d","updated":"2015-06-11 09:29:38.000000000","message":"good idea","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                \u0027ip_address\u0027], ip_len)]"},{"line_number":144,"context_line":"            self.driver.init_l3(port.get(\u0027vif_name\u0027), ip_cidrs, namespace\u003dNone)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _cleanup_bridges(self, bridges):"},{"line_number":147,"context_line":"        ovs \u003d ovs_lib.BaseOVS()"},{"line_number":148,"context_line":"        for bridge in bridges:"},{"line_number":149,"context_line":"            ovs.delete_bridge(bridge)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_86a2d149","line":146,"updated":"2015-06-09 20:39:08.000000000","message":"self.ovs was defined in line 60.\n\nGenerally I don\u0027t think that this method is needed. See my comment on line 103.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                \u0027ip_address\u0027], ip_len)]"},{"line_number":144,"context_line":"            self.driver.init_l3(port.get(\u0027vif_name\u0027), ip_cidrs, namespace\u003dNone)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _cleanup_bridges(self, bridges):"},{"line_number":147,"context_line":"        ovs \u003d ovs_lib.BaseOVS()"},{"line_number":148,"context_line":"        for bridge in bridges:"},{"line_number":149,"context_line":"            ovs.delete_bridge(bridge)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_b9c02051","line":146,"in_reply_to":"3afb71cf_86a2d149","updated":"2015-06-11 09:29:38.000000000","message":"removed","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"               \u0027device_owner\u0027: \u0027compute\u0027,"},{"line_number":160,"context_line":"               \u0027admin_state_up\u0027: True}"},{"line_number":161,"context_line":"        return dev"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def assert_bridge(self, br, exists\u003dTrue):"},{"line_number":164,"context_line":"        self.assertEqual(exists, self.ovs.bridge_exists(br))"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_3c3a0ccd","line":162,"updated":"2015-06-09 20:39:08.000000000","message":"assert_bridge and assert_bridges can be removed IMO.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":159,"context_line":"               \u0027device_owner\u0027: \u0027compute\u0027,"},{"line_number":160,"context_line":"               \u0027admin_state_up\u0027: True}"},{"line_number":161,"context_line":"        return dev"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def assert_bridge(self, br, exists\u003dTrue):"},{"line_number":164,"context_line":"        self.assertEqual(exists, self.ovs.bridge_exists(br))"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_1981748f","line":162,"in_reply_to":"3afb71cf_3c3a0ccd","updated":"2015-06-11 09:29:38.000000000","message":"Removed","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        for port in [self.patch_tun, self.patch_int]:"},{"line_number":183,"context_line":"            self.assertTrue(self.ovs.port_exists(port))"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def assert_ovs_vlan_tags(self, ports, bound\u003dFalse):"},{"line_number":186,"context_line":"        self.agent.provision_local_vlan(self.network[\u0027id\u0027], \u0027vlan\u0027, \u0027physnet\u0027,"},{"line_number":187,"context_line":"                                        1)"},{"line_number":188,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_213307f8","line":185,"updated":"2015-06-09 20:39:08.000000000","message":"I think that assert_x methods should not be executing agent code, only asserting state. Probably line  186 should be taken and called by the user of this method.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        for port in [self.patch_tun, self.patch_int]:"},{"line_number":183,"context_line":"            self.assertTrue(self.ovs.port_exists(port))"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def assert_ovs_vlan_tags(self, ports, bound\u003dFalse):"},{"line_number":186,"context_line":"        self.agent.provision_local_vlan(self.network[\u0027id\u0027], \u0027vlan\u0027, \u0027physnet\u0027,"},{"line_number":187,"context_line":"                                        1)"},{"line_number":188,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_192f34a2","line":185,"in_reply_to":"3afb71cf_213307f8","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class TestL2OvsAgent(TestFrameworkL2OvsAgent):"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices):"},{"line_number":200,"context_line":"        \"\"\"Helper to check expected rpc call are received"},{"line_number":201,"context_line":"        :param call: The call to check"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_5f4a5027","line":198,"updated":"2015-06-09 20:39:08.000000000","message":"Wow this method is crazy :) Took me a bit to understand how you were using it and why that made sense.\n\nI think a way that makes more sense to me personally, or is more intuitive:\n\nYou aggregate all of the calls on the \u0027call\u0027 mock and put them in a single set, then return set(expected_devices).issubset(set(all_device_names_from_calls_to_call_mock))\n\nI forget the exact syntax but it\u0027s possible to get a list of all of the calls on a mock.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class TestL2OvsAgent(TestFrameworkL2OvsAgent):"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _expected_plugin_rpc_call(self, call, expected_devices):"},{"line_number":200,"context_line":"        \"\"\"Helper to check expected rpc call are received"},{"line_number":201,"context_line":"        :param call: The call to check"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_37c8b773","line":198,"in_reply_to":"3afb71cf_5f4a5027","updated":"2015-06-11 09:29:38.000000000","message":"if you don\u0027t mind I will apply Yamamoto\u0027s suggestion in the previous PS, it was similar to yours. Since you are the second person raising this point, it\u0027s really time to address it.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                continue"},{"line_number":211,"context_line":"            if not expected_devices:"},{"line_number":212,"context_line":"                return True"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _mock_device_details(self, *args):"},{"line_number":215,"context_line":"        details \u003d []"},{"line_number":216,"context_line":"        for port in self.ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_d2e998b8","line":213,"updated":"2015-06-09 20:39:08.000000000","message":"Can you please change this to from *args to context, devices, agent_id, host\u003dNone? Also I think it would help readability to change this in to a private method in _set_up_env_port_test.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                continue"},{"line_number":211,"context_line":"            if not expected_devices:"},{"line_number":212,"context_line":"                return True"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _mock_device_details(self, *args):"},{"line_number":215,"context_line":"        details \u003d []"},{"line_number":216,"context_line":"        for port in self.ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_37aaf719","line":213,"in_reply_to":"3afb71cf_d2e998b8","updated":"2015-06-11 09:29:38.000000000","message":"Done","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                dev \u003d self._get_device_details(port)"},{"line_number":219,"context_line":"                details.append(dev)"},{"line_number":220,"context_line":"        return details"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _set_up_env_port_test(self):"},{"line_number":223,"context_line":"        self.create_agent()"},{"line_number":224,"context_line":"        self.addCleanup(self.polling_manager.stop)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_ed6b99b7","line":221,"updated":"2015-06-09 20:39:08.000000000","message":"Perhaps this method should be split to two:\n\n  start_agent which is up to line 227 and including, plus line 233.\n  generate_data which is lines 228 to 232.\n\nWhat do you think?","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                dev \u003d self._get_device_details(port)"},{"line_number":219,"context_line":"                details.append(dev)"},{"line_number":220,"context_line":"        return details"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _set_up_env_port_test(self):"},{"line_number":223,"context_line":"        self.create_agent()"},{"line_number":224,"context_line":"        self.addCleanup(self.polling_manager.stop)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_86118306","line":221,"in_reply_to":"3afb71cf_ed6b99b7","updated":"2015-06-11 09:29:38.000000000","message":"I agree :)","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def _set_up_env_port_test(self):"},{"line_number":223,"context_line":"        self.create_agent()"},{"line_number":224,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":225,"context_line":"        self.polling_manager.start()"},{"line_number":226,"context_line":"        agent_utils.wait_until_true("},{"line_number":227,"context_line":"            lambda: self.polling_manager._monitor.is_active() is True)"},{"line_number":228,"context_line":"        for x in range(3):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_9bd0e320","line":225,"updated":"2015-06-09 20:39:08.000000000","message":"You can just pass self.polling_manager._monitor.is_active (Without the parenthesis) here instead of the lambda.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def _set_up_env_port_test(self):"},{"line_number":223,"context_line":"        self.create_agent()"},{"line_number":224,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":225,"context_line":"        self.polling_manager.start()"},{"line_number":226,"context_line":"        agent_utils.wait_until_true("},{"line_number":227,"context_line":"            lambda: self.polling_manager._monitor.is_active() is True)"},{"line_number":228,"context_line":"        for x in range(3):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_8643c312","line":225,"in_reply_to":"3afb71cf_9bd0e320","updated":"2015-06-11 09:29:38.000000000","message":"Right","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            self._mock_device_details)"},{"line_number":233,"context_line":"        self.agent.check_ovs_status \u003d mock.Mock("},{"line_number":234,"context_line":"            return_value\u003dconstants.OVS_NORMAL)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_assert_port_creation_and_deletion(self):"},{"line_number":237,"context_line":"        self._set_up_env_port_test()"},{"line_number":238,"context_line":"        t \u003d eventlet.spawn(self.agent.rpc_loop, self.polling_manager)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_eda279fb","line":235,"updated":"2015-06-09 20:39:08.000000000","message":"This test is pretty cool :)","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2d87abf72a684caf9a3214d7a7c8ce3d75eb6ce1","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        self.agent.check_ovs_status \u003d mock.Mock("},{"line_number":234,"context_line":"            return_value\u003dconstants.OVS_NORMAL)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_assert_port_creation_and_deletion(self):"},{"line_number":237,"context_line":"        self._set_up_env_port_test()"},{"line_number":238,"context_line":"        t \u003d eventlet.spawn(self.agent.rpc_loop, self.polling_manager)"},{"line_number":239,"context_line":"        self._plug_ports(self.network, self.ports)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_6f47e81d","line":236,"range":{"start_line":236,"start_character":8,"end_line":236,"end_character":46},"updated":"2015-06-08 14:34:38.000000000","message":"\"assert\" in test names seems redundant.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"558046c8f3a23576e891507158829c35c9906477","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        self.agent.check_ovs_status \u003d mock.Mock("},{"line_number":234,"context_line":"            return_value\u003dconstants.OVS_NORMAL)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_assert_port_creation_and_deletion(self):"},{"line_number":237,"context_line":"        self._set_up_env_port_test()"},{"line_number":238,"context_line":"        t \u003d eventlet.spawn(self.agent.rpc_loop, self.polling_manager)"},{"line_number":239,"context_line":"        self._plug_ports(self.network, self.ports)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_9b890d78","line":236,"in_reply_to":"3afb71cf_6f47e81d","updated":"2015-06-09 14:50:05.000000000","message":"I will fix this if I have to respin, thanks!","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        self.agent.check_ovs_status \u003d mock.Mock("},{"line_number":234,"context_line":"            return_value\u003dconstants.OVS_NORMAL)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_assert_port_creation_and_deletion(self):"},{"line_number":237,"context_line":"        self._set_up_env_port_test()"},{"line_number":238,"context_line":"        t \u003d eventlet.spawn(self.agent.rpc_loop, self.polling_manager)"},{"line_number":239,"context_line":"        self._plug_ports(self.network, self.ports)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_32334c16","line":236,"in_reply_to":"3afb71cf_9b890d78","updated":"2015-06-09 20:39:08.000000000","message":"I agree with Yamamoto.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            self.agent.int_br.delete_port(port[\u0027vif_name\u0027])"},{"line_number":247,"context_line":"        agent_utils.wait_until_true("},{"line_number":248,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":249,"context_line":"                self.agent.plugin_rpc.update_device_down, down_ports_ids))"},{"line_number":250,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":251,"context_line":"        t.wait()"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_ed55d9c1","line":249,"updated":"2015-06-09 20:39:08.000000000","message":"Should these two lines instead be used with addCleanup right after line 238? I think those 3 lines together should be made in to a method, or instead add these 3 lines to the start_agent method I suggested earlier, so that future test additions won\u0027t forget the stopping part. You just have to get the addCleanup ordering right.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            self.agent.int_br.delete_port(port[\u0027vif_name\u0027])"},{"line_number":247,"context_line":"        agent_utils.wait_until_true("},{"line_number":248,"context_line":"            lambda: self._expected_plugin_rpc_call("},{"line_number":249,"context_line":"                self.agent.plugin_rpc.update_device_down, down_ports_ids))"},{"line_number":250,"context_line":"        self.agent.run_daemon_loop \u003d False"},{"line_number":251,"context_line":"        t.wait()"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_86b623f7","line":249,"in_reply_to":"3afb71cf_ed55d9c1","updated":"2015-06-11 09:29:38.000000000","message":"I moved that to the start_agent method","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        for x in range(3):"},{"line_number":270,"context_line":"            self.ports.append(self._create_test_port_dict())"},{"line_number":271,"context_line":"        self.network \u003d self._create_test_network_dict()"},{"line_number":272,"context_line":"        self._plug_ports(self.network, self.ports)"},{"line_number":273,"context_line":"        self.assert_ovs_vlan_tags(self.ports, bound\u003dFalse)"},{"line_number":274,"context_line":"        self._bind_ports(self.ports)"},{"line_number":275,"context_line":"        self.assert_ovs_vlan_tags(self.ports, bound\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_df8e402d","line":272,"updated":"2015-06-09 20:39:08.000000000","message":"Does this make sense? I would think that you\u0027d have two different methods, one that asserts that ports don\u0027t have a VLAN tag, and one that does. They could share code internally, but having a method called assert_ovs_vlan_tags that accepts a bound\u003dFalse parameter is very surprising.","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        for x in range(3):"},{"line_number":270,"context_line":"            self.ports.append(self._create_test_port_dict())"},{"line_number":271,"context_line":"        self.network \u003d self._create_test_network_dict()"},{"line_number":272,"context_line":"        self._plug_ports(self.network, self.ports)"},{"line_number":273,"context_line":"        self.assert_ovs_vlan_tags(self.ports, bound\u003dFalse)"},{"line_number":274,"context_line":"        self._bind_ports(self.ports)"},{"line_number":275,"context_line":"        self.assert_ovs_vlan_tags(self.ports, bound\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_b7c947ae","line":272,"in_reply_to":"3afb71cf_df8e402d","updated":"2015-06-11 09:29:38.000000000","message":"I will modify it then","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8cd9fd420acc35ec93276eddaa089dc00df778d","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.assert_patch_ports()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_assert_bridges_ports_no_tunnel(self):"},{"line_number":284,"context_line":"        self.create_agent(create_tunnels\u003dFalse)"},{"line_number":285,"context_line":"        self.assert_bridge(self.br_int)"},{"line_number":286,"context_line":"        self.assert_bridge(self.br_tun, exists\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_1c1cf068","line":284,"updated":"2015-06-09 20:39:08.000000000","message":"Perhaps delete the assert_bridge method, then here you just use:\n\n  self.assertTrue(self.ovs.bridge_exists(self.br_int))\n  self.assertFalse(self.ovs.bridge_exists(self.br_tun))\n\nLess indirection, simpler...","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"14b83bc68aa40828ddc8bc3f70b87dc93db76eef","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.assert_patch_ports()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_assert_bridges_ports_no_tunnel(self):"},{"line_number":284,"context_line":"        self.create_agent(create_tunnels\u003dFalse)"},{"line_number":285,"context_line":"        self.assert_bridge(self.br_int)"},{"line_number":286,"context_line":"        self.assert_bridge(self.br_tun, exists\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_dc774a9e","line":284,"in_reply_to":"3afb71cf_1c1cf068","updated":"2015-06-11 09:29:38.000000000","message":"yes I agree","commit_id":"0d2d80b562256d932b02cfb8a1b30aaa3f77b72e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2398e0ca5f148a87c747c94ccf98e2cb4ba08c2b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        #config.set_override("},{"line_number":87,"context_line":"        #    \"firewall_driver\","},{"line_number":88,"context_line":"        #    \u0027neutron.agent.linux.iptables_firewall.IptablesFirewallDriver\u0027,"},{"line_number":89,"context_line":"        #    \"SECURITYGROUP\")"},{"line_number":90,"context_line":"        return config"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _bridge_classes(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"3afb71cf_19a6d753","line":89,"updated":"2015-06-11 16:16:18.000000000","message":"work in progress?","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"09e883d82801162c4a82396622f582a5fd8a6b8a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        #config.set_override("},{"line_number":87,"context_line":"        #    \"firewall_driver\","},{"line_number":88,"context_line":"        #    \u0027neutron.agent.linux.iptables_firewall.IptablesFirewallDriver\u0027,"},{"line_number":89,"context_line":"        #    \"SECURITYGROUP\")"},{"line_number":90,"context_line":"        return config"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _bridge_classes(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_db2a692c","line":89,"in_reply_to":"3afb71cf_19a6d753","updated":"2015-06-12 09:19:00.000000000","message":"yep","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aa612a74e5840ca946e0393a9904c681b0fb5a09","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if tunnel_types:"},{"line_number":116,"context_line":"            self.addCleanup(self.ovs.delete_bridge, self.br_tun)"},{"line_number":117,"context_line":"        agent.sg_agent \u003d mock.Mock()"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":120,"context_line":"        self.polling_manager.start()"},{"line_number":121,"context_line":"        agent_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_ec08da93","line":118,"updated":"2015-06-12 02:22:39.000000000","message":"If you split this method to create_agent (Up to line 117 including, without line 113) and start_agent then the last two tests will run faster. Thoughts?","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"09e883d82801162c4a82396622f582a5fd8a6b8a","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if tunnel_types:"},{"line_number":116,"context_line":"            self.addCleanup(self.ovs.delete_bridge, self.br_tun)"},{"line_number":117,"context_line":"        agent.sg_agent \u003d mock.Mock()"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":120,"context_line":"        self.polling_manager.start()"},{"line_number":121,"context_line":"        agent_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_bb20cd4a","line":118,"in_reply_to":"1af86dd1_ec08da93","updated":"2015-06-12 09:19:00.000000000","message":"good point","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aa612a74e5840ca946e0393a9904c681b0fb5a09","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.addCleanup(self._stop_agent, agent, t)"},{"line_number":127,"context_line":"        return agent"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _stop_agent(self, agent, rpc_loop_thread):"},{"line_number":130,"context_line":"        agent.run_daemon_loop \u003d False"},{"line_number":131,"context_line":"        rpc_loop_thread.wait()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_ccfd1e70","line":129,"updated":"2015-06-12 02:22:39.000000000","message":"This can be a private method of the method above.","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"09e883d82801162c4a82396622f582a5fd8a6b8a","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.addCleanup(self._stop_agent, agent, t)"},{"line_number":127,"context_line":"        return agent"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _stop_agent(self, agent, rpc_loop_thread):"},{"line_number":130,"context_line":"        agent.run_daemon_loop \u003d False"},{"line_number":131,"context_line":"        rpc_loop_thread.wait()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_f8af6b7b","line":129,"in_reply_to":"1af86dd1_ccfd1e70","updated":"2015-06-12 09:19:00.000000000","message":"Done","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aa612a74e5840ca946e0393a9904c681b0fb5a09","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\"Helper to check expected rpc call are received"},{"line_number":215,"context_line":"        :param call: The call to check"},{"line_number":216,"context_line":"        :param expected_devices The device for which call is expected"},{"line_number":217,"context_line":"          WARNING: This list is modified by this method"},{"line_number":218,"context_line":"        \"\"\""},{"line_number":219,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":220,"context_line":"        return not (set(expected_devices) - set(args))"}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_ec933a4e","line":217,"updated":"2015-06-12 02:22:39.000000000","message":"No it doesn\u0027t ;-)","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"09e883d82801162c4a82396622f582a5fd8a6b8a","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\"Helper to check expected rpc call are received"},{"line_number":215,"context_line":"        :param call: The call to check"},{"line_number":216,"context_line":"        :param expected_devices The device for which call is expected"},{"line_number":217,"context_line":"          WARNING: This list is modified by this method"},{"line_number":218,"context_line":"        \"\"\""},{"line_number":219,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":220,"context_line":"        return not (set(expected_devices) - set(args))"}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_98f51785","line":217,"in_reply_to":"1af86dd1_ec933a4e","updated":"2015-06-12 09:19:00.000000000","message":":)","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aa612a74e5840ca946e0393a9904c681b0fb5a09","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        :param call: The call to check"},{"line_number":216,"context_line":"        :param expected_devices The device for which call is expected"},{"line_number":217,"context_line":"          WARNING: This list is modified by this method"},{"line_number":218,"context_line":"        \"\"\""},{"line_number":219,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":220,"context_line":"        return not (set(expected_devices) - set(args))"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_4cadae87","line":218,"updated":"2015-06-12 02:22:39.000000000","message":"What a great improvement to the method!","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"09e883d82801162c4a82396622f582a5fd8a6b8a","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        :param call: The call to check"},{"line_number":216,"context_line":"        :param expected_devices The device for which call is expected"},{"line_number":217,"context_line":"          WARNING: This list is modified by this method"},{"line_number":218,"context_line":"        \"\"\""},{"line_number":219,"context_line":"        args \u003d (args[0][1] for args in call.call_args_list)"},{"line_number":220,"context_line":"        return not (set(expected_devices) - set(args))"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_58ef9fb0","line":218,"in_reply_to":"1af86dd1_4cadae87","updated":"2015-06-12 09:19:00.000000000","message":"I agree!","commit_id":"91c227f165e610f8cb410123bfbdfde60b561a16"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"b503548ab12707ad60345f16250ff22e5a9ca9fd","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        agent \u003d ovs_agent.OVSNeutronAgent(self._bridge_classes(),"},{"line_number":102,"context_line":"                                          self.br_int, self.br_tun,"},{"line_number":103,"context_line":"                                          local_ip, bridge_mappings,"},{"line_number":104,"context_line":"                                          polling_interval\u003d10,"},{"line_number":105,"context_line":"                                          tunnel_types\u003dtunnel_types,"},{"line_number":106,"context_line":"                                          prevent_arp_spoofing\u003dFalse,"},{"line_number":107,"context_line":"                                          conf\u003dself.config)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_2680def6","line":104,"updated":"2015-06-16 22:47:37.000000000","message":"Setting the polling_interval\u003d10 is why the tests that wait on update_device stuff take so long. Decreasing polling_interval to 1 makes tests like test_port_creation_and_deletion about 20+ seconds faster. Considering they are run twice (vsctl/native), that makes a huge difference.","commit_id":"66c477af625795f407028dfb3834c2d022128037"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8c2ce9942b079b7ba40da86bce6dbd99400e174","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        agent \u003d ovs_agent.OVSNeutronAgent(self._bridge_classes(),"},{"line_number":102,"context_line":"                                          self.br_int, self.br_tun,"},{"line_number":103,"context_line":"                                          local_ip, bridge_mappings,"},{"line_number":104,"context_line":"                                          polling_interval\u003d10,"},{"line_number":105,"context_line":"                                          tunnel_types\u003dtunnel_types,"},{"line_number":106,"context_line":"                                          prevent_arp_spoofing\u003dFalse,"},{"line_number":107,"context_line":"                                          conf\u003dself.config)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_0195843d","line":104,"in_reply_to":"fa32b979_2680def6","updated":"2015-06-16 23:43:24.000000000","message":"Done","commit_id":"66c477af625795f407028dfb3834c2d022128037"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"d70f34b9fab73234aa21513efb73ee4fad7b9741","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return agent"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def start_agent(self, agent):"},{"line_number":115,"context_line":"        self.polling_manager \u003d polling.InterfacePollingMinimizer()"},{"line_number":116,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":117,"context_line":"        self.polling_manager.start()"},{"line_number":118,"context_line":"        agent_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_abee2eb2","line":115,"updated":"2015-06-16 01:18:27.000000000","message":"Nit: Does polling_manager need to be an instance attribute? Looks like it\u0027s local to this method.","commit_id":"66c477af625795f407028dfb3834c2d022128037"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a8c2ce9942b079b7ba40da86bce6dbd99400e174","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return agent"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def start_agent(self, agent):"},{"line_number":115,"context_line":"        self.polling_manager \u003d polling.InterfacePollingMinimizer()"},{"line_number":116,"context_line":"        self.addCleanup(self.polling_manager.stop)"},{"line_number":117,"context_line":"        self.polling_manager.start()"},{"line_number":118,"context_line":"        agent_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_e1974046","line":115,"in_reply_to":"fa32b979_abee2eb2","updated":"2015-06-16 23:43:24.000000000","message":"Done","commit_id":"66c477af625795f407028dfb3834c2d022128037"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9c9ab771d8d944e779e0d5ebc436cdd3cbae2b51","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        for port in ports:"},{"line_number":133,"context_line":"            dev \u003d OVSAgentTestFramework._get_device_details(port, network)"},{"line_number":134,"context_line":"            vif_name \u003d port.get(\u0027vif_name\u0027)"},{"line_number":135,"context_line":"            vif_id \u003d random.randint(1, 99)"},{"line_number":136,"context_line":"            vif_port \u003d ovs_lib.VifPort("},{"line_number":137,"context_line":"                vif_name, \"%s\" % vif_id, \u0027id-%s\u0027 % vif_id,"},{"line_number":138,"context_line":"                port.get(\u0027mac_address\u0027), agent.int_br)"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa32b979_c2b3fe98","line":135,"updated":"2015-06-17 14:27:54.000000000","message":"~2% of _bind_ports calls (with 3 ports) generate non-unique vif_id,  possible trouble source?","commit_id":"148899ad8abf0e62ef7fba6bc2b193d39cd9b5db"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9c9ab771d8d944e779e0d5ebc436cdd3cbae2b51","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def _create_ports(self, network, agent):"},{"line_number":219,"context_line":"        ports \u003d []"},{"line_number":220,"context_line":"        for x in range(3):"},{"line_number":221,"context_line":"            ports.append(self._create_test_port_dict())"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        def mock_device_details(context, devices, agent_id, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa32b979_e246427a","line":220,"updated":"2015-06-17 14:27:54.000000000","message":"~1%  of _create_ports calls generate 2 ports with the same ip, possible trouble source?","commit_id":"148899ad8abf0e62ef7fba6bc2b193d39cd9b5db"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9c9ab771d8d944e779e0d5ebc436cdd3cbae2b51","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        agent \u003d self.create_agent()"},{"line_number":269,"context_line":"        self.start_agent(agent)"},{"line_number":270,"context_line":"        ports \u003d []"},{"line_number":271,"context_line":"        for x in range(3):"},{"line_number":272,"context_line":"            ports.append(self._create_test_port_dict())"},{"line_number":273,"context_line":"        network \u003d self._create_test_network_dict()"},{"line_number":274,"context_line":"        self._plug_ports(network, ports, agent)"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa32b979_c238def0","line":271,"updated":"2015-06-17 14:27:54.000000000","message":"itto","commit_id":"148899ad8abf0e62ef7fba6bc2b193d39cd9b5db"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7864fb5592205425b36384e95a416d3de07f3e5b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.common import config as common_config"},{"line_number":30,"context_line":"from neutron.common import constants as n_const"},{"line_number":31,"context_line":"from neutron.common import utils"},{"line_number":32,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":33,"context_line":"from neutron.plugins.common import constants as p_const"},{"line_number":34,"context_line":"from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_int"},{"line_number":35,"context_line":"from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_phys"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba3cc151_f10a04d2","line":32,"updated":"2015-06-29 23:47:14.000000000","message":"from oslo_utils import uuidutils","commit_id":"7101a8e5b3dd9d1890ace60adcd7b3e41bbf2493"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"639fd00fa674cfeb568e46251b6d7af807739e99","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_int"},{"line_number":35,"context_line":"from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_phys"},{"line_number":36,"context_line":"from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_tun"},{"line_number":37,"context_line":"from neutron.plugins.openvswitch.agent import ovs_neutron_agent as ovs_agent"},{"line_number":38,"context_line":"from neutron.plugins.openvswitch.common import config as ovs_config"},{"line_number":39,"context_line":"from neutron.plugins.openvswitch.common import constants"},{"line_number":40,"context_line":"from neutron.tests.functional.agent.linux import base"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_fe85e106","line":37,"updated":"2015-06-30 09:45:23.000000000","message":"these import need to be updated after the recent move of the agent.","commit_id":"39f7a5a0f21e4c286cf6a10d69197add73ac05ad"}],"neutron/tests/functional/common/utils.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def server_process(addr, port):"},{"line_number":29,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":30,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port), Handler)"},{"line_number":31,"context_line":"    #process a single request and die"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_9a874e12","line":28,"updated":"2014-12-16 18:02:39.000000000","message":"port_number would be more clear","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def server_process(addr, port):"},{"line_number":29,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":30,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port), Handler)"},{"line_number":31,"context_line":"    #process a single request and die"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_18ce515a","line":28,"in_reply_to":"3a961159_9a874e12","updated":"2014-12-23 17:01:25.000000000","message":"Done","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0241fb39abd936eb0a135dac0b07f964cd79e6a7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    httpd.handle_request()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def _serve_single_request(addr, port):"},{"line_number":36,"context_line":"    p \u003d multiprocessing.Process(target\u003dserver_process, args\u003d(addr, port))"},{"line_number":37,"context_line":"    p.start()"},{"line_number":38,"context_line":"    #give it a chance luv"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1a7b5e2a","line":35,"updated":"2014-12-16 18:02:39.000000000","message":"ditto","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3bbf35cb9b66e82f7d658167f0cab4fef376b7cb","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    httpd.handle_request()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def _serve_single_request(addr, port):"},{"line_number":36,"context_line":"    p \u003d multiprocessing.Process(target\u003dserver_process, args\u003d(addr, port))"},{"line_number":37,"context_line":"    p.start()"},{"line_number":38,"context_line":"    #give it a chance luv"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d8ff6964","line":35,"in_reply_to":"3a961159_1a7b5e2a","updated":"2014-12-23 17:01:25.000000000","message":"Done","commit_id":"f8ddee9eb935aef97a5e9eaa9a3b50b175e8a278"}]}
