)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"83c8bf7be3026d076f70607993ac76beb04b2489","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003cblak111@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-27 10:40:52 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix hostname validation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes the hostname validation to align with the RFC\u0027s demands[1]."},{"line_number":10,"context_line":"This was done by replacing the full regex with a function that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_9ea0ae91","line":7,"updated":"2014-12-03 05:15:21.000000000","message":"if this said, \"for nameservers\" at the end it would give a little more context but change looks good to me.","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"553380fbf40c0ca0a25b54340db1a624a7c89943","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003cblak111@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-27 10:40:52 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix hostname validation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes the hostname validation to align with the RFC\u0027s demands[1]."},{"line_number":10,"context_line":"This was done by replacing the full regex with a function that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_a7ff1a65","line":7,"in_reply_to":"5a890539_9ea0ae91","updated":"2014-12-03 08:29:47.000000000","message":"Done","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"}],"neutron/api/v2/attributes.py":[{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"a6ebc875a449c45542b219f093e1769a11a8c605","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"def _validate_hostname(data):"},{"line_number":334,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":335,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":336,"context_line":"    # full regex solution."},{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_90773108","line":334,"updated":"2014-11-27 23:09:22.000000000","message":"Please leave a reference to an RFC or somesuch here, saying where we derived the definition of a valid hostname.  Without an independent source of truth, it\u0027s impossible to justify any \"fix\" to the below code.\n\n(And it would have made my archaeology yesterday much simpler)","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"a6ebc875a449c45542b219f093e1769a11a8c605","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":335,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":336,"context_line":"    # full regex solution."},{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        if len(data) \u003e 255:"},{"line_number":340,"context_line":"            raise TypeError()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_b0150d9d","line":337,"updated":"2014-11-27 23:09:22.000000000","message":"(A bunch of unrelated comments, all on this line ;)\n\n1. look-ahead/behind assertions are generally expensive and exotic.  Here\u0027s a version without either:\n\n [a-zA-Z0-9_](?:[a-zA-Z0-9_-]{,61}*[a-zA-Z0-9_])?$\n\nAn alternative would be to just check the first/last chars aren\u0027t \u0027-\u0027 in regular python.\n\n2. Escaping \u0027-\u0027 is unnecessary and has no effect in [] - it just needs to be the first or last character.\n\n3. Please use r\u0027\u0027 if you end up with a \u0027\\\u0027 anywhere in the regex.\n\n4. Underscores are allowed?","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"248abfc45cf792e94276542980940c9e0c84911c","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":335,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":336,"context_line":"    # full regex solution."},{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        if len(data) \u003e 255:"},{"line_number":340,"context_line":"            raise TypeError()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_13e50b0a","line":337,"in_reply_to":"5a890539_b0150d9d","updated":"2014-11-28 00:46:51.000000000","message":"(commenting on my own comment)\nThere shouldn\u0027t be that \u0027*\u0027 in my regex:\n [a-zA-Z0-9_](?:[a-zA-Z0-9_-]{,61}[a-zA-Z0-9_])?$","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8bd11c6fb0e921a5324b1d9dc0f8af1746bb0f5a","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":335,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":336,"context_line":"    # full regex solution."},{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        if len(data) \u003e 255:"},{"line_number":340,"context_line":"            raise TypeError()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_72c8cd75","line":337,"in_reply_to":"5a890539_b0150d9d","updated":"2014-12-01 21:25:47.000000000","message":"1. I\u0027ll probably just use python. Then we can use that as a branch to provide a better error as well.\n\n2. good to know.\n\n3. forgot about that, thanks.\n\n4. No! Good catch again. Okay in DNS, but not for hostnames. http://domainkeys.sourceforge.net/underscore.html","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"894aa81866d3cca3e94833fe7728c055eb190efe","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        if len(data) \u003e 255:"},{"line_number":340,"context_line":"            raise TypeError()"},{"line_number":341,"context_line":"        # one trailing period is okay"},{"line_number":342,"context_line":"        data \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":343,"context_line":"        names \u003d data.split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_9993b55b","line":340,"updated":"2014-12-01 10:06:58.000000000","message":"why not just return a msg here with an explanation - maybe it is a style thing - but I would prefer not to raise here","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8bd11c6fb0e921a5324b1d9dc0f8af1746bb0f5a","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    hostname_pattern \u003d \"(?!-)[a-zA-Z0-9_\\-]{1,63}(?\u003c!-)$\""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        if len(data) \u003e 255:"},{"line_number":340,"context_line":"            raise TypeError()"},{"line_number":341,"context_line":"        # one trailing period is okay"},{"line_number":342,"context_line":"        data \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":343,"context_line":"        names \u003d data.split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_f2d59d1b","line":340,"in_reply_to":"5a890539_9993b55b","updated":"2014-12-01 21:25:47.000000000","message":"The log debug causes each return to require 3 lines, which looks much worse. Let me see if I can come up with something.","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"894aa81866d3cca3e94833fe7728c055eb190efe","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        # RFC 1123 hints that a TLD can\u0027t be all numeric. last is a TLD if"},{"line_number":347,"context_line":"        # it\u0027s an FQDN."},{"line_number":348,"context_line":"        if len(names) \u003e 1 and re.match(\"^[0-9]+$\", names[-1]):"},{"line_number":349,"context_line":"            raise TypeError()"},{"line_number":350,"context_line":"    except TypeError:"},{"line_number":351,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid input\") % data"},{"line_number":352,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_b98eb130","line":349,"updated":"2014-12-01 10:06:58.000000000","message":"ditto - it also give you the chance of explaining better for the errors","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"a6ebc875a449c45542b219f093e1769a11a8c605","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        if len(names) \u003e 1 and re.match(\"^[0-9]+$\", names[-1]):"},{"line_number":349,"context_line":"            raise TypeError()"},{"line_number":350,"context_line":"    except TypeError:"},{"line_number":351,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid input\") % data"},{"line_number":352,"context_line":"        LOG.debug(msg)"},{"line_number":353,"context_line":"        return msg"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_b02eedf8","line":351,"updated":"2014-11-27 23:09:22.000000000","message":"You might have already modified data by this point, leading to a confusing error message that is going to have some admin waste an entire day before looking at this function and loudly curse your name.  Preserve+report original input value?","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8bd11c6fb0e921a5324b1d9dc0f8af1746bb0f5a","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        if len(names) \u003e 1 and re.match(\"^[0-9]+$\", names[-1]):"},{"line_number":349,"context_line":"            raise TypeError()"},{"line_number":350,"context_line":"    except TypeError:"},{"line_number":351,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid input\") % data"},{"line_number":352,"context_line":"        LOG.debug(msg)"},{"line_number":353,"context_line":"        return msg"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_12ddc942","line":351,"in_reply_to":"5a890539_b02eedf8","updated":"2014-12-01 21:25:47.000000000","message":"Good catch.","commit_id":"65569de1de3b2f49bf0245fe7681c5758a50a0cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        return [data]"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"HOSTNAME_PATTERN \u003d (\"(?\u003d^.{1,254}$)(^(?:(?!\\d+.|-)[a-zA-Z0-9_\\-]{1,62}\""},{"line_number":542,"context_line":"                    \"[a-zA-Z0-9]\\.?)+(?:[a-zA-Z]{2,})$)\")"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"HEX_ELEM \u003d \u0027[0-9A-Fa-f]\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_cbb548d1","side":"PARENT","line":541,"updated":"2014-12-01 23:48:02.000000000","message":"What\u0027s not to like?  ;)","commit_id":"ef86198181649f13da9692b6a2b339e36901aa27"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        msg \u003d _validate_ip_address(ip)"},{"line_number":245,"context_line":"        if msg:"},{"line_number":246,"context_line":"            # This may be a hostname"},{"line_number":247,"context_line":"            msg \u003d _validate_hostname(ip)"},{"line_number":248,"context_line":"            if msg:"},{"line_number":249,"context_line":"                msg \u003d _(\"\u0027%(ip)s\u0027 is not a valid nameserver. %(msg)s\") % {"},{"line_number":250,"context_line":"                    \u0027ip\u0027: ip, \u0027msg\u0027: msg}"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_cb8e2827","line":247,"updated":"2014-12-01 23:48:02.000000000","message":"nitty suggestion:  call it _validate_hostname_or_ip(...) and call the _validate_ip_address from there.\n\nThis is because an IP should always be allowed when a hostname is allowed per rfc1123:\n\n  Whenever a user inputs the identity of an Internet host, it SHOULD\n  be possible to enter either (1) a host domain name or (2) an IP\n  address in dotted-decimal (\"#.#.#.#\") form.  The host SHOULD check\n  the string syntactically for a dotted-decimal number before\n  looking it up in the Domain Name System.\n\nSo, if we ever need to reuse this we don\u0027t need to duplicate this two-step check.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"030fb27936b4c860bdbd10b02083d81edb76dc58","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        msg \u003d _validate_ip_address(ip)"},{"line_number":245,"context_line":"        if msg:"},{"line_number":246,"context_line":"            # This may be a hostname"},{"line_number":247,"context_line":"            msg \u003d _validate_hostname(ip)"},{"line_number":248,"context_line":"            if msg:"},{"line_number":249,"context_line":"                msg \u003d _(\"\u0027%(ip)s\u0027 is not a valid nameserver. %(msg)s\") % {"},{"line_number":250,"context_line":"                    \u0027ip\u0027: ip, \u0027msg\u0027: msg}"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_d72a4be6","line":247,"in_reply_to":"5a890539_cb8e2827","updated":"2014-12-02 02:04:34.000000000","message":"I\u0027ll fix this.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            # This may be a hostname"},{"line_number":247,"context_line":"            msg \u003d _validate_hostname(ip)"},{"line_number":248,"context_line":"            if msg:"},{"line_number":249,"context_line":"                msg \u003d _(\"\u0027%(ip)s\u0027 is not a valid nameserver. %(msg)s\") % {"},{"line_number":250,"context_line":"                    \u0027ip\u0027: ip, \u0027msg\u0027: msg}"},{"line_number":251,"context_line":"                LOG.debug(msg)"},{"line_number":252,"context_line":"                return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_6b20d4f8","line":249,"updated":"2014-12-01 23:48:02.000000000","message":"1.  We log the hostname type error message twice:  Here and on L364.\n\n2.  We lose the ip type error message.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"030fb27936b4c860bdbd10b02083d81edb76dc58","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            # This may be a hostname"},{"line_number":247,"context_line":"            msg \u003d _validate_hostname(ip)"},{"line_number":248,"context_line":"            if msg:"},{"line_number":249,"context_line":"                msg \u003d _(\"\u0027%(ip)s\u0027 is not a valid nameserver. %(msg)s\") % {"},{"line_number":250,"context_line":"                    \u0027ip\u0027: ip, \u0027msg\u0027: msg}"},{"line_number":251,"context_line":"                LOG.debug(msg)"},{"line_number":252,"context_line":"                return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_57dadbe9","line":249,"in_reply_to":"5a890539_6b20d4f8","updated":"2014-12-02 02:04:34.000000000","message":"Done","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":336,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":337,"context_line":"    # full regex solution. The logic should validate that the hostname"},{"line_number":338,"context_line":"    # matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":339,"context_line":"    hostname_pattern \u003d \"[a-zA-Z0-9-]{1,63}$\""},{"line_number":340,"context_line":"    try:"},{"line_number":341,"context_line":"        # trailing periods do not do anything"},{"line_number":342,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_8b1fc0b6","line":339,"updated":"2014-12-01 23:48:02.000000000","message":"Why is it now capped at 63 (rfc1123)?\n\nUpdate:  I guess the old one did cap each name at 63.  I\u0027m fine with this.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"030fb27936b4c860bdbd10b02083d81edb76dc58","unresolved":false,"context_lines":[{"line_number":336,"context_line":"    # because its easier to make correct. Feel free to replace with a"},{"line_number":337,"context_line":"    # full regex solution. The logic should validate that the hostname"},{"line_number":338,"context_line":"    # matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":339,"context_line":"    hostname_pattern \u003d \"[a-zA-Z0-9-]{1,63}$\""},{"line_number":340,"context_line":"    try:"},{"line_number":341,"context_line":"        # trailing periods do not do anything"},{"line_number":342,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_97da8315","line":339,"in_reply_to":"5a890539_8b1fc0b6","updated":"2014-12-02 02:04:34.000000000","message":"Yeah, 63 is what the standard defines for each label max.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    # matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":339,"context_line":"    hostname_pattern \u003d \"[a-zA-Z0-9-]{1,63}$\""},{"line_number":340,"context_line":"    try:"},{"line_number":341,"context_line":"        # trailing periods do not do anything"},{"line_number":342,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":343,"context_line":"        if len(trimmed) \u003e 255:"},{"line_number":344,"context_line":"            raise TypeError("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_e69a3bc4","line":341,"updated":"2014-12-01 23:48:02.000000000","message":"According to the RFC, they\u0027re not allowed.  But ok.  I\u0027m fine with this.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"030fb27936b4c860bdbd10b02083d81edb76dc58","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    # matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":339,"context_line":"    hostname_pattern \u003d \"[a-zA-Z0-9-]{1,63}$\""},{"line_number":340,"context_line":"    try:"},{"line_number":341,"context_line":"        # trailing periods do not do anything"},{"line_number":342,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":343,"context_line":"        if len(trimmed) \u003e 255:"},{"line_number":344,"context_line":"            raise TypeError("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_17b053dc","line":341,"in_reply_to":"5a890539_e69a3bc4","updated":"2014-12-02 02:04:34.000000000","message":"http://www.ietf.org/rfc/rfc1034.txt page 7. The dot isn\u0027t part of the name, it\u0027s to indicate that it is fully qualified. I\u0027ll make a note in here.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d576e8efff05d1abc0a70359c5af69a254ebe204","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"},{"line_number":351,"context_line":"                raise TypeError("},{"line_number":352,"context_line":"                    _(\"Name \u0027%s\u0027 must not start or end with a hyphen.\") % name)"},{"line_number":353,"context_line":"            if not name or not re.match(hostname_pattern, name):"},{"line_number":354,"context_line":"                raise TypeError("},{"line_number":355,"context_line":"                    _(\"Name \u0027%s\u0027 must be 1-63 characters long, each of \""},{"line_number":356,"context_line":"                      \"which can only be alphanumeric or a hyphen.\") % name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_c68a9f63","line":353,"updated":"2014-12-01 23:48:02.000000000","message":"nit:  \"not name\" check here is redundant.  We know it is False at this point.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"030fb27936b4c860bdbd10b02083d81edb76dc58","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"},{"line_number":351,"context_line":"                raise TypeError("},{"line_number":352,"context_line":"                    _(\"Name \u0027%s\u0027 must not start or end with a hyphen.\") % name)"},{"line_number":353,"context_line":"            if not name or not re.match(hostname_pattern, name):"},{"line_number":354,"context_line":"                raise TypeError("},{"line_number":355,"context_line":"                    _(\"Name \u0027%s\u0027 must be 1-63 characters long, each of \""},{"line_number":356,"context_line":"                      \"which can only be alphanumeric or a hyphen.\") % name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_57cd7b85","line":353,"in_reply_to":"5a890539_c68a9f63","updated":"2014-12-02 02:04:34.000000000","message":"Oh, whoops. This was before I put the empty check at L348. Will remove.","commit_id":"8f3adcf14bf5afc206dcd846156d0060e1af133e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8074dd54fbbcb804ad6218e1392fe95db36a9dc9","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                return msg"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"def _validate_hostname_or_ip(ip):"},{"line_number":237,"context_line":"    ip_err \u003d _validate_ip_address(ip)"},{"line_number":238,"context_line":"    if not ip_err:"},{"line_number":239,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_7e3f8225","line":236,"updated":"2014-12-03 05:28:47.000000000","message":"if the input param can be both an ip or a hostname, I think \u0027ip\u0027 is a poor choice, don\u0027t you think? Perhaps \u0027host\u0027 is more appropriate?","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"553380fbf40c0ca0a25b54340db1a624a7c89943","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                return msg"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"def _validate_hostname_or_ip(ip):"},{"line_number":237,"context_line":"    ip_err \u003d _validate_ip_address(ip)"},{"line_number":238,"context_line":"    if not ip_err:"},{"line_number":239,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_27a6caab","line":236,"in_reply_to":"5a890539_7e3f8225","updated":"2014-12-03 08:29:47.000000000","message":"agree","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8074dd54fbbcb804ad6218e1392fe95db36a9dc9","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        return msg"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    ips \u003d []"},{"line_number":256,"context_line":"    for ip in data:"},{"line_number":257,"context_line":"        # This may be an IP or a hostname"},{"line_number":258,"context_line":"        msg \u003d _validate_hostname_or_ip(ip)"},{"line_number":259,"context_line":"        if msg:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_3e097a84","line":256,"updated":"2014-12-03 05:28:47.000000000","message":"for host in data:\n    _validate_hostname_or_ip(host)\n\nperhaps is better?","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"553380fbf40c0ca0a25b54340db1a624a7c89943","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        return msg"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    ips \u003d []"},{"line_number":256,"context_line":"    for ip in data:"},{"line_number":257,"context_line":"        # This may be an IP or a hostname"},{"line_number":258,"context_line":"        msg \u003d _validate_hostname_or_ip(ip)"},{"line_number":259,"context_line":"        if msg:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_07a9ce7b","line":256,"in_reply_to":"5a890539_3e097a84","updated":"2014-12-03 08:29:47.000000000","message":"maybe, makes the footprint of the patch a little bigger but it makes more sense.","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"fd691ad40b637ee983d51e7d7f3b3c8d6ee9bcfd","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    except TypeError as e:"},{"line_number":373,"context_line":"        msg \u003d _(\"\u0027%(data)s\u0027 is not a valid hostname. Reason: %(reason)s\") % {"},{"line_number":374,"context_line":"            \u0027data\u0027: data, \u0027reason\u0027: e.message}"},{"line_number":375,"context_line":"        LOG.debug(msg)"},{"line_number":376,"context_line":"        return msg"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_b156615c","line":375,"updated":"2014-12-03 17:17:54.000000000","message":"This is just a side comment.  I understand why this message is translated.  I\u0027m not arguing that it shouldn\u0027t be.\n\nWhat I\u0027m wondering is if the new hacking check is smart enough to tell that this is a valid scenario for translation or if the new check just misses all cases where an intermediate is used to store the string and passing it to LOG.debug(...).","commit_id":"35662d07628452d14306f5197871ad64f6396ff3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"106fb01ecff71651be18dd69fc51ef4378e9309d","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    except TypeError as e:"},{"line_number":373,"context_line":"        msg \u003d _(\"\u0027%(data)s\u0027 is not a valid hostname. Reason: %(reason)s\") % {"},{"line_number":374,"context_line":"            \u0027data\u0027: data, \u0027reason\u0027: e.message}"},{"line_number":375,"context_line":"        LOG.debug(msg)"},{"line_number":376,"context_line":"        return msg"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_57b51feb","line":375,"in_reply_to":"5a890539_b156615c","updated":"2014-12-03 22:18:42.000000000","message":"The check is very simple. It just looks at the code for:\n\nif logical_line.startswith(\"LOG.debug(_(\")","commit_id":"35662d07628452d14306f5197871ad64f6396ff3"}],"neutron/tests/unit/test_attributes.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"8fdc1bc310cf55b9cd08913858f3902f4d9f833f","unresolved":false,"context_lines":[{"line_number":321,"context_line":"                    [\u0027www.great.marathons.to.travel\u0027],"},{"line_number":322,"context_line":"                    [\u0027valid\u0027],"},{"line_number":323,"context_line":"                    [\u002777.hostname.com\u0027],"},{"line_number":324,"context_line":"                    [\u00271\u0027 * 59],"},{"line_number":325,"context_line":"                    [\u0027www.internal.hostname.com\u0027]]"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        for ns in ns_pools:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_9ead0e34","line":324,"updated":"2014-12-03 05:46:56.000000000","message":"can you please add a test to confirm that this one is accepted as a hostname, not ip address?\notherwise this change would hide bug #1394867.","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"553380fbf40c0ca0a25b54340db1a624a7c89943","unresolved":false,"context_lines":[{"line_number":321,"context_line":"                    [\u0027www.great.marathons.to.travel\u0027],"},{"line_number":322,"context_line":"                    [\u0027valid\u0027],"},{"line_number":323,"context_line":"                    [\u002777.hostname.com\u0027],"},{"line_number":324,"context_line":"                    [\u00271\u0027 * 59],"},{"line_number":325,"context_line":"                    [\u0027www.internal.hostname.com\u0027]]"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        for ns in ns_pools:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_27c16a4e","line":324,"in_reply_to":"5a890539_9ead0e34","updated":"2014-12-03 08:29:47.000000000","message":"I think that\u0027s outside the scope of this bugfix. I would prefer you performed that check in the patch you proposed to that bug.","commit_id":"66d17348c9a6e8bb1fbbc1ffa50e6169cdb7b66f"}]}
