)]}'
{"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4a9ea7eab43ddee4a94a7c2f2155342c3639200d","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return 0"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def disable_ipv6(self):"},{"line_number":349,"context_line":"        sysctl_name \u003d re.sub(r\u0027\\.\u0027, \u0027/\u0027, self.name)"},{"line_number":350,"context_line":"        cmd \u003d \u0027net.ipv6.conf.%s.disable_ipv6\u003d1\u0027 % sysctl_name"},{"line_number":351,"context_line":"        return self._sysctl([cmd], ignore_unknown_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_53ed428d","line":348,"updated":"2016-08-31 13:20:14.000000000","message":"Alternately you could put a \u0027if not ipv6_utils.is_enabled(): return\u0027 here","commit_id":"f99e0d01a475e8419a80b622fcfbb04907d55804"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"53dd46d73fd3190180e33ca328823496b16f2d51","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return 0"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def disable_ipv6(self):"},{"line_number":349,"context_line":"        sysctl_name \u003d re.sub(r\u0027\\.\u0027, \u0027/\u0027, self.name)"},{"line_number":350,"context_line":"        cmd \u003d \u0027net.ipv6.conf.%s.disable_ipv6\u003d1\u0027 % sysctl_name"},{"line_number":351,"context_line":"        return self._sysctl([cmd], ignore_unknown_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_855cddee","line":348,"in_reply_to":"fa7ab95a_53ed428d","updated":"2016-08-31 13:28:31.000000000","message":"I think, Brian\u0027s suggestion is easier to understand.","commit_id":"f99e0d01a475e8419a80b622fcfbb04907d55804"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6062c81ea968ca76b0567184ca73cb7b89d31e07","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"    here."},{"line_number":1188,"context_line":"    \"\"\""},{"line_number":1189,"context_line":"    # silently ignore ipv6 sysctls if it is disabled on the system"},{"line_number":1190,"context_line":"    if \u0027ipv6\u0027 in cmd[0] and not ipv6_utils.is_enabled():"},{"line_number":1191,"context_line":"        return 0"},{"line_number":1192,"context_line":"    cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027] + cmd"},{"line_number":1193,"context_line":"    ip_wrapper \u003d IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_a44957b8","line":1190,"updated":"2017-11-08 18:42:20.000000000","message":"This should use is_enabled_and_bind_by_default as is_enabled has been deprecated.  I\u0027ll do a follow-on to remove that.","commit_id":"3fb93cb3ceb62f1923e5286105a0c17f15700e89"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b3061b234ede8c6141d605b0788daba3bf21cf5c","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"    here."},{"line_number":1188,"context_line":"    \"\"\""},{"line_number":1189,"context_line":"    # silently ignore ipv6 sysctls if it is disabled on the system"},{"line_number":1190,"context_line":"    if \u0027ipv6\u0027 in cmd[0] and not ipv6_utils.is_enabled_and_bind_by_default():"},{"line_number":1191,"context_line":"        return 0"},{"line_number":1192,"context_line":"    cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027] + cmd"},{"line_number":1193,"context_line":"    ip_wrapper \u003d IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4b6375_d06ac97f","line":1190,"updated":"2017-11-08 23:41:23.000000000","message":"Have you considered the implications of this change, e.g. wouldn\u0027t operations that make use of IPv6 now fail silently? Do we really have to worry about IPv6 being disabled in the kernel in 2017?","commit_id":"4387c16ba540e9218d1c18e2220c28104a74c42a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ddf454b238760308cc2e55efa012467f92e31b74","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"    here."},{"line_number":1188,"context_line":"    \"\"\""},{"line_number":1189,"context_line":"    # silently ignore ipv6 sysctls if it is disabled on the system"},{"line_number":1190,"context_line":"    if \u0027ipv6\u0027 in cmd[0] and not ipv6_utils.is_enabled_and_bind_by_default():"},{"line_number":1191,"context_line":"        return 0"},{"line_number":1192,"context_line":"    cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027] + cmd"},{"line_number":1193,"context_line":"    ip_wrapper \u003d IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f485f77_76679127","line":1190,"in_reply_to":"1f485f77_b6c5095e","updated":"2017-11-09 22:24:01.000000000","message":"I\u0027m actually going to change this back how it started in earlier PSes - check in disable_ipv6().  Then there is only one caller in the dhcp-agent code of configure_ipv6_ra() that needs to check it\u0027s enabled, the other callers all do it already.  Not going to touch the advanced cases of not configuring IPv6 addresses...","commit_id":"4387c16ba540e9218d1c18e2220c28104a74c42a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d8481e546bd184baf19f36fb25e7d469a8e343de","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"    here."},{"line_number":1188,"context_line":"    \"\"\""},{"line_number":1189,"context_line":"    # silently ignore ipv6 sysctls if it is disabled on the system"},{"line_number":1190,"context_line":"    if \u0027ipv6\u0027 in cmd[0] and not ipv6_utils.is_enabled_and_bind_by_default():"},{"line_number":1191,"context_line":"        return 0"},{"line_number":1192,"context_line":"    cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027] + cmd"},{"line_number":1193,"context_line":"    ip_wrapper \u003d IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4b6375_d6b9a215","line":1190,"in_reply_to":"3f4b6375_d06ac97f","updated":"2017-11-09 01:19:28.000000000","message":"There are still people out there that disable IPv6 at boot, even though I\u0027d like to wish they\u0027d not, that\u0027s why we have that _IS_IPV6_ENABLED check.  I know there would still be a problem when someone say, creates an IPv6 subnet, but I\u0027m guessing they\u0027ve locked things down for a reason.\n\nMy other thought is to put this check back into disable_ipv6() and make sure the l3-agent does the right thing by checking self.use_ipv6 when making sysctl calls and adding addresses, etc.","commit_id":"4387c16ba540e9218d1c18e2220c28104a74c42a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1f65d0e6a9452a046ea3cf3ec491f1824b077438","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"    here."},{"line_number":1188,"context_line":"    \"\"\""},{"line_number":1189,"context_line":"    # silently ignore ipv6 sysctls if it is disabled on the system"},{"line_number":1190,"context_line":"    if \u0027ipv6\u0027 in cmd[0] and not ipv6_utils.is_enabled_and_bind_by_default():"},{"line_number":1191,"context_line":"        return 0"},{"line_number":1192,"context_line":"    cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027] + cmd"},{"line_number":1193,"context_line":"    ip_wrapper \u003d IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f485f77_b6c5095e","line":1190,"in_reply_to":"3f4b6375_d6b9a215","updated":"2017-11-09 21:30:08.000000000","message":"Understood. The answer here would be to emit a WARN statement just in case, but it\u0027s probably overkill for this scenario, oh well.","commit_id":"4387c16ba540e9218d1c18e2220c28104a74c42a"}],"neutron/tests/unit/agent/linux/test_bridge_lib.py":[{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"7f5c3347bde92caeb6acc403ab6cdddfb7bc850a","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        cmd \u003d \u0027net.ipv6.conf.%s.disable_ipv6\u003d1\u0027 % self._BR_NAME"},{"line_number":76,"context_line":"        self._verify_bridge_mock_check_exit_code([\u0027sysctl\u0027, \u0027-w\u0027, cmd])"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        with mock.patch(\u0027neutron.common.ipv6_utils.is_enabled\u0027,"},{"line_number":79,"context_line":"                        return_value\u003dFalse):"},{"line_number":80,"context_line":"            br.disable_ipv6()"},{"line_number":81,"context_line":"            self._verify_bridge_mock_not_called()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        br.addif(self._IF_NAME)"},{"line_number":84,"context_line":"        self._verify_bridge_mock("},{"line_number":85,"context_line":"            [\u0027brctl\u0027, \u0027addif\u0027, self._BR_NAME, self._IF_NAME])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_32fd5a6e","line":82,"range":{"start_line":78,"start_character":0,"end_line":82,"end_character":0},"updated":"2016-09-08 12:48:06.000000000","message":"I believe this test does not belong here but rather to neutron.tests.unit.agent.linux.test_ip_lib. Please cover both cases - when ipv6 is enabled and disabled.","commit_id":"e7909e15572b32f02c5539f9db116e2f1160a1c4"}],"neutron/tests/unit/agent/linux/test_ip_lib.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0ae3171a82f86b3181af0ccb546712cdd3a34f83","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        self.execute \u003d self.execute_p.start()"},{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    def test_disable_ipv6_when_ipv6_globally_enabled(self):"},{"line_number":1771,"context_line":"        dev1 \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1772,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027) as enabled:"},{"line_number":1773,"context_line":"            enabled.return_value \u003d True"},{"line_number":1774,"context_line":"            dev1.disable_ipv6()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_92ed9626","line":1771,"updated":"2017-11-07 14:54:53.000000000","message":"nit: why \"dev1\" instead of just \"dev\"?","commit_id":"c8171c25d7bdddc2a8b342025252e03000ec3bfe"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"085331fc511f0e238c4aefa6d1f0586dffff489b","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        self.execute \u003d self.execute_p.start()"},{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    def test_disable_ipv6_when_ipv6_globally_enabled(self):"},{"line_number":1771,"context_line":"        dev1 \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1772,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027) as enabled:"},{"line_number":1773,"context_line":"            enabled.return_value \u003d True"},{"line_number":1774,"context_line":"            dev1.disable_ipv6()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_12f526cb","line":1771,"in_reply_to":"3f4b6375_92ed9626","updated":"2017-11-07 15:02:08.000000000","message":"because i just used what was there :)\n\nI\u0027ll fix the rest up.","commit_id":"c8171c25d7bdddc2a8b342025252e03000ec3bfe"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0ae3171a82f86b3181af0ccb546712cdd3a34f83","unresolved":false,"context_lines":[{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    def test_disable_ipv6_when_ipv6_globally_enabled(self):"},{"line_number":1771,"context_line":"        dev1 \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1772,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027) as enabled:"},{"line_number":1773,"context_line":"            enabled.return_value \u003d True"},{"line_number":1774,"context_line":"            dev1.disable_ipv6()"},{"line_number":1775,"context_line":"            self.execute.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_72f0dafd","line":1772,"updated":"2017-11-07 14:54:53.000000000","message":"You can pass return_value as an argument to object() method, You will then don\u0027t need this \"enabled\" variable","commit_id":"c8171c25d7bdddc2a8b342025252e03000ec3bfe"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0ae3171a82f86b3181af0ccb546712cdd3a34f83","unresolved":false,"context_lines":[{"line_number":1799,"context_line":"            ip_lib.sysctl([\u0027net.ipv4.ip_forward\u003d1\u0027])"},{"line_number":1800,"context_line":"            self.execute.assert_called_once_with("},{"line_number":1801,"context_line":"                [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.ip_forward\u003d1\u0027],"},{"line_number":1802,"context_line":"                log_fail_as_error\u003dTrue, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_52f39e09","line":1802,"updated":"2017-11-07 14:54:53.000000000","message":"maybe I\u0027m wrong but all 4 tests are the same, only difference is executed sysctl command and \"is_enabled\" value.\nMaybe You could create additional \"helper\" method with those two values passed as arguments and then make less copy/paste of code?\nAlso I think that one \"positive\" and one \"negative\" test should be enough. There is no need to make tests for more than one sysctl commands here.","commit_id":"c8171c25d7bdddc2a8b342025252e03000ec3bfe"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a07e0540e5c60200fcae39b51f3ce1ae16ba2fda","unresolved":false,"context_lines":[{"line_number":1770,"context_line":"    def test_sysctl_when_ipv6_globally_enabled(self):"},{"line_number":1771,"context_line":"        dev \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1772,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027,"},{"line_number":1773,"context_line":"                               return_value\u003dTrue) as enabled:"},{"line_number":1774,"context_line":"            dev.disable_ipv6()"},{"line_number":1775,"context_line":"            self.execute.assert_called_once_with("},{"line_number":1776,"context_line":"                [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv6.conf.tap0.disable_ipv6\u003d1\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_06528867","line":1773,"updated":"2017-11-07 18:45:05.000000000","message":"\"F841 local variable \u0027enabled\u0027 is assigned to but never used\" :)","commit_id":"781e91d69873746f638a85faaa557226f9c4b509"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4ddf6359755c834cdd1b34aa5c5983f53b0b6187","unresolved":false,"context_lines":[{"line_number":1770,"context_line":"    def test_sysctl_when_ipv6_globally_enabled(self):"},{"line_number":1771,"context_line":"        dev \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1772,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027,"},{"line_number":1773,"context_line":"                               return_value\u003dTrue) as enabled:"},{"line_number":1774,"context_line":"            dev.disable_ipv6()"},{"line_number":1775,"context_line":"            self.execute.assert_called_once_with("},{"line_number":1776,"context_line":"                [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv6.conf.tap0.disable_ipv6\u003d1\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_21420e3f","line":1773,"in_reply_to":"3f4b6375_06528867","updated":"2017-11-07 19:04:22.000000000","message":"Argh, I ran the pep8 tests in the wrong directory, will fix.","commit_id":"781e91d69873746f638a85faaa557226f9c4b509"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a07e0540e5c60200fcae39b51f3ce1ae16ba2fda","unresolved":false,"context_lines":[{"line_number":1784,"context_line":"    def test_sysctl_when_ipv6_globally_disabled(self):"},{"line_number":1785,"context_line":"        dev \u003d ip_lib.IPDevice(\u0027tap0\u0027, \u0027ns1\u0027)"},{"line_number":1786,"context_line":"        with mock.patch.object(ip_lib.ipv6_utils, \u0027is_enabled\u0027,"},{"line_number":1787,"context_line":"                               return_value\u003dFalse) as enabled:"},{"line_number":1788,"context_line":"            dev.disable_ipv6()"},{"line_number":1789,"context_line":"            self.assertFalse(self.execute.called)"},{"line_number":1790,"context_line":"            # make sure IPv4 calls still work"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_e64c0cc9","line":1787,"updated":"2017-11-07 18:45:05.000000000","message":"\"F841 local variable \u0027enabled\u0027 is assigned to but never used\" :)","commit_id":"781e91d69873746f638a85faaa557226f9c4b509"}]}
