)]}'
{"quantum/db/db_base_plugin_v2.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"9d53c197fc44a9034b80ff0d5bfef531abf4e1a0","unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    def _validate_ip_version(self, ip_version, name, addr, is_network\u003dFalse):"},{"line_number":876,"context_line":"        \"\"\"Check IP field of a subnet match specified ip version\"\"\""},{"line_number":877,"context_line":"        pass"},{"line_number":878,"context_line":"        if is_network:"},{"line_number":879,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":880,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FeuE%3D","line":877,"updated":"2012-09-07 12:36:48.000000000","message":"why do we have a pass statement here?","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    def _validate_ip_version(self, ip_version, name, addr, is_network\u003dFalse):"},{"line_number":876,"context_line":"        \"\"\"Check IP field of a subnet match specified ip version\"\"\""},{"line_number":877,"context_line":"        pass"},{"line_number":878,"context_line":"        if is_network:"},{"line_number":879,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":880,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fes4%3D","line":877,"in_reply_to":"AAAALH%2F%2FeuE%3D","updated":"2012-09-07 14:10:35.000000000","message":"Done. I forgot to remove it.","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":879,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":880,"context_line":"        else:"},{"line_number":881,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":882,"context_line":"        if ip.version is not ip_version:"},{"line_number":883,"context_line":"            msg \u003d (\"%s \u0027%s\u0027 does not match the ip_version \u0027%s\u0027\""},{"line_number":884,"context_line":"                   % (name, addr, ip_version))"},{"line_number":885,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FepA%3D","line":882,"updated":"2012-09-07 14:14:17.000000000","message":"ip.version !\u003d ip_version is probably slight more readable","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"9d53c197fc44a9034b80ff0d5bfef531abf4e1a0","unresolved":false,"context_lines":[{"line_number":881,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":882,"context_line":"        if ip.version is not ip_version:"},{"line_number":883,"context_line":"            msg \u003d (\"%s \u0027%s\u0027 does not match the ip_version \u0027%s\u0027\""},{"line_number":884,"context_line":"                   % (name, addr, ip_version))"},{"line_number":885,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"    def _validate_subnet(self, s, prev\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FeuA%3D","line":884,"updated":"2012-09-07 12:36:48.000000000","message":"when we have multiple string need to be replaced, we prefer to use dic structure:\nfor example (\"%(name)s ...","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":881,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":882,"context_line":"        if ip.version is not ip_version:"},{"line_number":883,"context_line":"            msg \u003d (\"%s \u0027%s\u0027 does not match the ip_version \u0027%s\u0027\""},{"line_number":884,"context_line":"                   % (name, addr, ip_version))"},{"line_number":885,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"    def _validate_subnet(self, s, prev\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FesA%3D","line":884,"in_reply_to":"AAAALH%2F%2FeuA%3D","updated":"2012-09-07 14:10:35.000000000","message":"Done.","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"9d53c197fc44a9034b80ff0d5bfef531abf4e1a0","unresolved":false,"context_lines":[{"line_number":889,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":890,"context_line":"        # In case of update_subnet it is retreived from the previous info."},{"line_number":891,"context_line":"        ip_version \u003d (s[\u0027ip_version\u0027] if \u0027ip_version\u0027 in s"},{"line_number":892,"context_line":"                      else prev[\u0027ip_version\u0027])"},{"line_number":893,"context_line":"        if \u0027cidr\u0027 in s:"},{"line_number":894,"context_line":"            self._validate_ip_version(ip_version, \u0027cidr\u0027, s[\u0027cidr\u0027],"},{"line_number":895,"context_line":"                                      is_network\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fetk%3D","line":892,"updated":"2012-09-07 12:36:48.000000000","message":"what if the ip_version is not in s and prev is None?","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":889,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":890,"context_line":"        # In case of update_subnet it is retreived from the previous info."},{"line_number":891,"context_line":"        ip_version \u003d (s[\u0027ip_version\u0027] if \u0027ip_version\u0027 in s"},{"line_number":892,"context_line":"                      else prev[\u0027ip_version\u0027])"},{"line_number":893,"context_line":"        if \u0027cidr\u0027 in s:"},{"line_number":894,"context_line":"            self._validate_ip_version(ip_version, \u0027cidr\u0027, s[\u0027cidr\u0027],"},{"line_number":895,"context_line":"                                      is_network\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fenc%3D","line":892,"in_reply_to":"AAAALH%2F%2FesU%3D","updated":"2012-09-07 14:25:36.000000000","message":"Good point.\nI\u0027d say that at this stage the ip_version of a subnet cannot be updated, and the default API behavior ensures the database stores ip_version.\n\nSo the parameter \u0027s\u0027 will have ip_version always on create, and never on updates, and prev will always be None on create and will have an ip version on updated.\n\nSo perhaps in update method you can just update the s dict with the ip_version fetched from the database and pass it to this _validate_subne method.\n\nThis should allow you to get rid of the prev parameter altogether.\n\nAlternatively, if you don\u0027t want to rely on the default behaviour, then I\u0027d suggest raising a 400 if ip_version is missing on a create. (but again you\u0027ll have to do that for other fields for which we\u0027ve been relying on the default API behaviour).\n\n500 errors are already automatically raised for unexpected error conditions.","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":889,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":890,"context_line":"        # In case of update_subnet it is retreived from the previous info."},{"line_number":891,"context_line":"        ip_version \u003d (s[\u0027ip_version\u0027] if \u0027ip_version\u0027 in s"},{"line_number":892,"context_line":"                      else prev[\u0027ip_version\u0027])"},{"line_number":893,"context_line":"        if \u0027cidr\u0027 in s:"},{"line_number":894,"context_line":"            self._validate_ip_version(ip_version, \u0027cidr\u0027, s[\u0027cidr\u0027],"},{"line_number":895,"context_line":"                                      is_network\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FesU%3D","line":892,"in_reply_to":"AAAALH%2F%2Fetk%3D","updated":"2012-09-07 14:10:35.000000000","message":"Actually either s[\u0027ip_version\u0027] or prev[\u0027ip_version\u0027] always has a valid value. _validate_subnet() is called from create_subnet() and update_subnet(). When called from create_subnet() prev is None, but it is guaranteed s[\u0027ip_version\u0027] has a valid value by attribute map. When called from update_subnet() prev is set to the previous subnet spec. In this case prev always contains a valid ip_version. If not, it is another bug of the subnet handling log.\n\nI think there are two ways.\nThe one is to raise an exception q_exc.Invalid(message\u003d\u0027xxx\u0027) since it is some kind of an internal error of quatum-server. In this case REST response returns 500 as a result.\nThe other is to just skip the validation.\n\nWhat do you think?","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":889,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":890,"context_line":"        # In case of update_subnet it is retreived from the previous info."},{"line_number":891,"context_line":"        ip_version \u003d (s[\u0027ip_version\u0027] if \u0027ip_version\u0027 in s"},{"line_number":892,"context_line":"                      else prev[\u0027ip_version\u0027])"},{"line_number":893,"context_line":"        if \u0027cidr\u0027 in s:"},{"line_number":894,"context_line":"            self._validate_ip_version(ip_version, \u0027cidr\u0027, s[\u0027cidr\u0027],"},{"line_number":895,"context_line":"                                      is_network\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FepI%3D","line":892,"in_reply_to":"AAAALH%2F%2Fetk%3D","updated":"2012-09-07 14:14:17.000000000","message":"Maybe you could just use the get operation, although it is unlikely ip_version not being in s (the value should be filled to the default - 4 - in the prepare_request_body method before being passed to the plugin)","commit_id":"e9ccdeaff0282de81196dbcd3b1332a3bb9fb2cb"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    def _validate_ip_version(self, ip_version, name, addr, is_network\u003dFalse):"},{"line_number":876,"context_line":"        \"\"\"Check IP field of a subnet match specified ip version\"\"\""},{"line_number":877,"context_line":"        if is_network:"},{"line_number":878,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FelI%3D","line":877,"updated":"2012-09-07 14:59:59.000000000","message":"The is_network parameter is unnecessary.  You should just use:\n\nip \u003d netaddr.IPNetwork(addr)\n\nWhether the addr has a prefix or not, IPNetwork will always give you the correct version.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    def _validate_ip_version(self, ip_version, name, addr, is_network\u003dFalse):"},{"line_number":876,"context_line":"        \"\"\"Check IP field of a subnet match specified ip version\"\"\""},{"line_number":877,"context_line":"        if is_network:"},{"line_number":878,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Fduc%3D","line":877,"in_reply_to":"AAAALH%2F%2FelI%3D","updated":"2012-09-08 21:43:44.000000000","message":"Done. I removed is_network parameter in the next patch.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"9d53c197fc44a9034b80ff0d5bfef531abf4e1a0","unresolved":false,"context_lines":[{"line_number":878,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":881,"context_line":"        if ip.version is not ip_version:"},{"line_number":882,"context_line":"            msg \u003d (\"%(name)s \u0027%(addr)s\u0027 does not match \""},{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Fen8%3D","line":881,"updated":"2012-09-07 14:23:43.000000000","message":"I think We should use ip.version !\u003d ip_version. sometimes, \u0027is not\u0027 is not !\u003d","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":878,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":881,"context_line":"        if ip.version is not ip_version:"},{"line_number":882,"context_line":"            msg \u003d (\"%(name)s \u0027%(addr)s\u0027 does not match \""},{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FenM%3D","line":881,"in_reply_to":"AAAALH%2F%2Fen8%3D","updated":"2012-09-07 14:28:44.000000000","message":"I had the same comment on patch set 1","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":878,"context_line":"            ip \u003d netaddr.IPNetwork(addr)"},{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":881,"context_line":"        if ip.version is not ip_version:"},{"line_number":882,"context_line":"            msg \u003d (\"%(name)s \u0027%(addr)s\u0027 does not match \""},{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Femo%3D","line":881,"in_reply_to":"AAAALH%2F%2FenM%3D","updated":"2012-09-08 21:43:44.000000000","message":"Done.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":881,"context_line":"        if ip.version is not ip_version:"},{"line_number":882,"context_line":"            msg \u003d (\"%(name)s \u0027%(addr)s\u0027 does not match \""},{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Feks%3D","line":882,"updated":"2012-09-07 14:59:59.000000000","message":"Why is this string not marked for translation.  Shouldn\u0027t it be wrapped in _()?","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":879,"context_line":"        else:"},{"line_number":880,"context_line":"            ip \u003d netaddr.IPAddress(addr)"},{"line_number":881,"context_line":"        if ip.version is not ip_version:"},{"line_number":882,"context_line":"            msg \u003d (\"%(name)s \u0027%(addr)s\u0027 does not match \""},{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FduY%3D","line":882,"in_reply_to":"AAAALH%2F%2Feks%3D","updated":"2012-09-08 21:43:44.000000000","message":"Done.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def _validate_subnet(self, s, prev\u003dNone):"},{"line_number":887,"context_line":"        \"\"\"a subroutine to validate a subnet spec\"\"\""},{"line_number":888,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":889,"context_line":"        # In case of update_subnet it is retreived from the previous info."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FenI%3D","line":886,"updated":"2012-09-07 14:28:44.000000000","message":"Please see comment on patch set 1 concerning possibility of getting rid of the prev parameter. Let me know your opinion.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":883,"context_line":"                   \"the ip_version \u0027%(ip_version)s\u0027\" % locals())"},{"line_number":884,"context_line":"            raise q_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def _validate_subnet(self, s, prev\u003dNone):"},{"line_number":887,"context_line":"        \"\"\"a subroutine to validate a subnet spec\"\"\""},{"line_number":888,"context_line":"        # Retrieve ip_version from specified subnet spec (when create_subnet)."},{"line_number":889,"context_line":"        # In case of update_subnet it is retreived from the previous info."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Fds8%3D","line":886,"in_reply_to":"AAAALH%2F%2FenI%3D","updated":"2012-09-08 21:43:44.000000000","message":"I checked your comment on patch set 1.\nI prefer your approach that ip_version in \u0027s\u0027 dict is filled with the value retrieved from the database in update_subnet method since API engine ensures the ip_version is stores in the database.\n\nI think the case we call _validate_subnet() without filling ip_version in \u0027s\u0027 dict can be regarded as a programming error and it can be detected by the unit test. This kind of error should be invisible to the outside..","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":892,"context_line":"        elif prev:"},{"line_number":893,"context_line":"            ip_version \u003d prev.ip_version"},{"line_number":894,"context_line":"        else:"},{"line_number":895,"context_line":"            msg \u003d \"_validate_subnet() could not find a valid ip_version.\""},{"line_number":896,"context_line":"            raise q_exc.Invalid(message\u003dmsg)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        if \u0027cidr\u0027 in s:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FekI%3D","line":895,"updated":"2012-09-07 14:59:59.000000000","message":"Same as above?","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":892,"context_line":"        elif prev:"},{"line_number":893,"context_line":"            ip_version \u003d prev.ip_version"},{"line_number":894,"context_line":"        else:"},{"line_number":895,"context_line":"            msg \u003d \"_validate_subnet() could not find a valid ip_version.\""},{"line_number":896,"context_line":"            raise q_exc.Invalid(message\u003dmsg)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        if \u0027cidr\u0027 in s:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FdsY%3D","line":895,"in_reply_to":"AAAALH%2F%2Feg8%3D","updated":"2012-09-08 21:43:44.000000000","message":"I will keep your advice in mind, though the logic will be removed in the next patch following Salvatore\u0027s and my comment above.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"unresolved":false,"context_lines":[{"line_number":892,"context_line":"        elif prev:"},{"line_number":893,"context_line":"            ip_version \u003d prev.ip_version"},{"line_number":894,"context_line":"        else:"},{"line_number":895,"context_line":"            msg \u003d \"_validate_subnet() could not find a valid ip_version.\""},{"line_number":896,"context_line":"            raise q_exc.Invalid(message\u003dmsg)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        if \u0027cidr\u0027 in s:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2Feg8%3D","line":895,"in_reply_to":"AAAALH%2F%2FekI%3D","updated":"2012-09-07 16:10:58.000000000","message":"Also, please try to phrase the error message relative to what the client is trying to do rather than the name of an internal function. Maybe something like:\n\nmsg \u003d _(\"An ip_version must be specified for the subnet.\")","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":913,"context_line":"                    quota\u003dcfg.CONF.max_dns_nameservers)"},{"line_number":914,"context_line":"            for dns in s[\u0027dns_nameservers\u0027]:"},{"line_number":915,"context_line":"                try:"},{"line_number":916,"context_line":"                    netaddr.IPAddress(dns)"},{"line_number":917,"context_line":"                except Exception:"},{"line_number":918,"context_line":"                    raise q_exc.InvalidInput("},{"line_number":919,"context_line":"                        error_message\u003d(\"error parsing dns address %s\" % dns))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FekY%3D","line":916,"updated":"2012-09-07 14:59:59.000000000","message":"The check here should also be changed to ensure that the nameservers are the same IP version as the subnet.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":913,"context_line":"                    quota\u003dcfg.CONF.max_dns_nameservers)"},{"line_number":914,"context_line":"            for dns in s[\u0027dns_nameservers\u0027]:"},{"line_number":915,"context_line":"                try:"},{"line_number":916,"context_line":"                    netaddr.IPAddress(dns)"},{"line_number":917,"context_line":"                except Exception:"},{"line_number":918,"context_line":"                    raise q_exc.InvalidInput("},{"line_number":919,"context_line":"                        error_message\u003d(\"error parsing dns address %s\" % dns))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FduM%3D","line":916,"in_reply_to":"AAAALH%2F%2FekY%3D","updated":"2012-09-08 21:43:44.000000000","message":"Added the validation for dns in the next patch.","commit_id":"bea1d68de22143a6b53638ef47484198dc787576"}]}
