)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"0c36544438854c1623b175f9e2d04a27cb456f62","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By defining the API schema, it is possible to separate the validation"},{"line_number":10,"context_line":"code from the API method. The API method can be more simple."},{"line_number":11,"context_line":"In addition, a response of API validation error can be consistency for"},{"line_number":12,"context_line":"whole of Nova APIs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially implements blueprint nova-api-validation-fw"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATn%2F9J4U%3D","line":11,"updated":"2013-12-16 14:08:56.000000000","message":"... can be consistent for the whole Nova API.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e891c0e99415a00c186a386ed92df6eda1eaaa83","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By defining the API schema, it is possible to separate the validation"},{"line_number":10,"context_line":"code from the API method. The API method can be more simple."},{"line_number":11,"context_line":"In addition, a response of API validation error can be consistency for"},{"line_number":12,"context_line":"whole of Nova APIs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially implements blueprint nova-api-validation-fw"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATn%2F9FIE%3D","line":11,"in_reply_to":"AAAATn%2F9J4U%3D","updated":"2013-12-17 00:18:47.000000000","message":"Nice comment, will apply it. thanks.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"}],"nova/api/api_validator.py":[{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"7e2878bfdf8fa323f855af1881a045205623ebb1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return False"},{"line_number":42,"context_line":"    if instance.upper() !\u003d \u0027TRUE\u0027 and instance.upper() !\u003d \u0027FALSE\u0027:"},{"line_number":43,"context_line":"        return False"},{"line_number":44,"context_line":"    return True"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class APIValidator(jsonschema.Draft4Validator):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FUBY%3D","line":44,"updated":"2013-07-04 08:59:37.000000000","message":"You could instead simply write:\nreturn instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027","commit_id":"a56ca654cae0e5bbcbea78c55d102347e4a6117c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"20ccff0a860e821d6486075eb05b7d82dbfbdb0f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return False"},{"line_number":42,"context_line":"    if instance.upper() !\u003d \u0027TRUE\u0027 and instance.upper() !\u003d \u0027FALSE\u0027:"},{"line_number":43,"context_line":"        return False"},{"line_number":44,"context_line":"    return True"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class APIValidator(jsonschema.Draft4Validator):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FST4%3D","line":44,"in_reply_to":"AAAAPn%2F%2FUBY%3D","updated":"2013-07-05 05:56:48.000000000","message":"Thanks, Alexei\n\nI will apply your comment to the next.","commit_id":"a56ca654cae0e5bbcbea78c55d102347e4a6117c"}],"nova/api/openstack/compute/schemas/v3/evacuate_schema.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"ffddf8d274960aaaea534d7dcb0e7f6fec31668b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F8oQw%3D","line":35,"updated":"2013-12-24 02:48:32.000000000","message":"Should we also be accepting 1 and 0? (bool from string does)","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7d954ac44ffbf1b22c4060b44d0e5bd459e934ea","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAT3%2F%2F5oU%3D","line":35,"in_reply_to":"AAAAT3%2F%2F5tw%3D","updated":"2013-12-27 14:28:52.000000000","message":"Thanks for your response, I see it now.\nI will add 0 and 1 to this list.","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"efdbdb8bc0f1d969140d3a40b1f89eb7c42bc0d0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAT3%2F%2F5tw%3D","line":35,"in_reply_to":"AAAATn%2F8lbE%3D","updated":"2013-12-27 13:57:25.000000000","message":"I think we should be fairly liberal about what we accept. I think 1 and 0 is unambiguous in this context. So whilst we might encourage clients to use True/False I think we should accept 1 and 0.\n\nJust my point of view, so a post to the ML won\u0027t hurt but might not get much response this time of year until the new year...","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"279bdad1853c01029083832aea4435926b77a257","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F8lbE%3D","line":35,"in_reply_to":"AAAATn%2F8oQw%3D","updated":"2013-12-25 02:29:34.000000000","message":"Hi Chris,\n\nThanks for your review.\nYou are right. Current API accepts 1 and 0 as boolean string.\n\nI feel these values(1, 0) are a little more difficult to understand the meanings than the other values. So I have removed them from the above enum.\n\nOn the other thinking, it is better to accept the existing values as valid parameters. should we talk about this topic on more public places(ml or irc, etc)?","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3f0fa5c32e315629dd29416818f6d0d1cf19bc4d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"            \u0027required\u0027: [\u0027host\u0027, \u0027on_shared_storage\u0027],"},{"line_number":40,"context_line":"        },"},{"line_number":41,"context_line":"    },"},{"line_number":42,"context_line":"    \u0027required\u0027: [\u0027evacuate\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAT3%2F%2F5zc%3D","line":39,"updated":"2013-12-27 13:23:07.000000000","message":"prefer to use \u0027additionalProperties\u0027: False,","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3f0fa5c32e315629dd29416818f6d0d1cf19bc4d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            \u0027required\u0027: [\u0027host\u0027, \u0027on_shared_storage\u0027],"},{"line_number":40,"context_line":"        },"},{"line_number":41,"context_line":"    },"},{"line_number":42,"context_line":"    \u0027required\u0027: [\u0027evacuate\u0027],"},{"line_number":43,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAT3%2F%2F5zo%3D","line":42,"updated":"2013-12-27 13:23:07.000000000","message":"prefer to use \u0027additionalProperties\u0027: False,","commit_id":"8d85ac6880fd7fa8692c06ac754e5fb80d5fdc27"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"ae0ae97468ed42d8e1b4e32982f17d5cdfd056c7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2B0s%3D","line":1,"updated":"2014-01-05 10:28:08.000000000","message":"not needed","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1a3b23aafdd9c05ee00dd2134e5cd2eb861208e5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2Byo%3D","line":1,"in_reply_to":"AAAAUH%2F%2F%2B0s%3D","updated":"2014-01-05 11:26:23.000000000","message":"please explain why this line should be removed.\nThere are a lot of patches which have this line in gerrit, and I am  not user your -1 due to this line.","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1372875268245811a5a6c638a61ca99f531cccd5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2FulY%3D","line":1,"in_reply_to":"AAAAUH%2F%2F%2BuA%3D","updated":"2014-01-09 05:05:48.000000000","message":"Hi Jay,\n\nWe need to fix a problem of this schema, so I will apply your comment also to new patch.\nThanks.","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f928d0ef16a3f1de9f4dfd1d016f06f0dd50f06a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2BuA%3D","line":1,"in_reply_to":"AAAAUH%2F%2F%2Bus%3D","updated":"2014-01-05 13:24:45.000000000","message":"This was already merged in oslo and cinder, so we also should remove this in nova etc to keep consistent.\n\nhttps://review.openstack.org/#/c/51295/\nhttps://review.openstack.org/#/c/63990/\n\nThe discussion is here:\nhttp://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"cecbff617260dbdcee9971d545622b4e17cf9b49","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2Bus%3D","line":1,"in_reply_to":"AAAAUH%2F%2F%2Byo%3D","updated":"2014-01-05 13:12:32.000000000","message":"Jay - these vim lines are fine. There was a discussion on openstack-dev about whether we should remove them or not, but there was no decision made.","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"ae0ae97468ed42d8e1b4e32982f17d5cdfd056c7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2B0o%3D","line":3,"updated":"2014-01-05 10:28:08.000000000","message":"2014?","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1a3b23aafdd9c05ee00dd2134e5cd2eb861208e5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2013 NEC Corporation.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2F%2Byk%3D","line":3,"in_reply_to":"AAAAUH%2F%2F%2B0o%3D","updated":"2014-01-05 11:26:23.000000000","message":"this patch has been made in 2013.","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"7c35b9eaba5dcc154d1f31546ec58fc9d833d53c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027, \u00271\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027, \u00270\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2Fy4M%3D","line":35,"updated":"2014-01-08 11:25:19.000000000","message":"Need True and False (not including \u0027\u0027) in enum?\nWhen I wrote as you write, test code which has the body with force\u003dTrue failed, and I added True and False to enum, the test succeed.\nPlease see (and review :))\nhttps://review.openstack.org/#/c/65413/","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1372875268245811a5a6c638a61ca99f531cccd5","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \u0027on_shared_storage\u0027: {"},{"line_number":33,"context_line":"                    \u0027type\u0027: [\u0027boolean\u0027, \u0027string\u0027],"},{"line_number":34,"context_line":"                    \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027, \u00271\u0027,"},{"line_number":35,"context_line":"                             \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027, \u00270\u0027],"},{"line_number":36,"context_line":"                },"},{"line_number":37,"context_line":"                \u0027admin_password\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":38,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2Fulw%3D","line":35,"in_reply_to":"AAAAUH%2F%2Fy4M%3D","updated":"2014-01-09 05:05:48.000000000","message":"Hi Yuiko,\n\nThanks for your review. You are right.\n\"enum\" works for boolean type also, so we need to include True and False of boolean type.","commit_id":"cd13c86c4d1b013377712b463d625d23653092a6"}],"nova/api/validation/validators.py":[{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"0c36544438854c1623b175f9e2d04a27cb456f62","unresolved":false,"context_lines":[{"line_number":28,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":29,"context_line":"def _validate_boolean_format(instance):"},{"line_number":30,"context_line":"    if getattr(instance, \u0027upper\u0027, None) is None:"},{"line_number":31,"context_line":"        return True"},{"line_number":32,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9IkI%3D","line":31,"updated":"2013-12-16 14:08:56.000000000","message":"This method should validate the boolean format of a string?  So I expect it would only work on strings.\n\nIf you want it to also return True for booleans I think there should be a type check.  Because this returns true for numbers, or any type without an \"upper\" method.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"4352fc43b24efccd7c3d36fb866967f5bc3518ca","unresolved":false,"context_lines":[{"line_number":28,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":29,"context_line":"def _validate_boolean_format(instance):"},{"line_number":30,"context_line":"    if getattr(instance, \u0027upper\u0027, None) is None:"},{"line_number":31,"context_line":"        return True"},{"line_number":32,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9Rs4%3D","line":31,"updated":"2013-12-13 06:49:19.000000000","message":"why is it True? if the instance is None.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e891c0e99415a00c186a386ed92df6eda1eaaa83","unresolved":false,"context_lines":[{"line_number":28,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":29,"context_line":"def _validate_boolean_format(instance):"},{"line_number":30,"context_line":"    if getattr(instance, \u0027upper\u0027, None) is None:"},{"line_number":31,"context_line":"        return True"},{"line_number":32,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9FHg%3D","line":31,"in_reply_to":"AAAATn%2F9IkI%3D","updated":"2013-12-17 00:18:47.000000000","message":"Good suggestion, will change here to type check.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"c4600aec8e361c7aea20f3b7d97af082e21d1d76","unresolved":false,"context_lines":[{"line_number":28,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":29,"context_line":"def _validate_boolean_format(instance):"},{"line_number":30,"context_line":"    if getattr(instance, \u0027upper\u0027, None) is None:"},{"line_number":31,"context_line":"        return True"},{"line_number":32,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9MqI%3D","line":31,"in_reply_to":"AAAATn%2F9Rs4%3D","updated":"2013-12-14 13:03:40.000000000","message":"If \"return False\" here and the instance type is boolean, the validation fails.\nThis \"return True\" is for making the validation works against string type.\n\nIn jsonschema, each validation(\"type\", \"format\", \"minLegth\", etc.) does not depend on the other validation even if they are against the same parameter. So each validation should be implemented only for each scope.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"f42a864321985bdf1697eae85f89cbc6cf099057","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F9DYI%3D","line":30,"updated":"2013-12-17 09:09:53.000000000","message":"why not add the following one?\nif isinstance(instance, bool):\n     return instance\nIf I remember correctly, in tempest json client sends the request like the following:\n\"return_reservation_id\": true\nbut the xmlclient sends the request like the following:\n os-multiple-create:return_reservation_id\u003d\"True\"\n\nBut I\u0027m not sure if we will restrict that.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"6dd1483875b3c410da46fcfe93e210aaeb08c765","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F8%2B0E%3D","line":30,"in_reply_to":"AAAATn%2F8%2Fbk%3D","updated":"2013-12-18 05:31:08.000000000","message":"Thanks for your clarification, it makes senses.\nBoth of them are OK for me.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ccafde1f5d1710edbda919a003dc56e8c7bb751d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F8%2Fbk%3D","line":30,"in_reply_to":"AAAATn%2F8%2FdY%3D","updated":"2013-12-17 23:42:45.000000000","message":"As another option, we can validate an instance with the keyword \u0027enum\u0027 like the following:\n\n  \u0027on_shared_storage\u0027: {\n      \u0027type\u0027: (\u0027boolean\u0027, \u0027string\u0027),\n      \u0027enum\u0027: [\u0027True\u0027, \u0027TRUE\u0027, \u0027true\u0027, \u0027False\u0027, \u0027FALSE\u0027, \u0027false\u0027],\n  },\n\nThis way cannot support \u0027tRUE\u0027 or something as valid parameter, but it seems enough for me. In addition, this way does not need any customization.\nThat means more portable than current implementation.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a8c0b581cb060aa7569331cad7ca5e27e1c11105","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F8%2FdY%3D","line":30,"in_reply_to":"AAAATn%2F9DEY%3D","updated":"2013-12-17 23:36:09.000000000","message":"@Ivan:\n\nThis just checks the string format, not the type.\nIf _validate_boolean_format() returns True, the format of an instance is acceptable. If the method returns False, the format is refused.\n\nThe following schema is a use case for it:\n\n  \u0027on_shared_storage\u0027: {\n      \u0027type\u0027: (\u0027boolean\u0027, \u0027string\u0027),\n      \u0027format\u0027: \u0027boolean\u0027\n  },\n\nThe keyword \u0027format\u0027 should work only for string instance. If we need to check an instance type, we should specify acceptable types with the keyword \u0027type\u0027.\n\nThis format implementation is the same as original jsonschema format checker. jsonschema has some original format checkers like \u0027ipv4\u0027, \u0027ipv6\u0027, \u0027email\u0027, etc. They checks the instance type, and if not string type, returns True.\n\nhttps://github.com/Julian/jsonschema/blob/master/jsonschema/_format.py#L121\n\n 119 @_checks_drafts(\"email\")\n 120 def is_email(instance):\n 121     if not isinstance(instance, str_types):\n 122         return True\n 123     return \"@\" in instance\n 124\n 125\n 126 @_checks_drafts(draft3\u003d\"ip-address\", draft4\u003d\"ipv4\", raises\u003dsocket.error)\n 127 def is_ipv4(instance):\n 128     if not isinstance(instance, str_types):\n 129         return True\n 130     return socket.inet_aton(instance)","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"a434d746567502d43447f3ece6314b70e6e5fcea","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F9DEk%3D","line":30,"in_reply_to":"AAAATn%2F9DN0%3D","updated":"2013-12-17 10:14:14.000000000","message":"this makes more sense.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"f667751a7d0b7f5c611258794b841aac497adb6b","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F9DN0%3D","line":30,"in_reply_to":"AAAATn%2F9DWs%3D","updated":"2013-12-17 09:42:21.000000000","message":"Ivan-Zhu: this method is just checking if it is a valid boolean or a string representing a boolean, so I expected something like:\n\nif isinstance(instance, bool):\n    return True\n\nif isinstance(instance, six.string_types):\n  return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027\n\nreturn False","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"a434d746567502d43447f3ece6314b70e6e5fcea","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F9DEY%3D","line":30,"in_reply_to":"AAAATn%2F9DWs%3D","updated":"2013-12-17 10:14:14.000000000","message":"Thanks for your reply. You mean this just check the type? If it return True, the type is permit. If False, the type is refused. The value check is in another method.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"17dbec3a09c89d600dd43e75a957008cf0fdf55c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027boolean\u0027)"},{"line_number":30,"context_line":"def _validate_boolean_format(instance):"},{"line_number":31,"context_line":"    if not isinstance(instance, six.string_types):"},{"line_number":32,"context_line":"        return True"},{"line_number":33,"context_line":"    return instance.upper() \u003d\u003d \u0027TRUE\u0027 or instance.upper() \u003d\u003d \u0027FALSE\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F9DWs%3D","line":30,"in_reply_to":"AAAATn%2F9DYI%3D","updated":"2013-12-17 09:13:21.000000000","message":"If doing that, the boolean False is considered as invalid parameter.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"}],"nova/tests/api/openstack/compute/plugins/v3/test_evacuate.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"19b4a6c9a0fa7bf463b9631d3c9755a0b562ab59","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        res_dict \u003d jsonutils.loads(res.body)"},{"line_number":107,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_evacuate_instance_with_invalid_charactors_host(self):"},{"line_number":110,"context_line":"        host \u003d \u0027abc!#\u0027"},{"line_number":111,"context_line":"        req, app \u003d self._gen_request_with_app({\u0027host\u0027: host,"},{"line_number":112,"context_line":"                                               \u0027on_shared_storage\u0027: \u0027False\u0027,"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAUH%2F%2FawY%3D","line":109,"updated":"2014-01-13 23:13:48.000000000","message":"Small misspelling s/charactors/characters/. Sorry I didn\u0027t notice it before. Can update if you end up having to rebase again.","commit_id":"cba27a06669448de18bbfa2480bc1f576c10ce72"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"622d9d7f9f104e1cdf743f152ddd12e3c270d573","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        res_dict \u003d jsonutils.loads(res.body)"},{"line_number":107,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_evacuate_instance_with_invalid_charactors_host(self):"},{"line_number":110,"context_line":"        host \u003d \u0027abc!#\u0027"},{"line_number":111,"context_line":"        req, app \u003d self._gen_request_with_app({\u0027host\u0027: host,"},{"line_number":112,"context_line":"                                               \u0027on_shared_storage\u0027: \u0027False\u0027,"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAUH%2F%2FasI%3D","line":109,"in_reply_to":"AAAAUH%2F%2FawY%3D","updated":"2014-01-13 23:39:26.000000000","message":"Hi Melanie,\n\nThank you for reviewing, nice catch! I will fix this soon.","commit_id":"cba27a06669448de18bbfa2480bc1f576c10ce72"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"f01c5e1cb6e96b8ddc5f05ca5af1f3fe3cbb457c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                                               \u0027admin_password\u0027: \u0027MyNewPass\u0027})"},{"line_number":96,"context_line":"        res \u003d req.get_response(app)"},{"line_number":97,"context_line":"        res_dict \u003d jsonutils.loads(res.body)"},{"line_number":98,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def test_evacuate_instance_with_too_long_host(self):"},{"line_number":101,"context_line":"        host \u003d \u0027a\u0027 * 256"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2FIYo%3D","line":98,"updated":"2014-01-17 05:44:24.000000000","message":"the order of parameters should be (expected, observed) https://bugs.launchpad.net/nova/+bug/126013 Please address this throughout the patch,\nlike\nhttps://review.openstack.org/#/c/64134","commit_id":"3b80061b9616502f10d348228567396aa6d41acc"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"bb878486481565dd2dbc4d8acdd4b0a7a774bf27","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                                               \u0027admin_password\u0027: \u0027MyNewPass\u0027})"},{"line_number":96,"context_line":"        res \u003d req.get_response(app)"},{"line_number":97,"context_line":"        res_dict \u003d jsonutils.loads(res.body)"},{"line_number":98,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def test_evacuate_instance_with_too_long_host(self):"},{"line_number":101,"context_line":"        host \u003d \u0027a\u0027 * 256"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2FIX0%3D","line":98,"in_reply_to":"AAAAUH%2F%2FIYo%3D","updated":"2014-01-17 05:48:23.000000000","message":"Thanks, will update them.","commit_id":"3b80061b9616502f10d348228567396aa6d41acc"}],"nova/tests/test_api_validation.py":[{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"0c36544438854c1623b175f9e2d04a27cb456f62","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            expected_kwargs \u003d {"},{"line_number":29,"context_line":"                \u0027code\u0027: 400,"},{"line_number":30,"context_line":"                \u0027detail\u0027: expected_detail"},{"line_number":31,"context_line":"            }"},{"line_number":32,"context_line":"            self.assertEqual(ex.kwargs, expected_kwargs)"},{"line_number":33,"context_line":"        except Exception as ex:"},{"line_number":34,"context_line":"            self.fail(\u0027An unexpected exception happens: %s\u0027 % ex)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9IjQ%3D","line":31,"updated":"2013-12-16 14:08:56.000000000","message":"Not part of your patch, I know, but I think these arguments are the wrong way round.  The error message when a test fails has \"reference\" and \"actual\" switched.","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e891c0e99415a00c186a386ed92df6eda1eaaa83","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            expected_kwargs \u003d {"},{"line_number":29,"context_line":"                \u0027code\u0027: 400,"},{"line_number":30,"context_line":"                \u0027detail\u0027: expected_detail"},{"line_number":31,"context_line":"            }"},{"line_number":32,"context_line":"            self.assertEqual(ex.kwargs, expected_kwargs)"},{"line_number":33,"context_line":"        except Exception as ex:"},{"line_number":34,"context_line":"            self.fail(\u0027An unexpected exception happens: %s\u0027 % ex)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F9FG4%3D","line":31,"in_reply_to":"AAAATn%2F9IjQ%3D","updated":"2013-12-17 00:18:47.000000000","message":"I\u0027m not sure this your comment.\nI guess this comment is a kind of code cleanup, and it would be out of scope of this patch, right? just a comment?","commit_id":"bbf98b9058ce2d4b4e38e46185fb72fc08a1a74c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"6dd1483875b3c410da46fcfe93e210aaeb08c765","unresolved":false,"context_lines":[{"line_number":388,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":389,"context_line":"            \u0027properties\u0027: {"},{"line_number":390,"context_line":"                \u0027foo\u0027: {"},{"line_number":391,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":392,"context_line":"                    \u0027format\u0027: \u0027boolean\u0027,"},{"line_number":393,"context_line":"                },"},{"line_number":394,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F8%2BzQ%3D","line":391,"updated":"2013-12-18 05:31:08.000000000","message":"If you can add the boolean here and give the positive test, will be better.","commit_id":"f598a4a7f17d08b2ae49707d7e85c7b78b570628"}]}
