)]}'
{"neutron_tempest_plugin/common/ip.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2852d932d34dbab4b9cc6a66850f66d9eb60c951","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            command +\u003d [\u0027id\u0027, id]"},{"line_number":102,"context_line":"        return self.execute(\u0027link\u0027, *command)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def set_link(self, dev, up\u003dFalse, down\u003dFalse):"},{"line_number":105,"context_line":"        command \u003d [\u0027set\u0027, \u0027dev\u0027, dev]"},{"line_number":106,"context_line":"        if up:"},{"line_number":107,"context_line":"            command +\u003d [\u0027up\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_7ab1aaff","line":104,"updated":"2018-10-29 10:37:52.000000000","message":"wouldn\u0027t be better to have something like:\n\n    def set_link(self, dev, state):\n\nwhere state can be \"up\" or \"down\"?","commit_id":"7d44afc74287acf280163c07d7cf824c53c206b5"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"4ca99dcbd113ad578bdea6e02fa272ead6182d4d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            command +\u003d [\u0027id\u0027, id]"},{"line_number":102,"context_line":"        return self.execute(\u0027link\u0027, *command)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def set_link(self, dev, up\u003dFalse, down\u003dFalse):"},{"line_number":105,"context_line":"        command \u003d [\u0027set\u0027, \u0027dev\u0027, dev]"},{"line_number":106,"context_line":"        if up:"},{"line_number":107,"context_line":"            command +\u003d [\u0027up\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_41c85375","line":104,"in_reply_to":"3f79a3b5_7ab1aaff","updated":"2018-10-31 13:15:08.000000000","message":"Yes","commit_id":"7d44afc74287acf280163c07d7cf824c53c206b5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7b8926079255a5d6e420084a3a5ca610134e432e","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        self.add_link(link\u003dport_device, name\u003dsubport_device, type\u003d\u0027vlan\u0027,"},{"line_number":77,"context_line":"                      id\u003dvlan_tag)"},{"line_number":78,"context_line":"        self.set_link(state\u003d\u0027up\u0027, dev\u003dsubport_device)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, dev\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_b0ef8f84","line":78,"range":{"start_line":78,"start_character":22,"end_line":78,"end_character":52},"updated":"2018-11-08 08:52:03.000000000","message":"nit: maybe use same order of parameters as is in definition of this method, IMO that would be more \"logical\"","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        self.add_link(link\u003dport_device, name\u003dsubport_device, type\u003d\u0027vlan\u0027,"},{"line_number":77,"context_line":"                      id\u003dvlan_tag)"},{"line_number":78,"context_line":"        self.set_link(state\u003d\u0027up\u0027, dev\u003dsubport_device)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, dev\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_b796104a","line":78,"range":{"start_line":78,"start_character":22,"end_line":78,"end_character":52},"in_reply_to":"3f79a3b5_b0ef8f84","updated":"2018-12-03 11:47:04.000000000","message":"Done","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7b8926079255a5d6e420084a3a5ca610134e432e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                 ip_addresses\u003dip_addresses, port\u003dport,"},{"line_number":93,"context_line":"                                 subnets\u003dsubnets)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def add_link(self, name, type, link\u003dNone, id\u003dNone):  # noqa"},{"line_number":96,"context_line":"        command \u003d [\u0027add\u0027]"},{"line_number":97,"context_line":"        if link:"},{"line_number":98,"context_line":"            command +\u003d [\u0027link\u0027, link]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_7057b75a","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":33},"updated":"2018-11-08 08:52:03.000000000","message":"I would name it \"link_type\"","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7b8926079255a5d6e420084a3a5ca610134e432e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                 ip_addresses\u003dip_addresses, port\u003dport,"},{"line_number":93,"context_line":"                                 subnets\u003dsubnets)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def add_link(self, name, type, link\u003dNone, id\u003dNone):  # noqa"},{"line_number":96,"context_line":"        command \u003d [\u0027add\u0027]"},{"line_number":97,"context_line":"        if link:"},{"line_number":98,"context_line":"            command +\u003d [\u0027link\u0027, link]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_304dbfc4","line":95,"range":{"start_line":95,"start_character":59,"end_line":95,"end_character":63},"updated":"2018-11-08 08:52:03.000000000","message":"why this is necessary here?","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                 ip_addresses\u003dip_addresses, port\u003dport,"},{"line_number":93,"context_line":"                                 subnets\u003dsubnets)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def add_link(self, name, type, link\u003dNone, id\u003dNone):  # noqa"},{"line_number":96,"context_line":"        command \u003d [\u0027add\u0027]"},{"line_number":97,"context_line":"        if link:"},{"line_number":98,"context_line":"            command +\u003d [\u0027link\u0027, link]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_f7f008de","line":95,"range":{"start_line":95,"start_character":59,"end_line":95,"end_character":63},"in_reply_to":"3f79a3b5_304dbfc4","updated":"2018-12-03 11:47:04.000000000","message":"It is necessary to make statistic code analysis tool to digest builtin keyword \u0027type\u0027 as a parameter name, but yes I should rename it instead a you said.","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                 ip_addresses\u003dip_addresses, port\u003dport,"},{"line_number":93,"context_line":"                                 subnets\u003dsubnets)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def add_link(self, name, type, link\u003dNone, id\u003dNone):  # noqa"},{"line_number":96,"context_line":"        command \u003d [\u0027add\u0027]"},{"line_number":97,"context_line":"        if link:"},{"line_number":98,"context_line":"            command +\u003d [\u0027link\u0027, link]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_17c3445b","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":33},"in_reply_to":"3f79a3b5_7057b75a","updated":"2018-12-03 11:47:04.000000000","message":"Done","commit_id":"03db56498b19c8de2086ba44d8f9afa93f2addea"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7f63ee1a87ef14fdcee09801eda77b32ecc74195","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.add_link(link\u003dport_device, name\u003dsubport_device, link_type\u003d\u0027vlan\u0027,"},{"line_number":77,"context_line":"                      id\u003dvlan_tag)"},{"line_number":78,"context_line":"        self.set_link(device\u003dsubport_device, state\u003d\u0027up\u0027)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, device\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_61412437","line":79,"range":{"start_line":79,"start_character":12,"end_line":79,"end_character":21},"updated":"2018-11-26 20:48:42.000000000","message":"nit: subport_ip","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.add_link(link\u003dport_device, name\u003dsubport_device, link_type\u003d\u0027vlan\u0027,"},{"line_number":77,"context_line":"                      id\u003dvlan_tag)"},{"line_number":78,"context_line":"        self.set_link(device\u003dsubport_device, state\u003d\u0027up\u0027)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, device\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_df4657a9","line":79,"range":{"start_line":79,"start_character":12,"end_line":79,"end_character":21},"in_reply_to":"3f79a3b5_61412437","updated":"2018-12-03 11:47:04.000000000","message":"Done","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7f63ee1a87ef14fdcee09801eda77b32ecc74195","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.set_link(device\u003dsubport_device, state\u003d\u0027up\u0027)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, device\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def list_addresses(self, device\u003dNone, ip_addresses\u003dNone, port\u003dNone,"},{"line_number":84,"context_line":"                       subnets\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_e16694f0","line":81,"updated":"2018-11-26 20:48:42.000000000","message":"What happens if there is an error after the subport device is added, does it get cleaned-up ?  Although I guess the test is going to fail regardless so might not matter.","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.set_link(device\u003dsubport_device, state\u003d\u0027up\u0027)"},{"line_number":79,"context_line":"        for suport_ip in subport_ips:"},{"line_number":80,"context_line":"            self.add_address(address\u003dsuport_ip, device\u003dsubport_device)"},{"line_number":81,"context_line":"        return subport_device"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def list_addresses(self, device\u003dNone, ip_addresses\u003dNone, port\u003dNone,"},{"line_number":84,"context_line":"                       subnets\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_ff20f3b0","line":81,"in_reply_to":"3f79a3b5_e16694f0","updated":"2018-12-03 11:47:04.000000000","message":"If there is an error at any point of this procedure execute command would raise an exception after ip command exists with a non-zeor status and the test would fail with such error. Therefore we could assume it is safe to think the VM is left in a inconsistent state on such case. The only port affected would be anyway the subport and not the parent port. Therefore the actual side effect of any error setting up the subport would just be the VM has no route to send messages on the tagged network. It would therefore produce an error later in the test in case the exception is captured and ignored.\nSpeaking about cleaning it up, the VM would be destroyed at the end of the test as the tagged network and other resources like the sub port and the trunk. So what exactly do you think could be the kind of leakage you suspect we could have here?\nPlease note this function is expected to be executed only inside an VM based on an advanced image (Ubuntu, RHEL, ...) as it is know not to work when running from inside a CirrOS based VM.","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7f63ee1a87ef14fdcee09801eda77b32ecc74195","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                  len(fields) \u003e\u003d 2):"},{"line_number":135,"context_line":"                if line.startswith(\u0027       \u0027):"},{"line_number":136,"context_line":"                    if properties is not None:"},{"line_number":137,"context_line":"                        properties.update(parse_properties(fields))"},{"line_number":138,"context_line":"                else:"},{"line_number":139,"context_line":"                    properties \u003d dict(parse_properties(fields[2:]))"},{"line_number":140,"context_line":"                    yield Address.create(family\u003dfields[0],"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_b31f8f6f","line":137,"updated":"2018-11-26 20:48:42.000000000","message":"This doesn\u0027t seem right.  Assuming my local output:\n\n2: enp0s31f6: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n    link/ether c8:5b:76:76:37:e1 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n    inet 10.1.1.123/24 brd 10.1.1.255 scope global dynamic enp0s31f6\n       valid_lft 63092sec preferred_lft 63092sec\n    inet6 2601:18f:700:c12d:f5f0:b1d1:5ddd:d4b8/64 scope global noprefixroute dynamic \n       valid_lft 300sec preferred_lft 120sec\n    inet6 fe80::244e:31b6:bf1a:366e/64 scope link \n       valid_lft forever preferred_lft forever\n\nWe won\u0027t process the property line associated with (after) the address until the next iteration, right?  \u0027valid_lft\u0027 will be from the previous address.  I think this is why the \"old\" neutron ip_lib code used \u0027ip -o a\u0027 instead, which yields:\n\n2: enp0s31f6    inet 10.1.1.123/24 brd 10.1.1.255 scope global dynamic enp0s31f6\\       valid_lft 63057sec preferred_lft 63057sec\n2: enp0s31f6    inet6 2601:18f:700:c12d:f5f0:b1d1:5ddd:d4b8/64 scope global noprefixroute dynamic \\       valid_lft 298sec preferred_lft 118sec\n2: enp0s31f6    inet6 fe80::244e:31b6:bf1a:366e/64 scope link \\       valid_lft forever preferred_lft forever\n\nEach line is it\u0027s own set of device, IP address and properties, you just lose things like mtu.  I guess it depends on what the caller cares about?","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"2cc579db871d731da65a8a5fa0893c8dd3b35dd8","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                  len(fields) \u003e\u003d 2):"},{"line_number":135,"context_line":"                if line.startswith(\u0027       \u0027):"},{"line_number":136,"context_line":"                    if properties is not None:"},{"line_number":137,"context_line":"                        properties.update(parse_properties(fields))"},{"line_number":138,"context_line":"                else:"},{"line_number":139,"context_line":"                    properties \u003d dict(parse_properties(fields[2:]))"},{"line_number":140,"context_line":"                    yield Address.create(family\u003dfields[0],"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_e264dab6","line":137,"in_reply_to":"3f79a3b5_b31f8f6f","updated":"2018-12-03 11:47:04.000000000","message":"Let consider your example line by line:\n1) properties dict is being set to None from line started with the device name.\n2) properties dict is set as a new dictionary with values parsed from link/ether line and yield.\n3) properties dict is set as a new dictionary with values parsed from inet 10.1.1.123/24 line and yield\n4) properties dict has more items added after address has been already yield.\n\nThere is indeed a problem of yielding and incomplete address. TODO: This could be solved by returning a list of address instead of iterating them.","commit_id":"14fe27a90a5e74bb8d0d786a91a46b705ee8fa33"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8e1ed9ddfcea12d51f61e27bf1f6e0f73ef815a8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"class IPCommand(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    sudo \u003d \u0027sudo\u0027"},{"line_number":33,"context_line":"    ip_path \u003d \u0027/sbin/ip\u0027"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def __init__(self, ssh_client\u003dNone, timeout\u003dNone):"},{"line_number":36,"context_line":"        self.ssh_client \u003d ssh_client"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_22197223","line":33,"range":{"start_line":33,"start_character":15,"end_line":33,"end_character":23},"updated":"2018-12-03 09:54:13.000000000","message":"ubuntu: /sbin/ip\nfedora: /usr/sbin/ip\n\nThis is not going to work in all distros","commit_id":"0b09dfc9acc52ea28ecbc4be17ae1dd943f45925"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"79191475179ad5ea15b4e609e6d73ae38ff6b429","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def list_addresses(self, device\u003dNone, ip_addresses\u003dNone, port\u003dNone,"},{"line_number":85,"context_line":"                       subnets\u003dNone):"},{"line_number":86,"context_line":"        command \u003d [\u0027list\u0027]"},{"line_number":87,"context_line":"        if device:"},{"line_number":88,"context_line":"            command +\u003d [\u0027dev\u0027, device]"},{"line_number":89,"context_line":"        output \u003d self.execute(\u0027address\u0027, *command)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_afea8273","line":86,"updated":"2018-12-12 09:10:27.000000000","message":"did You try to use \"-oneline\" option to \"ip list\" command? It will print each entry in one line and I think that it would be much easier later to parse this output to get necessary data.\nIt can be done in same way also for other commands, like show routes, etc.","commit_id":"4d3495f6e6a9d97459585b69f35ac5601b355445"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"bd58c71e9c7bd18dbce1361a147bb3bfed2e11c5","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def list_addresses(self, device\u003dNone, ip_addresses\u003dNone, port\u003dNone,"},{"line_number":85,"context_line":"                       subnets\u003dNone):"},{"line_number":86,"context_line":"        command \u003d [\u0027list\u0027]"},{"line_number":87,"context_line":"        if device:"},{"line_number":88,"context_line":"            command +\u003d [\u0027dev\u0027, device]"},{"line_number":89,"context_line":"        output \u003d self.execute(\u0027address\u0027, *command)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_a0bb1edc","line":86,"in_reply_to":"3f79a3b5_afea8273","updated":"2018-12-17 09:04:43.000000000","message":"Let compare two command lines outputs:\n\n # ip address show dev lo\n 1: lo: \u003cLOOPBACK,UP,LOWER_UP\u003e mtu 65536 qdisc noqueue state UNKNOWN qlen 1\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1/8 scope host lo\n       valid_lft forever preferred_lft forever\n    inet6 ::1/128 scope host \n       valid_lft forever preferred_lft forever\n\n\nIt would become:\n\n # ip --oneline address show dev lo\n 1: lo    inet 127.0.0.1/8 scope host lo\\       valid_lft forever preferred_lft forever\n 1: lo    inet6 ::1/128 scope host \\       valid_lft forever preferred_lft forever\n\n\nDespite the second choice looks simpler to parse it would yield less information, like for example MTU value or details about L2 networking layer.","commit_id":"4d3495f6e6a9d97459585b69f35ac5601b355445"}]}
