)]}'
{"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e21a0663ab3fda6673fcae0a2dd7474267083519","unresolved":false,"context_lines":[{"line_number":1837,"context_line":""},{"line_number":1838,"context_line":"def validate_local_ip(local_ip):"},{"line_number":1839,"context_line":"    \"\"\"Verify if the ip exists on the agent\u0027s host.\"\"\""},{"line_number":1840,"context_line":"    if not ip_lib.IPWrapper().get_device_by_ip(local_ip):"},{"line_number":1841,"context_line":"        LOG.error(_LE(\"Tunneling can\u0027t be enabled with invalid local_ip \u0027%s\u0027.\""},{"line_number":1842,"context_line":"                      \" IP couldn\u0027t be found on this host\u0027s interfaces.\"),"},{"line_number":1843,"context_line":"                  local_ip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_cd890acc","line":1840,"updated":"2015-12-02 10:43:46.000000000","message":"will it handle None properly? Isn\u0027t it better to leave check for \u0027not local_ip\u0027?","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c1273d8fdc1d7b9c4a0a38a24c73025b5f963d46","unresolved":false,"context_lines":[{"line_number":1837,"context_line":""},{"line_number":1838,"context_line":"def validate_local_ip(local_ip):"},{"line_number":1839,"context_line":"    \"\"\"Verify if the ip exists on the agent\u0027s host.\"\"\""},{"line_number":1840,"context_line":"    if not ip_lib.IPWrapper().get_device_by_ip(local_ip):"},{"line_number":1841,"context_line":"        LOG.error(_LE(\"Tunneling can\u0027t be enabled with invalid local_ip \u0027%s\u0027.\""},{"line_number":1842,"context_line":"                      \" IP couldn\u0027t be found on this host\u0027s interfaces.\"),"},{"line_number":1843,"context_line":"                  local_ip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_eff6d58d","line":1840,"in_reply_to":"9a8ffd7b_cd890acc","updated":"2015-12-08 23:48:19.000000000","message":"it handles it correctly, it returns None when ip is None","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5fc2665b5614b7b1a177dbf001acf3ea6addf549","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027, \u002710.10.10.10\u0027, group\u003d\u0027OVS\u0027)"},{"line_number":79,"context_line":"        cfg.CONF.set_override(\u0027tunnel_types\u0027, [p_const.TYPE_GRE],"},{"line_number":80,"context_line":"                              group\u003d\u0027AGENT\u0027)"},{"line_number":81,"context_line":"        # ValueError will not raise"},{"line_number":82,"context_line":"        self.mod_agent.validate_tunnel_config(cfg.CONF.AGENT.tunnel_types,"},{"line_number":83,"context_line":"                                              cfg.CONF.OVS.local_ip)"},{"line_number":84,"context_line":"        self.mock_validate_local_ip.assert_called_once_with(\u002710.10.10.10\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_d439e9d9","line":81,"updated":"2015-12-01 04:12:42.000000000","message":"this comment here should be removed.","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c1273d8fdc1d7b9c4a0a38a24c73025b5f963d46","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027, \u002710.10.10.10\u0027, group\u003d\u0027OVS\u0027)"},{"line_number":79,"context_line":"        cfg.CONF.set_override(\u0027tunnel_types\u0027, [p_const.TYPE_GRE],"},{"line_number":80,"context_line":"                              group\u003d\u0027AGENT\u0027)"},{"line_number":81,"context_line":"        # ValueError will not raise"},{"line_number":82,"context_line":"        self.mod_agent.validate_tunnel_config(cfg.CONF.AGENT.tunnel_types,"},{"line_number":83,"context_line":"                                              cfg.CONF.OVS.local_ip)"},{"line_number":84,"context_line":"        self.mock_validate_local_ip.assert_called_once_with(\u002710.10.10.10\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_cf42f9ad","line":81,"in_reply_to":"9a8ffd7b_d439e9d9","updated":"2015-12-08 23:48:19.000000000","message":"Done","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5fc2665b5614b7b1a177dbf001acf3ea6addf549","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                              cfg.CONF.OVS.local_ip)"},{"line_number":84,"context_line":"        self.mock_validate_local_ip.assert_called_once_with(\u002710.10.10.10\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_validate_tunnel_types_fails_for_invalid_tunnel_type(self):"},{"line_number":87,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027, \u002710.10.10.10\u0027, group\u003d\u0027OVS\u0027)"},{"line_number":88,"context_line":"        cfg.CONF.set_override(\u0027tunnel_types\u0027, [\u0027foobar\u0027], group\u003d\u0027AGENT\u0027)"},{"line_number":89,"context_line":"        with testtools.ExpectedException(SystemExit):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_34eb95b2","line":86,"updated":"2015-12-01 04:12:42.000000000","message":"validate_tunnel_types will fail for invalid ip too, I think it\u0027s OK to have test_validate_local_ip_with_invalid_ip test for invalid ip, but I\u0027m not sure if it\u0027s enough for validate_tunnel_types.","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"0fd0f74a43f02b5cd07e6f59d06748b2fcb2f40f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                              cfg.CONF.OVS.local_ip)"},{"line_number":84,"context_line":"        self.mock_validate_local_ip.assert_called_once_with(\u002710.10.10.10\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_validate_tunnel_types_fails_for_invalid_tunnel_type(self):"},{"line_number":87,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027, \u002710.10.10.10\u0027, group\u003d\u0027OVS\u0027)"},{"line_number":88,"context_line":"        cfg.CONF.set_override(\u0027tunnel_types\u0027, [\u0027foobar\u0027], group\u003d\u0027AGENT\u0027)"},{"line_number":89,"context_line":"        with testtools.ExpectedException(SystemExit):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_90b3ad4c","line":86,"in_reply_to":"9a8ffd7b_09bac10a","updated":"2015-12-09 02:49:50.000000000","message":"My previous point is not that,,, but I think it\u0027s OK now.","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"aa4c10ee8d77defe721f34c45e2c1ccd4dfc66aa","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                              cfg.CONF.OVS.local_ip)"},{"line_number":84,"context_line":"        self.mock_validate_local_ip.assert_called_once_with(\u002710.10.10.10\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_validate_tunnel_types_fails_for_invalid_tunnel_type(self):"},{"line_number":87,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027, \u002710.10.10.10\u0027, group\u003d\u0027OVS\u0027)"},{"line_number":88,"context_line":"        cfg.CONF.set_override(\u0027tunnel_types\u0027, [\u0027foobar\u0027], group\u003d\u0027AGENT\u0027)"},{"line_number":89,"context_line":"        with testtools.ExpectedException(SystemExit):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_09bac10a","line":86,"in_reply_to":"9a8ffd7b_34eb95b2","updated":"2015-12-01 21:42:46.000000000","message":"It doesn\u0027t fail for invalid ip because validate_local_ip is mocked in L74 and returns a mock not None ... it\u0027s proven by test_validate_tunnel_types_succeeds","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e21a0663ab3fda6673fcae0a2dd7474267083519","unresolved":false,"context_lines":[{"line_number":2664,"context_line":"    pass"},{"line_number":2665,"context_line":""},{"line_number":2666,"context_line":""},{"line_number":2667,"context_line":"class TestValidateTunnelLocalIP(base.BaseTestCase):"},{"line_number":2668,"context_line":"    def test_validate_local_ip_with_valid_ip(self):"},{"line_number":2669,"context_line":"        mock_get_device_by_ip \u003d mock.patch.object("},{"line_number":2670,"context_line":"            ip_lib.IPWrapper, \u0027get_device_by_ip\u0027).start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_0d44f271","line":2667,"updated":"2015-12-02 10:43:46.000000000","message":"please add test for local_ip\u003dNone","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c1273d8fdc1d7b9c4a0a38a24c73025b5f963d46","unresolved":false,"context_lines":[{"line_number":2664,"context_line":"    pass"},{"line_number":2665,"context_line":""},{"line_number":2666,"context_line":""},{"line_number":2667,"context_line":"class TestValidateTunnelLocalIP(base.BaseTestCase):"},{"line_number":2668,"context_line":"    def test_validate_local_ip_with_valid_ip(self):"},{"line_number":2669,"context_line":"        mock_get_device_by_ip \u003d mock.patch.object("},{"line_number":2670,"context_line":"            ip_lib.IPWrapper, \u0027get_device_by_ip\u0027).start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_6f666552","line":2667,"in_reply_to":"9a8ffd7b_0d44f271","updated":"2015-12-08 23:48:19.000000000","message":"Done","commit_id":"ba6a9f1b132fa58c6c162a1e7addffd824c86fef"}]}
