)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"567607ee7c29b24c182f05094dedc59fb362460d","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"APIImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I94a059cee396e183bffd4a064709bb83504bf983"},{"line_number":16,"context_line":"Closes-Bug: #1490885"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba15a1d1_ae1921d9","line":13,"updated":"2015-09-16 17:07:33.000000000","message":"Very true.  This could break existing workflows if users were lazy enough to code abbreviated subnets in to their workflows.  Personally, I don\u0027t think it is a problem to change this.  It may be painful for them but I think it was a bug to allow them in the first place.\n\nI\u0027m just saying that maybe we should make a release note or something deprecating this behavior and then wait until Mitaka to merge this?  It seems a little late in the game to be doing this change in Liberty.  What do you think?","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"031f1a407e675ee16bd7167acfc72fe15affb9ea","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not accept abbreviated CIDRs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is a special netaddr behavior that we wish to prevent."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_79cfc3b3","line":9,"updated":"2015-10-02 01:59:47.000000000","message":"Can you say here why you wish to prevent this behavior?  I\u0027m all for conforming to https://tools.ietf.org/html/rfc4632#section-3.1 and for saying so here, if that\u0027s (part of) the reason.\n\nDo we also need to look at issues surrounding https://tools.ietf.org/html/rfc4291#section-2.2?","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"631f335cb18831ba1fa2ecbb353f7ecfb7797539","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not accept abbreviated CIDRs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is a special netaddr behavior that we wish to prevent."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_2e5ebfe9","line":9,"in_reply_to":"9a1a9d01_0e7f3b67","updated":"2015-10-02 18:10:26.000000000","message":"...whether the reason for the change proposed...","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"e0376666a933853e89e3c08c55761c65957cd259","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not accept abbreviated CIDRs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is a special netaddr behavior that we wish to prevent."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_e598ea6c","line":9,"in_reply_to":"9a1a9d01_79cfc3b3","updated":"2015-10-02 17:11:35.000000000","message":"The linked e-mail thread contains the motivation for this change.","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"956173550a99034f537f3ebb7caab6e5acd463eb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not accept abbreviated CIDRs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is a special netaddr behavior that we wish to prevent."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_0e7f3b67","line":9,"in_reply_to":"9a1a9d01_e598ea6c","updated":"2015-10-02 18:07:43.000000000","message":"Maybe I\u0027m all wet, but the linked e-mail thread, which in turn contains a couple of other linked pages, seems like a fair amount to wade through in order to know why we\u0027re doing this change.  I\u0027ve looked at the pages (thought I haven\u0027t studied them) and it\u0027s not clear to me whether the change proposed here is that abbreviated CIDRs allow non-IP addresses to come through despite netaddr\u0027s code comments, or that netaddr\u0027s expansion to verbose is going to be deprecated (or something else)?","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"a7c266e1daa3a2b8d4849fdaed916761439f800e","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2015-August/072610.html"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"APIImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I94a059cee396e183bffd4a064709bb83504bf983"},{"line_number":16,"context_line":"Closes-Bug: #1490885"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_9903b70d","line":13,"updated":"2015-10-02 01:20:43.000000000","message":"I\u0027m not familiar with the process, but I assume adding APIImpact to this commit message triggers API documentation to be added to notify users of this change/fix?","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"}],"neutron/api/v2/attributes.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9271ba055a78d00a84f7b2c6f4781f7c4c1bebdf","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr,\" % data)"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_dd1aa47c","line":328,"updated":"2015-09-01 12:40:39.000000000","message":"it should be:\n\n  msg \u003d _(\"...\") % data*\n\notherwise the framework tries to translate \"...\" % data","commit_id":"613b690ff0e83a2d7f66c57fe4a73e373e648565"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"020a51bac7741dcd56bfcdec63dd2dadacace98f","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    msg \u003d None"},{"line_number":321,"context_line":"    try:"},{"line_number":322,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":323,"context_line":"        if \u0027/\u0027 not in data:"},{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_b8e81eb4","line":323,"updated":"2015-09-01 12:49:58.000000000","message":"you could wrap if and elif conditions? It will provide a more helpful error message to the ones (like me) used to do:\n\n  neutron subnet-create net 10/24","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"30a1b67bcc788d7b1aac95a3c891c884dd9a01aa","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    msg \u003d None"},{"line_number":321,"context_line":"    try:"},{"line_number":322,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":323,"context_line":"        if \u0027/\u0027 not in data:"},{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_6454c653","line":323,"in_reply_to":"da20952f_143bc5ec","updated":"2015-09-03 00:26:29.000000000","message":"Cool - let me give it a try","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"07c87317f22ca1544ccdad781a8a91c3da0e25dc","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    msg \u003d None"},{"line_number":321,"context_line":"    try:"},{"line_number":322,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":323,"context_line":"        if \u0027/\u0027 not in data:"},{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_143bc5ec","line":323,"in_reply_to":"da20952f_34b9297a","updated":"2015-09-02 20:46:54.000000000","message":"yes","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7cabef08c78712b91965a00c753ba55609cad5e1","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    msg \u003d None"},{"line_number":321,"context_line":"    try:"},{"line_number":322,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":323,"context_line":"        if \u0027/\u0027 not in data:"},{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_34b9297a","line":323,"in_reply_to":"da20952f_b8e81eb4","updated":"2015-09-02 20:43:21.000000000","message":"Not sure what you mean by wrap. Do you mean combine the if and elif stanzas into one check?","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"f682cba5b95970ddb8482986074bdcb3ce0af7ba","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_cf7b3ebd","line":327,"updated":"2015-09-23 09:08:21.000000000","message":"don\u0027t use str but six.text_type(net) instead","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c0576be18975002a77c26e647b70980beaf84c43","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_b9e86de3","line":327,"in_reply_to":"ba15a1d1_cf7b3ebd","updated":"2015-09-23 23:35:04.000000000","message":"Don\u0027t.  It just makes it more complicated.  The !\u003d and \u003d\u003d operators work as expected regardless if unicode is mixed with non-unicode.  This works in both language versions:\n\n Python 2.7.10 (default, Jul 14 2015, 19:46:27) \n \u003e\u003e\u003e \"a\" \u003d\u003d str(\"a\")\n True\n \u003e\u003e\u003e u\"a\" \u003d\u003d str(\"a\")\n True\n\n Python 3.2.3 (default, Feb 27 2014, 21:31:18) \n \u003e\u003e\u003e \"a\" \u003d\u003d str(\"a\")\n True\n\n(\"a\" is automatically unicode in python3)","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"f682cba5b95970ddb8482986074bdcb3ce0af7ba","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_12cdd984","line":328,"updated":"2015-09-23 09:08:21.000000000","message":"Extend msg and give recommendation which syntax is correct (like done in check above)?","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"09ad6f058602e15261f0537699b1ee8ed422c045","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_ade012ce","line":328,"updated":"2015-09-17 15:59:24.000000000","message":"Testing using str(net) !\u003d data means not only will abbreviated IPs fail this test, but so will IPs with leading 0\u0027s which are also currently allowed.  So something like 192.168.020.0/24 that previously was accepted will now also fail, which I don\u0027t think is a good idea.  Maybe a check for exactly three \u0027.\u0027 in the IP part of the data before the \u0027/\u0027 would work instead?","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3562eafc108a26659c6d892b7f9c5f6766150329","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_ee25f2c1","line":328,"in_reply_to":"ba15a1d1_ade012ce","updated":"2015-09-22 22:02:53.000000000","message":"I think I\u0027d be okay refining the accepted syntax to disallow leading 0s in ipv4.  Have you seen many of these in practice?","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"7ca9f1b3cedda42e8add1b6ee2ee3e6b7c20d6ba","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_2b00b565","line":328,"in_reply_to":"ba15a1d1_ee25f2c1","updated":"2015-09-23 02:02:28.000000000","message":"No, I haven\u0027t seen IPs with leading 0\u0027s in practice (but who knows what people do with any software).  I\u0027d be okay with this, I would guess it is fairly rare.  Just thought I\u0027d bring it up since it is a change from what was previously accepted.  The next case I mentioned (see below), is the one I\u0027m more concerned about.","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"66c34d18bbebb078becb239a4082345f028ef028","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_707bad7b","line":329,"updated":"2015-09-17 16:08:09.000000000","message":"And another more serious case, this current code change would also cause a valid case like 192.168.100.0/255.255.255.0 fail as well, because it looks like str(net) would return 192.168.100.0/24\n\nWe should probably also add test cases like 192.168.100.0/255.255.255.0  and 192.168.100.0/255.255.500.0 so we could catch something like this in the future.","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c0576be18975002a77c26e647b70980beaf84c43","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_1984f908","line":329,"in_reply_to":"ba15a1d1_0e061f1c","updated":"2015-09-23 23:35:04.000000000","message":"Good points.  It is because this patch rejects formats that used to work that I suggested postponing to Mitaka.  That\u0027ll give us more time to prepare and get the word out.  This patch set is already about refusing formats that used to be accepted.  My opinion is we should go all the way and be a little more strict in these cases.","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3562eafc108a26659c6d892b7f9c5f6766150329","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_a9b93430","line":329,"in_reply_to":"ba15a1d1_707bad7b","updated":"2015-09-22 22:02:53.000000000","message":"I\u0027d also be okay adopting a refined definition of cidr notation that conforms to rfc4632 [1].  Do you see the other way much in practice?  I personally can\u0027t imagine why someone would go through the trouble of converting 21 to 255.255.248.0 in order to provide \"192.168.0.0/255.255.248.0\" instead of \"192.168.0.0/21\".\n\n  \"In CIDR notation, a prefix is shown as a 4-octet\n   quantity, just like a traditional IPv4 address or network number,\n   followed by the \"/\" (slash) character, followed by a decimal value\n   between 0 and 32 that describes the number of significant bits.\"\n\n [1] https://tools.ietf.org/html/rfc4632#section-3.1","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"7ca9f1b3cedda42e8add1b6ee2ee3e6b7c20d6ba","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        elif net.version \u003d\u003d 4 and str(net) !\u003d data:"},{"line_number":328,"context_line":"            msg \u003d _(\"\u0027%s\u0027 isn\u0027t a recognized IP subnet cidr\") % data"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_0e061f1c","line":329,"in_reply_to":"ba15a1d1_a9b93430","updated":"2015-09-23 02:02:28.000000000","message":"I do see the 10.0.0.0/255.0.0.0 notation sometimes but not often.  It\u0027s the way I originally learned netmasks/subnets, more recently being introduced to the 10.0.0.0/8 format (which is easier to write but maybe not as obvious to see what part of the IP is \"masked\").  I\u0027m new to Neutron in the last month, so I\u0027m not sure how the project typically handles tradeoffs of not breaking things that used to work (like continuing to allow an alternate notation like this) vs. keeping code and formats clean and current.  I brought it up because the code changes the behavior and disallows something that used to be allowed, and because it seems like it would be easy, just a few lines of code change, to change this code to check for exactly 3 .\u0027s in the IP before the \u0027/\u0027.  I\u0027m fine either way, as long as we document it. While annoying, it should be fairly easy for any users who might have been using the old notation to switch their scripts/tools.","commit_id":"de52c38a0cff0631fe21f288761853d9be086768"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"031f1a407e675ee16bd7167acfc72fe15affb9ea","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    msg \u003d None"},{"line_number":321,"context_line":"    try:"},{"line_number":322,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":323,"context_line":"        if \u0027/\u0027 not in data or (net.version \u003d\u003d 4 and str(net) !\u003d data):"},{"line_number":324,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":325,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_56396e40","line":323,"updated":"2015-10-02 01:59:47.000000000","message":"Could a comment be added to provide context/rationale?   And could some representative examples of unacceptable formats be included as well?\n\nFWIW, in a previous job I have seen IPs with leading 0s (as well as, fairly commonly, masks of the form 255. etc.).","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"031f1a407e675ee16bd7167acfc72fe15affb9ea","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            return"},{"line_number":329,"context_line":"    except Exception:"},{"line_number":330,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"},{"line_number":331,"context_line":"    if msg:"},{"line_number":332,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_99a5f7b6","line":329,"updated":"2015-10-02 01:59:47.000000000","message":"My suggestions here might be beyond the scope of this change, but this except clause should follow 322.  And, related, catching everything seems to me to be incorrect, especially if the except is kept here at 329.  And, wherever this except ends up, could the exception message be logged?","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c8416e9bb98f1eaacbb18feeda2668f1e450d37c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            return"},{"line_number":329,"context_line":"    except Exception:"},{"line_number":330,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"},{"line_number":331,"context_line":"    if msg:"},{"line_number":332,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_39961995","line":329,"in_reply_to":"9a1a9d01_99a5f7b6","updated":"2015-10-02 12:32:27.000000000","message":"+1","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"e0376666a933853e89e3c08c55761c65957cd259","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                                                     \"cidr\": net.cidr}"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            return"},{"line_number":329,"context_line":"    except Exception:"},{"line_number":330,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid IP subnet\") % data"},{"line_number":331,"context_line":"    if msg:"},{"line_number":332,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_85bfaea9","line":329,"in_reply_to":"9a1a9d01_99a5f7b6","updated":"2015-10-02 17:11:35.000000000","message":"I believe your suggestion is out of scope for this change. Feel free to crate a patch.","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"}],"neutron/tests/unit/api/v2/test_attributes.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"94c983d18877f2a0fa67fae5cd6519a525af73bf","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        error \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":270,"context_line":"                  \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": abbrev_subnet,"},{"line_number":271,"context_line":"                                                   \"cidr\": \"1.0.0.0/24\"}"},{"line_number":272,"context_line":"        self.assertEqual(msg, error)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def test_validate_ip_pools(self):"},{"line_number":275,"context_line":"        pools \u003d [[{\u0027end\u0027: \u002710.0.0.254\u0027}],"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_999f37b4","line":272,"updated":"2015-10-02 01:32:53.000000000","message":"Why didn\u0027t this go into _test_validate_subnet() with all the other subnet tests?","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"a809ce4ffd868a5e210e35840356e20cc46f6cc9","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        error \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":270,"context_line":"                  \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": abbrev_subnet,"},{"line_number":271,"context_line":"                                                   \"cidr\": \"1.0.0.0/24\"}"},{"line_number":272,"context_line":"        self.assertEqual(msg, error)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def test_validate_ip_pools(self):"},{"line_number":275,"context_line":"        pools \u003d [[{\u0027end\u0027: \u002710.0.0.254\u0027}],"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a2ca52d_e7ec18f5","line":272,"in_reply_to":"9a1a9d01_19e47539","updated":"2015-10-15 22:33:25.000000000","message":"Done","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"a809ce4ffd868a5e210e35840356e20cc46f6cc9","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        error \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":270,"context_line":"                  \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": abbrev_subnet,"},{"line_number":271,"context_line":"                                                   \"cidr\": \"1.0.0.0/24\"}"},{"line_number":272,"context_line":"        self.assertEqual(msg, error)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def test_validate_ip_pools(self):"},{"line_number":275,"context_line":"        pools \u003d [[{\u0027end\u0027: \u002710.0.0.254\u0027}],"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a2ca52d_e7bf38a8","line":272,"in_reply_to":"9a1a9d01_999f37b4","updated":"2015-10-15 22:33:25.000000000","message":"Done","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c8416e9bb98f1eaacbb18feeda2668f1e450d37c","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        error \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":270,"context_line":"                  \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": abbrev_subnet,"},{"line_number":271,"context_line":"                                                   \"cidr\": \"1.0.0.0/24\"}"},{"line_number":272,"context_line":"        self.assertEqual(msg, error)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def test_validate_ip_pools(self):"},{"line_number":275,"context_line":"        pools \u003d [[{\u0027end\u0027: \u002710.0.0.254\u0027}],"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_19e47539","line":272,"in_reply_to":"9a1a9d01_999f37b4","updated":"2015-10-02 12:32:27.000000000","message":"Should be (expected, actual) for assert args.","commit_id":"7e77ea8baaad1533595ecf0f27c527afbce38c62"}]}
