)]}'
{"nova/api/ec2/cloud.py":[{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"cd0cddc09032cc706013472b72f807a547e10c13","unresolved":false,"context_lines":[{"line_number":745,"context_line":"            try:"},{"line_number":746,"context_line":"                # Validate the correct CIDR Address"},{"line_number":747,"context_line":"                netaddr.IPNetwork(cidr_ip)"},{"line_number":748,"context_line":"            except Exception:"},{"line_number":749,"context_line":"                # Raise exception for non-valid address"},{"line_number":750,"context_line":"                raise exception.InvalidCidr(cidr\u003dcidr_ip)"},{"line_number":751,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9WY%3D","line":748,"updated":"2011-10-07 20:28:35.000000000","message":"Is there a more specific error that can be excepted?","commit_id":"fd6f569dd95ab0482db8b88780586dfcf0a6fc0b"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"cd0cddc09032cc706013472b72f807a547e10c13","unresolved":false,"context_lines":[{"line_number":756,"context_line":"            if len(ip_segment) \u003c\u003d 1:"},{"line_number":757,"context_line":"                raise exception.InvalidCidr(cidr\u003dcidr_ip)"},{"line_number":758,"context_line":"            elif ip_segment[1] \u003d\u003d \u0027\u0027:"},{"line_number":759,"context_line":"                raise exception.InvalidCidr(cidr\u003dcidr_ip)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"            values[\u0027cidr\u0027] \u003d cidr_ip"},{"line_number":762,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9WU%3D","line":759,"updated":"2011-10-07 20:28:35.000000000","message":"All of this code is duplicated in nova/api/openstack/contrib/security_groups.py, can this be cleaned up so the logic for checking a CIDR is in one place?","commit_id":"fd6f569dd95ab0482db8b88780586dfcf0a6fc0b"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"cd0cddc09032cc706013472b72f807a547e10c13","unresolved":false,"context_lines":[{"line_number":772,"context_line":"            except ValueError:"},{"line_number":773,"context_line":"                if ip_protocol.upper() \u003d\u003d \u0027ICMP\u0027:"},{"line_number":774,"context_line":"                    raise exception.InvalidInput(reason\u003d\"Type and\""},{"line_number":775,"context_line":"                         \" Code must be integers for ICMP protocol type\")"},{"line_number":776,"context_line":"                else:"},{"line_number":777,"context_line":"                    raise exception.InvalidInput(reason\u003d\"To and From ports \""},{"line_number":778,"context_line":"                          \"must be integers\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9WQ%3D","line":775,"updated":"2011-10-07 20:28:35.000000000","message":"I think this really brings an existing design flaw to light... IP / ICMP protocols are both layer 3 and don\u0027t share the \"ports\" concept. We\u0027re overloading the terms here to mean \"ports\" for IP and \"message type\" for ICMP. It\u0027s the same way in the database model. This really needs to be re-thought..but I suppose that shouldn\u0027t hold up this proposal.","commit_id":"fd6f569dd95ab0482db8b88780586dfcf0a6fc0b"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"cd0cddc09032cc706013472b72f807a547e10c13","unresolved":false,"context_lines":[{"line_number":793,"context_line":"                (max(from_port, to_port) \u003e 65535))):"},{"line_number":794,"context_line":"                raise exception.InvalidPortRange(from_port\u003dfrom_port,"},{"line_number":795,"context_line":"                      to_port\u003dto_port, msg\u003d\"Valid TCP ports should\""},{"line_number":796,"context_line":"                                           \" be between 1-65535\")"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"            # Verify ICMP type and code"},{"line_number":799,"context_line":"            if ((ip_protocol.upper() \u003d\u003d \"ICMP\") and"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9WM%3D","line":796,"updated":"2011-10-07 20:28:35.000000000","message":"I think this \u0027if\u0027 statement is a little too complex for the case you\u0027re trying to cover. The statement above it ensures that min() and max() will always return from_port/to_port, respectively. Could it just be:\n\n# Verify valid TCP, UDP port ranges\nif ip_protocol.upper() in [\u0027TCP\u0027, \u0027UDP\u0027]\n    and (from_port \u003c 1 or to_port \u003e 65535):\n\n?","commit_id":"fd6f569dd95ab0482db8b88780586dfcf0a6fc0b"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"cd0cddc09032cc706013472b72f807a547e10c13","unresolved":false,"context_lines":[{"line_number":801,"context_line":"                (max(from_port, to_port) \u003e 255))):"},{"line_number":802,"context_line":"                raise exception.InvalidPortRange(from_port\u003dfrom_port,"},{"line_number":803,"context_line":"                      to_port\u003dto_port, msg\u003d\"For ICMP, the\""},{"line_number":804,"context_line":"                                           \" type:code must be valid\")"},{"line_number":805,"context_line":""},{"line_number":806,"context_line":"            values[\u0027protocol\u0027] \u003d ip_protocol"},{"line_number":807,"context_line":"            values[\u0027from_port\u0027] \u003d from_port"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9WI%3D","line":804,"updated":"2011-10-07 20:28:35.000000000","message":"Same question as above for the TCP/UDP \u0027if\u0027 statement.","commit_id":"fd6f569dd95ab0482db8b88780586dfcf0a6fc0b"}],"nova/tests/api/openstack/contrib/test_security_groups.py":[{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"103de9240d58362775d52d2610564d5cbabcd251","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                cidr\u003d\"10.2.3.124/2433\")"},{"line_number":549,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v1.1/123/os-security-group-rules\u0027)"},{"line_number":550,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":551,"context_line":"                          req, {\u0027security_group_rule\u0027: rule})        "},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def test_create_by_invalid_tcp_port_json(self):"},{"line_number":554,"context_line":"        rule \u003d security_group_rule_template("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAACn%2F%2F%2FKs%3D","line":551,"updated":"2011-11-10 20:19:29.000000000","message":"You have a bit of trailing whitespace here.","commit_id":"875b11e6a3b0df7bb8e9d0fe33d9cc54a01a1b51"}]}
