)]}'
{"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3e09bf3920fbb328b8f6d9851551b8db45017fc7","unresolved":false,"context_lines":[{"line_number":696,"context_line":"        table \u003d table or self._table"},{"line_number":697,"context_line":"        privileged.add_ip_route(self._parent.namespace, cidr, ip_version,"},{"line_number":698,"context_line":"                                device\u003dself.name, via\u003dvia, table\u003dtable,"},{"line_number":699,"context_line":"                                metric\u003dmetric, **kwargs)"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"    def delete_route(self, cidr, via\u003dNone, table\u003dNone, **kwargs):"},{"line_number":702,"context_line":"        ip_version \u003d common_utils.get_ip_version(cidr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_f4cac89e","line":699,"updated":"2019-05-29 13:31:09.000000000","message":"Since there are callers that might not want to instantiate an IPDevice() object in order to add a route, I would add a method below like we did for other things, like add_route() or add_ip_route() and have it take a device name, namespace, etc.\n\nFor example, in router_info.py there\u0027s calls like this:\n\n  device \u003d ip_lib.IPDevice(device_name, namespace\u003dnamespace)\n  device.route.add_route(...)\n\nSame for other methods here.","commit_id":"8ca55b3d6339c2c0ae2a361498fa421b12806d70"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dd124128ac7f2127e87b907dec5a89198f35c46e","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                \u0027via\u0027, gateway]"},{"line_number":616,"context_line":"        args +\u003d self._dev_args()"},{"line_number":617,"context_line":"        args +\u003d self._table_args(table)"},{"line_number":618,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], args)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    def list_routes(self, ip_version, scope\u003dNone, via\u003dNone, **kwargs):"},{"line_number":621,"context_line":"        def get_device(index, devices):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_093b129c","line":618,"updated":"2019-06-07 17:10:52.000000000","message":"I\u0027m assuming you\u0027ll get to this too.  Just an FYI that Slaweq had seen a recent error in this path coming from the router_info code where it was seeing some kind of netlink error (think it was around it not existing), that should be caught and ignored - I don\u0027t think the check on L608 is always working.","commit_id":"24848528172818c600f57bf7d198d6e0cbc5539f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dd124128ac7f2127e87b907dec5a89198f35c46e","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                                metric\u003dmetric, **kwargs)"},{"line_number":698,"context_line":"        # privileged.add_ip_route(self._parent.namespace, cidr, ip_version, )"},{"line_number":699,"context_line":"        #                         # device\u003dself.name, via\u003dvia, table\u003dtable,"},{"line_number":700,"context_line":"        #                         # metric\u003dmetric, **kwargs)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"    def delete_route(self, cidr, via\u003dNone, table\u003dNone, **kwargs):"},{"line_number":703,"context_line":"        ip_version \u003d common_utils.get_ip_version(cidr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_89d8627f","line":700,"updated":"2019-06-07 17:10:52.000000000","message":"As I mentioned in PS1, there should be a global add_ip_route method for callers that don\u0027t need IPWrapper, then this should call that.","commit_id":"24848528172818c600f57bf7d198d6e0cbc5539f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5fd0ffb509414ccb5c5c7495868a76e6b192a255","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                                metric\u003dmetric, **kwargs)"},{"line_number":698,"context_line":"        # privileged.add_ip_route(self._parent.namespace, cidr, ip_version, )"},{"line_number":699,"context_line":"        #                         # device\u003dself.name, via\u003dvia, table\u003dtable,"},{"line_number":700,"context_line":"        #                         # metric\u003dmetric, **kwargs)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"    def delete_route(self, cidr, via\u003dNone, table\u003dNone, **kwargs):"},{"line_number":703,"context_line":"        ip_version \u003d common_utils.get_ip_version(cidr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_074c3240","line":700,"in_reply_to":"9fb8cfa7_89d8627f","updated":"2019-06-11 10:24:10.000000000","message":"Done","commit_id":"24848528172818c600f57bf7d198d6e0cbc5539f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def add_gateway(self, gateway, metric\u003dNone, table\u003dNone, scope\u003d\u0027global\u0027):"},{"line_number":602,"context_line":"        self.add_route(None, via\u003dgateway, table\u003dtable, metric\u003dmetric,"},{"line_number":603,"context_line":"                       scope\u003dscope)"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def _run_as_root_detect_device_not_found(self, options, args):"},{"line_number":606,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_bfd61d27","line":603,"updated":"2019-06-17 20:16:26.000000000","message":"Why doesn\u0027t this call add_ip_route() directly?","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def add_gateway(self, gateway, metric\u003dNone, table\u003dNone, scope\u003d\u0027global\u0027):"},{"line_number":602,"context_line":"        self.add_route(None, via\u003dgateway, table\u003dtable, metric\u003dmetric,"},{"line_number":603,"context_line":"                       scope\u003dscope)"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def _run_as_root_detect_device_not_found(self, options, args):"},{"line_number":606,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_0cb4dc34","line":603,"in_reply_to":"9fb8cfa7_bfd61d27","updated":"2019-06-18 11:04:38.000000000","message":"Because self.add_route handles the class table member. All methods adding routes in this class, should call self.add_route()","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    def get_gateway(self, scope\u003dNone, table\u003dNone,"},{"line_number":639,"context_line":"                    ip_version\u003dconstants.IP_VERSION_4):"},{"line_number":640,"context_line":"        routes \u003d self.list_routes(ip_version, scope\u003dscope, table\u003dtable)"},{"line_number":641,"context_line":"        for route in routes:"},{"line_number":642,"context_line":"            if route[\u0027via\u0027] and route[\u0027cidr\u0027] in constants.IP_ANY.values():"},{"line_number":643,"context_line":"                return route"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_3fe22d03","line":640,"updated":"2019-06-17 20:16:26.000000000","message":"and this call list_ip_routes() ?","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    def get_gateway(self, scope\u003dNone, table\u003dNone,"},{"line_number":639,"context_line":"                    ip_version\u003dconstants.IP_VERSION_4):"},{"line_number":640,"context_line":"        routes \u003d self.list_routes(ip_version, scope\u003dscope, table\u003dtable)"},{"line_number":641,"context_line":"        for route in routes:"},{"line_number":642,"context_line":"            if route[\u0027via\u0027] and route[\u0027cidr\u0027] in constants.IP_ANY.values():"},{"line_number":643,"context_line":"                return route"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ece4e83e","line":640,"in_reply_to":"9fb8cfa7_3fe22d03","updated":"2019-06-18 11:04:38.000000000","message":"Same reason, table member.\n\nIf, in a future, we decide to remove this class and have single functions, we\u0027ll need to redo this. But I prefer to have one single method handling self.table rather than doing this in every place:\n  table \u003d table or self._table","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"    if table:"},{"line_number":1468,"context_line":"        table \u003d IP_RULE_TABLES.get(table, table)"},{"line_number":1469,"context_line":"    if cidr:"},{"line_number":1470,"context_line":"        ip_version \u003d common_utils.get_ip_version(cidr)"},{"line_number":1471,"context_line":"    else:"},{"line_number":1472,"context_line":"        ip_version \u003d common_utils.get_ip_version(via)"},{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_bf8dbd32","line":1470,"range":{"start_line":1470,"start_character":49,"end_line":1470,"end_character":53},"updated":"2019-06-17 20:16:26.000000000","message":"can this be \u0027cidr or via\u0027 and you don\u0027t need the \u0027if cidr\u0027 check?","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"    if table:"},{"line_number":1468,"context_line":"        table \u003d IP_RULE_TABLES.get(table, table)"},{"line_number":1469,"context_line":"    if cidr:"},{"line_number":1470,"context_line":"        ip_version \u003d common_utils.get_ip_version(cidr)"},{"line_number":1471,"context_line":"    else:"},{"line_number":1472,"context_line":"        ip_version \u003d common_utils.get_ip_version(via)"},{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_cc3a4497","line":1470,"range":{"start_line":1470,"start_character":49,"end_line":1470,"end_character":53},"in_reply_to":"9fb8cfa7_bf8dbd32","updated":"2019-06-18 11:04:38.000000000","message":"Upsssss, my pythonic sense is tingling. Thanks","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":1472,"context_line":"        ip_version \u003d common_utils.get_ip_version(via)"},{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"},{"line_number":1474,"context_line":"                            device\u003ddevice, via\u003dvia, table\u003dtable,"},{"line_number":1475,"context_line":"                            metric\u003dmetric, scope\u003dscope, **kwargs)"},{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"def list_ip_routes(namespace, ip_version, scope\u003dNone, via\u003dNone, table\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ff725549","line":1475,"updated":"2019-06-17 20:16:26.000000000","message":"I think this should be packaging things up in kwargs, as is done in *_ip_rule() by using _make_pyroute2_args() or similar, then the privileged code doesn\u0027t have to do much.","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":1472,"context_line":"        ip_version \u003d common_utils.get_ip_version(via)"},{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"},{"line_number":1474,"context_line":"                            device\u003ddevice, via\u003dvia, table\u003dtable,"},{"line_number":1475,"context_line":"                            metric\u003dmetric, scope\u003dscope, **kwargs)"},{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"def list_ip_routes(namespace, ip_version, scope\u003dNone, via\u003dNone, table\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_6ca9d88e","line":1475,"in_reply_to":"9fb8cfa7_ff725549","updated":"2019-06-18 11:04:38.000000000","message":"I agree, but _make_pyroute2_args() was implemented because two functions were going to use the same args.\n\nIn the follow-up patch (delete_ip_route), I\u0027ll create this function to wrap this code, used by two methods, in one place.","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"},{"line_number":1474,"context_line":"                            device\u003ddevice, via\u003dvia, table\u003dtable,"},{"line_number":1475,"context_line":"                            metric\u003dmetric, scope\u003dscope, **kwargs)"},{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"def list_ip_routes(namespace, ip_version, scope\u003dNone, via\u003dNone, table\u003dNone,"},{"line_number":1479,"context_line":"                   device\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_3fc78d48","line":1476,"updated":"2019-06-17 20:16:26.000000000","message":"Why not delete_route() too ?","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"    privileged.add_ip_route(namespace, cidr, ip_version,"},{"line_number":1474,"context_line":"                            device\u003ddevice, via\u003dvia, table\u003dtable,"},{"line_number":1475,"context_line":"                            metric\u003dmetric, scope\u003dscope, **kwargs)"},{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"def list_ip_routes(namespace, ip_version, scope\u003dNone, via\u003dNone, table\u003dNone,"},{"line_number":1479,"context_line":"                   device\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ac5ef0e6","line":1476,"in_reply_to":"9fb8cfa7_3fc78d48","updated":"2019-06-18 11:04:38.000000000","message":"Because I prefer to implement those patches step by step, first add/list and the delete (tc_policy_class, tc_policy_disc, IpRuleCommand)","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"af03a4c5117d974a4f973f1edc3b5f9e1ed35adc","unresolved":false,"context_lines":[{"line_number":1477,"context_line":"    \"\"\"List IP routes\"\"\""},{"line_number":1478,"context_line":"    def get_device(index, devices):"},{"line_number":1479,"context_line":"        for device in (d for d in devices if d[\u0027index\u0027] \u003d\u003d index):"},{"line_number":1480,"context_line":"            return get_attr(device, \u0027IFLA_IFNAME\u0027)"},{"line_number":1481,"context_line":""},{"line_number":1482,"context_line":"    table \u003d table if table else \u0027main\u0027"},{"line_number":1483,"context_line":"    table \u003d IP_RULE_TABLES.get(table, table)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_34341993","line":1480,"updated":"2019-06-25 08:53:01.000000000","message":"why You need 2 loops here?\nWouldn\u0027t be something like:\n\n    for device in devices:\n        if device[\u0027index\u0027] \u003d\u003d index:\n            return get_attr(device, \u0027IFLA_IFNAME\u0027)\n\nenough?","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f72f7ee66ac4715faee692c8ec2bd4d2fc79b128","unresolved":false,"context_lines":[{"line_number":1477,"context_line":"    \"\"\"List IP routes\"\"\""},{"line_number":1478,"context_line":"    def get_device(index, devices):"},{"line_number":1479,"context_line":"        for device in (d for d in devices if d[\u0027index\u0027] \u003d\u003d index):"},{"line_number":1480,"context_line":"            return get_attr(device, \u0027IFLA_IFNAME\u0027)"},{"line_number":1481,"context_line":""},{"line_number":1482,"context_line":"    table \u003d table if table else \u0027main\u0027"},{"line_number":1483,"context_line":"    table \u003d IP_RULE_TABLES.get(table, table)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_0d745167","line":1480,"in_reply_to":"9fb8cfa7_2f95a433","updated":"2019-06-26 13:20:51.000000000","message":"ok, please ignore my comment :)","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"47c51e1bf4060bfaeb5e7469bd09a72dde54e278","unresolved":false,"context_lines":[{"line_number":1477,"context_line":"    \"\"\"List IP routes\"\"\""},{"line_number":1478,"context_line":"    def get_device(index, devices):"},{"line_number":1479,"context_line":"        for device in (d for d in devices if d[\u0027index\u0027] \u003d\u003d index):"},{"line_number":1480,"context_line":"            return get_attr(device, \u0027IFLA_IFNAME\u0027)"},{"line_number":1481,"context_line":""},{"line_number":1482,"context_line":"    table \u003d table if table else \u0027main\u0027"},{"line_number":1483,"context_line":"    table \u003d IP_RULE_TABLES.get(table, table)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_2f95a433","line":1480,"in_reply_to":"9fb8cfa7_34341993","updated":"2019-06-25 09:52:58.000000000","message":"Sorry but I don\u0027t understand your question here.\n\nI have just one loop based on a generator, similar to your proposal but more efficient.\n\nAm I missing something?","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"}],"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dd124128ac7f2127e87b907dec5a89198f35c46e","unresolved":false,"context_lines":[{"line_number":685,"context_line":"    except OSError as e:"},{"line_number":686,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":687,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":688,"context_line":"        raise"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"@privileged.default.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_a97e8668","line":688,"updated":"2019-06-07 17:10:52.000000000","message":"I think you should also check for EEXIST here and either ignore, or raise a new exception the caller can catch.","commit_id":"24848528172818c600f57bf7d198d6e0cbc5539f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5fd0ffb509414ccb5c5c7495868a76e6b192a255","unresolved":false,"context_lines":[{"line_number":685,"context_line":"    except OSError as e:"},{"line_number":686,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":687,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":688,"context_line":"        raise"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"@privileged.default.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_c7513adb","line":688,"in_reply_to":"9fb8cfa7_a97e8668","updated":"2019-06-11 10:24:10.000000000","message":"Done","commit_id":"24848528172818c600f57bf7d198d6e0cbc5539f"}],"neutron/tests/functional/agent/linux/test_ip_lib.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"af03a4c5117d974a4f973f1edc3b5f9e1ed35adc","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        self.cidrs \u003d [\u0027192.168.0.0/24\u0027, \u002710.0.0.0/8\u0027, \u00272001::/64\u0027, \u0027faaa::/96\u0027]"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _delete_namespace(self):"},{"line_number":829,"context_line":"        ip_lib.delete_network_namespace(self.namespace)"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":"    def _assert_route(self, routes, table\u003dNone, source_prefix\u003dNone,"},{"line_number":832,"context_line":"                      cidr\u003dNone, scope\u003dNone, via\u003dNone, metric\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_14631544","line":829,"updated":"2019-06-25 08:53:01.000000000","message":"maybe You could handle here the case when namespace is already deleted? Just in case :)","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"47c51e1bf4060bfaeb5e7469bd09a72dde54e278","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        self.cidrs \u003d [\u0027192.168.0.0/24\u0027, \u002710.0.0.0/8\u0027, \u00272001::/64\u0027, \u0027faaa::/96\u0027]"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _delete_namespace(self):"},{"line_number":829,"context_line":"        ip_lib.delete_network_namespace(self.namespace)"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":"    def _assert_route(self, routes, table\u003dNone, source_prefix\u003dNone,"},{"line_number":832,"context_line":"                      cidr\u003dNone, scope\u003dNone, via\u003dNone, metric\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_afa0b491","line":829,"in_reply_to":"9fb8cfa7_14631544","updated":"2019-06-25 09:52:58.000000000","message":"Actually we have a wonderful namespace fixture I should use.","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"af03a4c5117d974a4f973f1edc3b5f9e1ed35adc","unresolved":false,"context_lines":[{"line_number":873,"context_line":"            gateway \u003d (gateway_ipv4 if ip_version \u003d\u003d constants.IP_VERSION_4"},{"line_number":874,"context_line":"                       else gateway_ipv6)"},{"line_number":875,"context_line":"            self.device.route.add_route(cidr, via\u003dgateway)"},{"line_number":876,"context_line":"            routes \u003d self.device.route.list_routes(ip_version)"},{"line_number":877,"context_line":"            self._assert_route(routes, cidr\u003dcidr, via\u003dgateway)"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_add_route_metric(self):"},{"line_number":880,"context_line":"        metrics \u003d (None, 1, 10, 255)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_f45d2179","line":877,"range":{"start_line":876,"start_character":12,"end_line":877,"end_character":62},"updated":"2019-06-25 08:53:01.000000000","message":"maybe this could be done in separate function and \"wait_until_true\" would be used to call it? Than we will for sure not hit any new race condition on overloaded host :)","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cbb143a0091efa58f3dcd55dda3de54c3c32274a","unresolved":false,"context_lines":[{"line_number":873,"context_line":"            gateway \u003d (gateway_ipv4 if ip_version \u003d\u003d constants.IP_VERSION_4"},{"line_number":874,"context_line":"                       else gateway_ipv6)"},{"line_number":875,"context_line":"            self.device.route.add_route(cidr, via\u003dgateway)"},{"line_number":876,"context_line":"            routes \u003d self.device.route.list_routes(ip_version)"},{"line_number":877,"context_line":"            self._assert_route(routes, cidr\u003dcidr, via\u003dgateway)"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_add_route_metric(self):"},{"line_number":880,"context_line":"        metrics \u003d (None, 1, 10, 255)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_8edee83b","line":877,"range":{"start_line":876,"start_character":12,"end_line":877,"end_character":62},"in_reply_to":"9fb8cfa7_8dd36138","updated":"2019-06-27 09:16:54.000000000","message":"Ok, I\u0027ll implement an active wait here","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f72f7ee66ac4715faee692c8ec2bd4d2fc79b128","unresolved":false,"context_lines":[{"line_number":873,"context_line":"            gateway \u003d (gateway_ipv4 if ip_version \u003d\u003d constants.IP_VERSION_4"},{"line_number":874,"context_line":"                       else gateway_ipv6)"},{"line_number":875,"context_line":"            self.device.route.add_route(cidr, via\u003dgateway)"},{"line_number":876,"context_line":"            routes \u003d self.device.route.list_routes(ip_version)"},{"line_number":877,"context_line":"            self._assert_route(routes, cidr\u003dcidr, via\u003dgateway)"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_add_route_metric(self):"},{"line_number":880,"context_line":"        metrics \u003d (None, 1, 10, 255)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_8dd36138","line":877,"range":{"start_line":876,"start_character":12,"end_line":877,"end_character":62},"in_reply_to":"9fb8cfa7_cffc0874","updated":"2019-06-26 13:20:51.000000000","message":"route.add_route() is blocking until it will send message to the kernel but IIRC netlink protocol don\u0027t guarantee You that what You send is done immediately and I think that we had similar problems with some methods which were using exec(ip ...) command. Is it better with pyroute2 lib?","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"47c51e1bf4060bfaeb5e7469bd09a72dde54e278","unresolved":false,"context_lines":[{"line_number":873,"context_line":"            gateway \u003d (gateway_ipv4 if ip_version \u003d\u003d constants.IP_VERSION_4"},{"line_number":874,"context_line":"                       else gateway_ipv6)"},{"line_number":875,"context_line":"            self.device.route.add_route(cidr, via\u003dgateway)"},{"line_number":876,"context_line":"            routes \u003d self.device.route.list_routes(ip_version)"},{"line_number":877,"context_line":"            self._assert_route(routes, cidr\u003dcidr, via\u003dgateway)"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_add_route_metric(self):"},{"line_number":880,"context_line":"        metrics \u003d (None, 1, 10, 255)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_cffc0874","line":877,"range":{"start_line":876,"start_character":12,"end_line":877,"end_character":62},"in_reply_to":"9fb8cfa7_f45d2179","updated":"2019-06-25 09:52:58.000000000","message":"I understand your concerns.\n\nThe command route.add_route() is (must be) a blocking method: it will exit once the command is finished and accomplished. That means at L876 any new route must be in the system. If not, we should raise the exception in L877.\n\nWe should not have a waiting function to collect and check the routes.","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"}],"neutron/tests/functional/privileged/agent/linux/test_ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3e09bf3920fbb328b8f6d9851551b8db45017fc7","unresolved":false,"context_lines":[{"line_number":455,"context_line":"#             cidr \u003d common_utils.ip_to_cidr(ip, mask)"},{"line_number":456,"context_line":"#             self.assertEqual(interfaces[int_name][\u0027cidr\u0027], cidr)"},{"line_number":457,"context_line":"#             self.assertEqual(interfaces[int_name][\u0027scope\u0027],"},{"line_number":458,"context_line":"#                              ip_lib.IP_ADDRESS_SCOPE[ip_address[\u0027scope\u0027]])"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"class RouteTestCase(functional_base.BaseSudoTestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_94b26c48","line":458,"updated":"2019-05-29 13:31:09.000000000","message":"That\u0027s one way to pass the tests :)","commit_id":"8ca55b3d6339c2c0ae2a361498fa421b12806d70"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c457a64180c274b35d3ce642a33acf0d6e4a8996","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        self._check_routes(cidrs, gateway\u003dint_ip_address)"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"    def test_add_route_via_ipv6(self):"},{"line_number":575,"context_line":"        cidrs \u003d [\u00272001::/64\u0027, \u0027faaa::/96\u0027]"},{"line_number":576,"context_line":"        int_cidr \u003d \u0027fd00::1/64\u0027"},{"line_number":577,"context_line":"        via_ip \u003d \u0027fd00::2\u0027"},{"line_number":578,"context_line":"        self.device.addr.add(int_cidr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_9fb6b9dc","line":575,"updated":"2019-06-17 20:16:26.000000000","message":"Should use the IPv6 doc range here and below, 2001:db8","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2df72554f6febea29fc3cbae73bec80b347a36fc","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        self._check_routes(cidrs, gateway\u003dint_ip_address)"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"    def test_add_route_via_ipv6(self):"},{"line_number":575,"context_line":"        cidrs \u003d [\u00272001::/64\u0027, \u0027faaa::/96\u0027]"},{"line_number":576,"context_line":"        int_cidr \u003d \u0027fd00::1/64\u0027"},{"line_number":577,"context_line":"        via_ip \u003d \u0027fd00::2\u0027"},{"line_number":578,"context_line":"        self.device.addr.add(int_cidr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_2ccf6058","line":575,"in_reply_to":"9fb8cfa7_9fb6b9dc","updated":"2019-06-18 11:04:38.000000000","message":"Done","commit_id":"c93967b291aeaa67738a32b07ac778c7a2b47e73"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"af03a4c5117d974a4f973f1edc3b5f9e1ed35adc","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        self.addCleanup(self._remove_ns)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def _remove_ns(self):"},{"line_number":472,"context_line":"        priv_ip_lib.remove_netns(self.namespace)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    def _check_routes(self, cidrs, table\u003dNone, gateway\u003dNone, metric\u003dNone,"},{"line_number":475,"context_line":"                      scope\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_544c2dc7","line":472,"updated":"2019-06-25 08:53:01.000000000","message":"maybe You should handle here the case when namespace is already removed?","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"47c51e1bf4060bfaeb5e7469bd09a72dde54e278","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        self.addCleanup(self._remove_ns)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def _remove_ns(self):"},{"line_number":472,"context_line":"        priv_ip_lib.remove_netns(self.namespace)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    def _check_routes(self, cidrs, table\u003dNone, gateway\u003dNone, metric\u003dNone,"},{"line_number":475,"context_line":"                      scope\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_8ffa9072","line":472,"in_reply_to":"9fb8cfa7_544c2dc7","updated":"2019-06-25 09:52:58.000000000","message":"Done","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"af03a4c5117d974a4f973f1edc3b5f9e1ed35adc","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                                     device\u003dself.device_name, table\u003dtable,"},{"line_number":539,"context_line":"                                     metric\u003dmetric, scope\u003dscope)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._check_routes(cidrs, table\u003dtable, metric\u003dmetric, scope\u003dscope)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def test_add_route_device(self):"},{"line_number":544,"context_line":"        self._add_route_device_and_check(table\u003dNone)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_b4d809ef","line":541,"updated":"2019-06-25 08:53:01.000000000","message":"maybe we should use wait_until_true here as well? What do You think about it?","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"47c51e1bf4060bfaeb5e7469bd09a72dde54e278","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                                     device\u003dself.device_name, table\u003dtable,"},{"line_number":539,"context_line":"                                     metric\u003dmetric, scope\u003dscope)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._check_routes(cidrs, table\u003dtable, metric\u003dmetric, scope\u003dscope)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def test_add_route_device(self):"},{"line_number":544,"context_line":"        self._add_route_device_and_check(table\u003dNone)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_2f7fe4e0","line":541,"in_reply_to":"9fb8cfa7_b4d809ef","updated":"2019-06-25 09:52:58.000000000","message":"As commented in [1], the add_ip_route command should return only once the route is written and available in the system.\n\nIf this is not the case, well, we\u0027d have a problem here.\n\n[1] https://review.opendev.org/#/c/661981/10/neutron/tests/functional/agent/linux/test_ip_lib.py","commit_id":"c3eb660f3afeb6b372fa9d14862a009d19858094"}]}
