)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"68debb1557ea59e724f445ffa49d0d07b3181ce2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add validation for unexpected keys in fixed_ips of Port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add verification whether unexpected keys are"},{"line_number":10,"context_line":"included in fixed_ips of Port."},{"line_number":11,"context_line":"If unexpected keys are found, 400 error is returned."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a74a57a_55a69153","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":27},"updated":"2016-11-27 00:12:25.000000000","message":"In my opinion, \u0027adds code to verify\u0027 would be clearer","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"7a9c40d2ac2c03f6d01433d6fb0fa0bd28fcf535","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add validation for unexpected keys in fixed_ips of Port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add verification whether unexpected keys are"},{"line_number":10,"context_line":"included in fixed_ips of Port."},{"line_number":11,"context_line":"If unexpected keys are found, 400 error is returned."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_a514bee8","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":27},"in_reply_to":"5a74a57a_55a69153","updated":"2016-12-07 05:36:49.000000000","message":"Done","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"92a004ffdf9af62af2ff8cfdf5096ed704d2c24d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code to verify whether unexpected keys are"},{"line_number":10,"context_line":"included in fixed_ips of Port."},{"line_number":11,"context_line":"If unexpected keys are found, 400 error is returned."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If60577e4037a5129ae0b668704a2b60cf8fabf0f"},{"line_number":14,"context_line":"Closes-bug: #1644708"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a71b18c_b4ce95b5","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":52},"updated":"2016-12-07 15:30:24.000000000","message":"I think we should remove this line. Neutron-lib has nothing to do with returning REST API response codes; this is dependent on how the consumer uses the validator.","commit_id":"69d42e43e1c5832c79ab93fc0269e1696d29365a"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"315a9b04afca210748f51c0c921ef8d01d8285ed","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code to verify whether unexpected keys are"},{"line_number":10,"context_line":"included in fixed_ips of Port."},{"line_number":11,"context_line":"If unexpected keys are found, 400 error is returned."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If60577e4037a5129ae0b668704a2b60cf8fabf0f"},{"line_number":14,"context_line":"Closes-bug: #1644708"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a71b18c_831596e6","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":52},"in_reply_to":"3a71b18c_b4ce95b5","updated":"2016-12-09 01:05:21.000000000","message":"I agree with your suggestion.\nI will remove this description.","commit_id":"69d42e43e1c5832c79ab93fc0269e1696d29365a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b0bae79dfbcd781ff27008c9a4d3c3980df78a97","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add validation for unexpected keys in fixed_ips of Port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code to verify whether unexpected keys are"},{"line_number":10,"context_line":"included in fixed_ips of Port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: If60577e4037a5129ae0b668704a2b60cf8fabf0f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da4df55a_6a2724ca","line":9,"updated":"2016-12-28 14:14:50.000000000","message":"This may actually turn out to be a non-backward compatible change. Unknown keys are ignored and/or validated at plugin level, if needed. The API layer has been particularly lax in this regard.\n\nI\u0027d rather be caution with this change unless this is fixing a real issue.","commit_id":"5ee06d2e54c805c975da960c0de125ff7b3bd8fa"}],"neutron_lib/api/validators.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e0b6543691125a8c8e0aaedff3f38a6ec72dc9f9","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            msg \u003d _(\"Invalid data format for fixed IP: \u0027%s\u0027\") % fixed_ip"},{"line_number":464,"context_line":"            LOG.debug(msg)"},{"line_number":465,"context_line":"            return msg"},{"line_number":466,"context_line":"        msg \u003d _verify_dict_unexpected_keys(valid_keys, fixed_ip)"},{"line_number":467,"context_line":"        if msg:"},{"line_number":468,"context_line":"            return msg"},{"line_number":469,"context_line":"        if \u0027ip_address\u0027 in fixed_ip:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_4276e3a4","line":466,"updated":"2016-11-25 17:06:02.000000000","message":"Why cant we just pass fixed_ips and valid_keys to validate_values() in Line#111\n\nYou wont need a separate function and if you need to redefine the msg variable , you can do it here...","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"7a9c40d2ac2c03f6d01433d6fb0fa0bd28fcf535","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            msg \u003d _(\"Invalid data format for fixed IP: \u0027%s\u0027\") % fixed_ip"},{"line_number":464,"context_line":"            LOG.debug(msg)"},{"line_number":465,"context_line":"            return msg"},{"line_number":466,"context_line":"        msg \u003d _verify_dict_unexpected_keys(valid_keys, fixed_ip)"},{"line_number":467,"context_line":"        if msg:"},{"line_number":468,"context_line":"            return msg"},{"line_number":469,"context_line":"        if \u0027ip_address\u0027 in fixed_ip:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_854d02c6","line":466,"in_reply_to":"5a74a57a_4276e3a4","updated":"2016-12-07 05:36:49.000000000","message":"I understand your point.\nHowever, following error message is returned when using \u0027validate_values\u0027.\n\"Invalid input for fixed_ips. Reason: a is not in valid_values.\"\n\nProbably this message is not clear for user.\nThus, I add validation for unexpected keys that is similar to that of in \u0027validate_dict\u0027.","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e0b6543691125a8c8e0aaedff3f38a6ec72dc9f9","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        if msg:"},{"line_number":763,"context_line":"            return msg"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    msg \u003d _verify_dict_unexpected_keys(key_specs, data)"},{"line_number":766,"context_line":"    if msg:"},{"line_number":767,"context_line":"        return msg"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_225e4712","line":765,"range":{"start_line":765,"start_character":11,"end_line":765,"end_character":55},"updated":"2016-11-25 17:06:02.000000000","message":"ditto","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"7a9c40d2ac2c03f6d01433d6fb0fa0bd28fcf535","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        if msg:"},{"line_number":763,"context_line":"            return msg"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    msg \u003d _verify_dict_unexpected_keys(key_specs, data)"},{"line_number":766,"context_line":"    if msg:"},{"line_number":767,"context_line":"        return msg"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_e5ccf636","line":765,"range":{"start_line":765,"start_character":11,"end_line":765,"end_character":55},"in_reply_to":"5a74a57a_158979c9","updated":"2016-12-07 05:36:49.000000000","message":"OK, I focuses on changing validation for fixed_ips.","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"68debb1557ea59e724f445ffa49d0d07b3181ce2","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        if msg:"},{"line_number":763,"context_line":"            return msg"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    msg \u003d _verify_dict_unexpected_keys(key_specs, data)"},{"line_number":766,"context_line":"    if msg:"},{"line_number":767,"context_line":"        return msg"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_158979c9","line":765,"range":{"start_line":765,"start_character":11,"end_line":765,"end_character":55},"in_reply_to":"5a74a57a_225e4712","updated":"2016-11-27 00:12:25.000000000","message":"This change to validate_dict is not described in the commit message or the bug this patchset is filed under. In  my opinion, the change to this method should have a separate bug and a separate patchset, so it can be evaluated under its own merits","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"92a004ffdf9af62af2ff8cfdf5096ed704d2c24d","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            return msg"},{"line_number":451,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":452,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_b480554b","line":453,"updated":"2016-12-07 15:30:24.000000000","message":"Why can\u0027t we just call _verify_dict_keys() here instead?","commit_id":"69d42e43e1c5832c79ab93fc0269e1696d29365a"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"315a9b04afca210748f51c0c921ef8d01d8285ed","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            return msg"},{"line_number":451,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":452,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_63031ab9","line":453,"in_reply_to":"3a71b18c_b480554b","updated":"2016-12-09 01:05:21.000000000","message":"Thanks for your comment.\nbecause the method checks whether target_dict contains all of expected keys.\nThis logic is valid for parameter that requires all of keys,\nfor example, extra routes and host routes.\nOn the other hand, since \u0027fixed_ips\u0027 requires either \u0027ip_address\u0027 or \u0027subnet_id\u0027 at least,\nthe method is too strict.","commit_id":"69d42e43e1c5832c79ab93fc0269e1696d29365a"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f291643e713ae26fee518d112281d0612d949130","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            return msg"},{"line_number":451,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":452,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_f5f424d0","line":453,"updated":"2016-12-09 14:08:03.000000000","message":"This still seems to allow empty fixed_ip dicts.\n\nFor example::\n\n    validate_fixed_ips([{}])\n\n\nIs valid. Is this this behavior we want?","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"fd312082686fb46c2624aaf0ca609da055830cc0","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            return msg"},{"line_number":451,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":452,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_00010c38","line":453,"in_reply_to":"3a71b18c_6764bf21","updated":"2016-12-16 02:32:04.000000000","message":"I agree with your comment.\nHowever, I think that adding check for [{}] is out of scope from this bug.\nThe improvement should be managed by another bug.","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f1fe4cb1261a9870e405e350ee925848915563de","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            return msg"},{"line_number":451,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":452,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_6764bf21","line":453,"in_reply_to":"3a71b18c_f5f424d0","updated":"2016-12-12 00:07:25.000000000","message":"I modified this unit test to see the effect of passing [{}] in fixed ip\u0027s when creating a port: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/extensions/test_segment.py#L1014. I get this error: http://paste.openstack.org/show/592058/, which is generated by IPAM here: https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L377\n\nSo the point of my comment is that if not captures here, it will be captured by IPAM later on. But yeah, maybe sonner is better than latter","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f291643e713ae26fee518d112281d0612d949130","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip if key not in valid_keys]"},{"line_number":454,"context_line":"        if unexpected_keys:"},{"line_number":455,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":456,"context_line":"                unexpected_keys)"},{"line_number":457,"context_line":"            LOG.debug(msg)"},{"line_number":458,"context_line":"            return msg"},{"line_number":459,"context_line":"        if \u0027ip_address\u0027 in fixed_ip:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_958210ff","line":456,"range":{"start_line":456,"start_character":16,"end_line":456,"end_character":31},"updated":"2016-12-09 14:08:03.000000000","message":"This could be large, but I guess it\u0027s OK since we do something similar in _verify_dict_keys()","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"1c0f58e22945eb51c2013ccf36e66b41b6e38ca9","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        return msg"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    ips \u003d []"},{"line_number":445,"context_line":"    valid_keys \u003d [\u0027ip_address\u0027, \u0027subnet_id\u0027]"},{"line_number":446,"context_line":"    for fixed_ip in data:"},{"line_number":447,"context_line":"        if not isinstance(fixed_ip, dict):"},{"line_number":448,"context_line":"            msg \u003d _(\"Invalid data format for fixed IP: \u0027%s\u0027\") % fixed_ip"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_c4b96730","line":445,"range":{"start_line":445,"start_character":4,"end_line":445,"end_character":44},"updated":"2016-12-20 04:17:10.000000000","message":"It\u0027s better to define it as constant not variable.","commit_id":"82adb199805c56843ad2d0568462236cb1bf90ae"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"3093eda828de7ec1f84ef733361d43dce75a30a7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                                                constants.HEX_ELEM)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"# Expected keys in dictionary."},{"line_number":39,"context_line":"EXPECTED_KEYS_FOR_FIXED_IP \u003d [\u0027ip_address\u0027, \u0027subnet_id\u0027]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6eadb0_0a46af7a","line":39,"updated":"2016-12-21 16:12:00.000000000","message":"This could even be private, since I\u0027m not sure we plan to expose it to consumers do we?","commit_id":"5ee06d2e54c805c975da960c0de125ff7b3bd8fa"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b0bae79dfbcd781ff27008c9a4d3c3980df78a97","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":454,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":455,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip"},{"line_number":456,"context_line":"                           if key not in EXPECTED_KEYS_FOR_FIXED_IP]"},{"line_number":457,"context_line":"        if unexpected_keys:"},{"line_number":458,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":459,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da4df55a_cd466a4e","line":456,"updated":"2016-12-28 14:14:50.000000000","message":"rather than hard coding the known keys for fixed IPs we could possibly set a flag for acceptable parameters and raise if the flag is unset. E.g:\n\n valid \u003d False\n if ip_address in fixed_ip:\n   ...\n   valid \u003d True\n\n if subnet_id in fixed_ip:\n   ...\n   valid \u003d True\n\nif not valid:\n   raise\n\nThat said, I am hesitant to approve such a change as it may imply an API change that is not covered by any version or extension bump.","commit_id":"5ee06d2e54c805c975da960c0de125ff7b3bd8fa"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1be32837ccf9f8102c222404a5950601d7bdda34","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":454,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":455,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip"},{"line_number":456,"context_line":"                           if key not in EXPECTED_KEYS_FOR_FIXED_IP]"},{"line_number":457,"context_line":"        if unexpected_keys:"},{"line_number":458,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":459,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_6757ed02","line":456,"in_reply_to":"ba5201f7_69d6e6c6","updated":"2017-01-02 09:48:09.000000000","message":"That is partially my point: I suspect that the lack of validation is not an oversight: that could make adding extension attributes down the line more cumbersome. Furthermore, technically speaking this is a non backward compatible change, and we have always been wary of accepting these types of fixes without a more solid API versioning story in place.","commit_id":"5ee06d2e54c805c975da960c0de125ff7b3bd8fa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7d2ea4b61361459c1e48365c51604920cda090de","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        # TODO(Kengo): This validation for unexpected keys should be"},{"line_number":454,"context_line":"        # refactored because there is same logic in validate_dict."},{"line_number":455,"context_line":"        unexpected_keys \u003d [key for key in fixed_ip"},{"line_number":456,"context_line":"                           if key not in EXPECTED_KEYS_FOR_FIXED_IP]"},{"line_number":457,"context_line":"        if unexpected_keys:"},{"line_number":458,"context_line":"            msg \u003d _(\"Unexpected keys supplied for fixed_ips: %s\") % \u0027, \u0027.join("},{"line_number":459,"context_line":"                unexpected_keys)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_69d6e6c6","line":456,"in_reply_to":"da4df55a_cd466a4e","updated":"2017-01-02 07:02:35.000000000","message":"i think that the code here is validating that the key foo does not appear in the dictionary. i think that this is ok. the suggestion above will not detect an invalid key","commit_id":"5ee06d2e54c805c975da960c0de125ff7b3bd8fa"}],"neutron_lib/constants.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"5faca7a7922610bea436069f3718d70a81f4b0c2","unresolved":false,"context_lines":[{"line_number":300,"context_line":"# Validator related constants"},{"line_number":301,"context_line":"#############################"},{"line_number":302,"context_line":"# expected keys in fixed_ip dictionary"},{"line_number":303,"context_line":"EXPECTED_KEYS_FOR_FIXED_IP \u003d [\u0027ip_address\u0027, \u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_8503d7b7","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":56},"updated":"2016-12-20 12:17:52.000000000","message":"I thought that the constant is put on between L37 and L38 in neutron_lib/api/validators.py. If this constant may be called from others, we should put it here but I don\u0027t think so.","commit_id":"0931177e8300f3bf3ca700378da8230e09a58690"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"d3c55d0dbeebb1885cfafc373ebeaefa6a163b0c","unresolved":false,"context_lines":[{"line_number":300,"context_line":"# Validator related constants"},{"line_number":301,"context_line":"#############################"},{"line_number":302,"context_line":"# expected keys in fixed_ip dictionary"},{"line_number":303,"context_line":"EXPECTED_KEYS_FOR_FIXED_IP \u003d [\u0027ip_address\u0027, \u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_90a2174a","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":56},"in_reply_to":"1a6eadb0_3ff20bd3","updated":"2016-12-20 23:52:32.000000000","message":"I see. I\u0027ll move this constant.","commit_id":"0931177e8300f3bf3ca700378da8230e09a58690"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9b061d8be2fc29bfc2c6e1550cee1e21b051de97","unresolved":false,"context_lines":[{"line_number":300,"context_line":"# Validator related constants"},{"line_number":301,"context_line":"#############################"},{"line_number":302,"context_line":"# expected keys in fixed_ip dictionary"},{"line_number":303,"context_line":"EXPECTED_KEYS_FOR_FIXED_IP \u003d [\u0027ip_address\u0027, \u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_3ff20bd3","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":56},"in_reply_to":"1a6eadb0_8503d7b7","updated":"2016-12-20 13:23:41.000000000","message":"+1","commit_id":"0931177e8300f3bf3ca700378da8230e09a58690"}],"neutron_lib/tests/unit/api/test_validators.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"68debb1557ea59e724f445ffa49d0d07b3181ce2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5a74a57a_d5b9c17a","updated":"2016-11-27 00:12:25.000000000","message":"A unit test will also be needed for the change made to validate_dict, even though I think that is a separate bug / patchset. Please see comment to https://review.openstack.org/#/c/402339/1/neutron_lib/api/validators.py@765","commit_id":"5d4f159e40f5738ab7ac0d5d848b420ab4d51273"}],"releasenotes/notes/ensure-fixedip-dict-keys-1d9ed849477db814.yaml":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f291643e713ae26fee518d112281d0612d949130","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_f5e26400","line":2,"updated":"2016-12-09 14:08:03.000000000","message":"Prelude shows up above all release notes (see [1]). Seems a little odd.\n\n\n[1] http://docs-draft.openstack.org/39/402339/3/check/gate-neutron-lib-releasenotes/a649388//releasenotes/build/html/unreleased.html","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"fd312082686fb46c2624aaf0ca609da055830cc0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"1a6eadb0_c09b9464","line":2,"in_reply_to":"3a71b18c_f5e26400","updated":"2016-12-16 02:32:04.000000000","message":"Ah, it seems odd. I\u0027ll move it to in foxes section.","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f291643e713ae26fee518d112281d0612d949130","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"},{"line_number":6,"context_line":"  - Fixes bug 1644708"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_35c4dc5d","line":4,"range":{"start_line":4,"start_character":45,"end_line":4,"end_character":54},"updated":"2016-12-09 14:08:03.000000000","message":"Nit: IMO code references format best with ``code name``","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"fd312082686fb46c2624aaf0ca609da055830cc0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"},{"line_number":6,"context_line":"  - Fixes bug 1644708"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"1a6eadb0_a0fdb86f","line":4,"range":{"start_line":4,"start_character":45,"end_line":4,"end_character":54},"in_reply_to":"3a71b18c_35c4dc5d","updated":"2016-12-16 02:32:04.000000000","message":"Done","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f291643e713ae26fee518d112281d0612d949130","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"},{"line_number":6,"context_line":"  - Fixes bug 1644708"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_d5ce4882","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":21},"updated":"2016-12-09 14:08:03.000000000","message":"I\u0027d opt to move the content from prelude down here for something like::\n\n    Bug `1644708 \u003clink to bug\u003e`_ is addressed by ensuring...","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"},{"author":{"_account_id":17133,"name":"Kengo Hobo","email":"hobo.kengo@jp.fujitsu.com","username":"hobo.kengo"},"change_message_id":"fd312082686fb46c2624aaf0ca609da055830cc0","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \u0027validate_fixed_ips\u0027 now ensures the fixed_ip dict"},{"line_number":4,"context_line":"    only contains the keys \u0027ip_address\u0027 and \u0027subnet_id\u0027."},{"line_number":5,"context_line":"fixes:"},{"line_number":6,"context_line":"  - Fixes bug 1644708"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"1a6eadb0_c08554cf","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":21},"in_reply_to":"3a71b18c_d5ce4882","updated":"2016-12-16 02:32:04.000000000","message":"Thanks, I will modify description as you said.","commit_id":"b65db19e4ce27a287e492450a904136a3532dfe8"}]}
