)]}'
{"quantum/db/l3_db.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"cf82be213aeb84f44b149ca3cd0151009d8ad04d","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5BE%3D","line":930,"updated":"2013-03-07 13:48:26.000000000","message":"Could you do...\n\nports \u003d [port for port in ports if len(port.get(\u0027fixed_ips\u0027, [])) \u003d\u003d 1]","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ca3107a1653e86c6e2fa294a65d64cf7a356bf64","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5Iw%3D","line":930,"updated":"2013-03-07 11:50:59.000000000","message":"Would it not be better to have a check on line 934:\nif (fixed_ips is [] or len(fixed_ips) \u003e 1):\n    continue\n\nThis will save a loop.","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3%2Bg%3D","line":930,"in_reply_to":"AAAAN3%2F%2F4sM%3D","updated":"2013-03-07 23:27:33.000000000","message":"oops.. I left out a key piece.  Good catch.","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4Uk%3D","line":930,"in_reply_to":"AAAAN3%2F%2F4sM%3D","updated":"2013-03-07 20:08:49.000000000","message":"thanks for the advice folks.\nI will push a new patch as soon as I have access to a decently sized keyboard.","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4sM%3D","line":930,"in_reply_to":"AAAAN3%2F%2F4yY%3D","updated":"2013-03-07 16:53:36.000000000","message":"do you mean:\n\nelif not fixed_ips: \n     continue \n\n? \n\nIsn\u0027t the goal to skip a port if it fixed ips is empty?","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4yY%3D","line":930,"in_reply_to":"AAAAN3%2F%2F5BE%3D","updated":"2013-03-07 16:23:10.000000000","message":"Consider adding this after line 937 instead:\n\nelif fixed_ips:\n    continue","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        # Filter out port without IPs, which can occur if a subnet"},{"line_number":929,"context_line":"        # attached to a router is deleted"},{"line_number":930,"context_line":"        ports \u003d [port for port in ports if port.get(\u0027fixed_ips\u0027)]"},{"line_number":931,"context_line":"        subnet_id_ports_dict \u003d {}"},{"line_number":932,"context_line":"        for port in ports:"},{"line_number":933,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5Fw%3D","line":930,"in_reply_to":"AAAAN3%2F%2F5Iw%3D","updated":"2013-03-07 12:50:24.000000000","message":"I hate ifs :)\nThis is anyway a loop over a list which will rarely have more than one element, so performance wise, I think it might be even better than an ifs with two conditions","commit_id":"10a06ae7910b49d61c92847abd63da097851df67"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"cf82be213aeb84f44b149ca3cd0151009d8ad04d","unresolved":false,"context_lines":[{"line_number":929,"context_line":"        for port in ports:"},{"line_number":930,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"            if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                LOG.error(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                          port[\u0027id\u0027])"},{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F3Hs%3D","line":932,"updated":"2013-03-08 14:26:38.000000000","message":"Is this an \"error\" level condition?","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"unresolved":false,"context_lines":[{"line_number":929,"context_line":"        for port in ports:"},{"line_number":930,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"            if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                LOG.error(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                          port[\u0027id\u0027])"},{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F2zQ%3D","line":932,"in_reply_to":"AAAAN3%2F%2F26c%3D","updated":"2013-03-08 18:32:53.000000000","message":"Probably a warning might have been more appropriate in the former case.","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":929,"context_line":"        for port in ports:"},{"line_number":930,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"            if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                LOG.error(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                          port[\u0027id\u0027])"},{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F2bY%3D","line":932,"in_reply_to":"AAAAN3%2F%2F2uI%3D","updated":"2013-03-08 21:09:40.000000000","message":"Since i have also another comment to address from Sumit, I can easily fix this thing too.","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":929,"context_line":"        for port in ports:"},{"line_number":930,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"            if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                LOG.error(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                          port[\u0027id\u0027])"},{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F2uI%3D","line":932,"in_reply_to":"AAAAN3%2F%2F2zQ%3D","updated":"2013-03-08 19:04:16.000000000","message":"I agree that warning is probably more appropriate, but don\u0027t see it as critical.  I\u0027ll ping Salv to see if he plans to change this, otherwise, I will approve.","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":929,"context_line":"        for port in ports:"},{"line_number":930,"context_line":"            fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"            if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                LOG.error(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                          port[\u0027id\u0027])"},{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F26c%3D","line":932,"in_reply_to":"AAAAN3%2F%2F3Hs%3D","updated":"2013-03-08 17:32:01.000000000","message":"Let\u0027s say that I do not see the point of having multiple IPs on a router port.\nSo I\u0027d say it makes no sense, but it\u0027s probably not an error.\n\nIn any case, this log statement is not related to this patch. Any fix for it should happen in another patch.","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"unresolved":false,"context_lines":[{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"},{"line_number":936,"context_line":"                # Skip ports without IPs, which can occur if a subnet"},{"line_number":937,"context_line":"                # attached to a router is deleted"},{"line_number":938,"context_line":"                continue"},{"line_number":939,"context_line":"            fixed_ip \u003d fixed_ips[0]"},{"line_number":940,"context_line":"            my_ports \u003d subnet_id_ports_dict.get(fixed_ip[\u0027subnet_id\u0027], [])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F2zI%3D","line":937,"updated":"2013-03-08 18:32:53.000000000","message":"Is a debug log statement warranted here?","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":934,"context_line":"                continue"},{"line_number":935,"context_line":"            elif not fixed_ips:"},{"line_number":936,"context_line":"                # Skip ports without IPs, which can occur if a subnet"},{"line_number":937,"context_line":"                # attached to a router is deleted"},{"line_number":938,"context_line":"                continue"},{"line_number":939,"context_line":"            fixed_ip \u003d fixed_ips[0]"},{"line_number":940,"context_line":"            my_ports \u003d subnet_id_ports_dict.get(fixed_ip[\u0027subnet_id\u0027], [])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F2bU%3D","line":937,"in_reply_to":"AAAAN3%2F%2F2zI%3D","updated":"2013-03-08 21:09:40.000000000","message":"Done","commit_id":"4b7ba220942c3d179204b59a976de1fc76971a4b"}]}
