)]}'
{"neutron/agent/linux/ovs_lib.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":236,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""},{"line_number":237,"context_line":"        cmd \u003d [\u0027--if-exists\u0027, \u0027del-port\u0027, port_name]"},{"line_number":238,"context_line":"        self.run_vsctl(cmd)"},{"line_number":239,"context_line":"        cmd \u003d [\u0027add-port\u0027, self.br_name, port_name]"},{"line_number":240,"context_line":"        if interface_attr_tuples:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_de0a5178","line":237,"updated":"2015-01-23 19:42:39.000000000","message":"First, this code is getting ready to change quite a bit because of the patch here: https://review.openstack.org/#/c/143709/18/neutron/agent/linux/ovs_lib.py.\n\nSecond, the only thing that keeps replace_port from just being a call to del_port() followed by an add_port() after removing the transaction containing them both is the fact that add_port() does an extra query waiting on the ofport to be assigned, which we don\u0027t really care about.\n\nSo as soon as the above patch merges (which could be today), I plan on changing add_port to not return the ofport since half the calls to it don\u0027t use the return value anyway. After that, replace_port can just look like:\n\n    def replace_port(self, port_name, *interface_attr_tuples):\n        self.delete_port(port_name)\n        self.add_port(port_name, *interface_attr_tuples)","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"}],"neutron/tests/unit/agent/linux/test_ovs_lib.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u0027\\    alias openvswitch\u0027,"},{"line_number":39,"context_line":"    \u00273: br-int: \u003cBROADCAST,MULTICAST\u003e mtu 1500 qdisc noop state DOWN \u0027"},{"line_number":40,"context_line":"    \u0027\\    link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff promiscuity 0\u0027,"},{"line_number":41,"context_line":"    \u00274: tap5: \u003cBROADCAST,MULTICAST\u003e mtu 1500 qdisc noop \u0027"},{"line_number":42,"context_line":"    \u0027state DOWN \\    link/ether fe:dc:ba:fe:dc:ba brd ff:ff:ff:ff:ff:ff \u0027"},{"line_number":43,"context_line":"    \u0027promiscuity 0\u0027]"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_9e336913","line":41,"updated":"2015-01-23 19:42:39.000000000","message":"Is there a reason to have the entire LINK_SAMPLE here when only LINK_SAMPLE[3] is ever used?","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \u0027state DOWN \\    link/ether fe:dc:ba:fe:dc:ba brd ff:ff:ff:ff:ff:ff \u0027"},{"line_number":43,"context_line":"    \u0027promiscuity 0\u0027]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class TestBaseOVS(base.BaseTestCase):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def setUp(self):"},{"line_number":48,"context_line":"        super(TestBaseOVS, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_feb9cd79","line":45,"updated":"2015-01-23 19:42:39.000000000","message":"expected 2 blank lines, found 1","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    def test_replace_port(self):"},{"line_number":229,"context_line":"        pname \u003d \"tap5\""},{"line_number":230,"context_line":"        self.br.replace_port(pname)"},{"line_number":231,"context_line":"        with mock.patch.object(ip_lib.IPDevice, \u0027_execute\u0027) as _execute:"},{"line_number":232,"context_line":"            _execute.return_value \u003d LINK_SAMPLE[3]"},{"line_number":233,"context_line":"            self.assertTrue(ip_lib.device_exists(\u0027tap5\u0027))"},{"line_number":234,"context_line":"        with mock.patch.object(ip_lib.IPDevice, \u0027_execute\u0027) as _execute:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_e155b2fa","line":231,"updated":"2015-01-23 19:42:39.000000000","message":"I am confused about what these mocks actually accomplish here as self.br.repace_port() will *never* result in any interaction with ip_lib on its own. This just looks like it is testing the device_exists() function so doesn\u0027t belong here at all. Am I missing something?","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        with mock.patch.object(ip_lib.IPDevice, \u0027_execute\u0027) as _execute:"},{"line_number":235,"context_line":"            _execute.return_value \u003d \u0027\u0027"},{"line_number":236,"context_line":"            _execute.side_effect \u003d RuntimeError"},{"line_number":237,"context_line":"            self.assertFalse(ip_lib.device_exists(\u0027tap5\u0027, namespace\u003dself.BR_NAME))"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def test_replace_port_with_attrs(self):"},{"line_number":240,"context_line":"        pname \u003d \"tap5\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_5e9101f0","line":237,"updated":"2015-01-23 19:42:39.000000000","message":"line too long (82 \u003e 79 characters)","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"101e436437366fb3d61705fa45aa981ca70af637","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        with mock.patch.object(ip_lib.IPDevice, \u0027_execute\u0027) as _execute:"},{"line_number":247,"context_line":"            _execute.return_value \u003d \u0027\u0027"},{"line_number":248,"context_line":"            _execute.side_effect \u003d RuntimeError"},{"line_number":249,"context_line":"            self.assertFalse(ip_lib.device_exists(\u0027tap5\u0027, namespace\u003dself.BR_NAME))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _test_delete_port(self, exp_timeout\u003dNone):"},{"line_number":252,"context_line":"        exp_timeout_str \u003d self._build_timeout_opt(exp_timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_1eb21994","line":249,"updated":"2015-01-23 19:42:39.000000000","message":"line too long (82 \u003e 79 characters)","commit_id":"8da6900bce2d80fb348f8f0d4cb74796a3e27db1"}]}
