)]}'
{"cinder/api/contrib/volume_type_encryption.py":[{"author":{"_account_id":6604,"name":"zhangchao","email":"zhangchao010@huawei.com","username":"zhangchao010"},"change_message_id":"386a87c0762d5a419c8cec15dc252dec1a8da05b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if not body:"},{"line_number":140,"context_line":"            expl \u003d _(\u0027Request body empty\u0027)"},{"line_number":141,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":142,"context_line":"        if len(body) \u003e 1:"},{"line_number":143,"context_line":"            expl \u003d _(\u0027Request body contains too many items\u0027)"},{"line_number":144,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BQ20%3D","line":142,"updated":"2013-11-28 07:30:29.000000000","message":"How about making sure the body is a dictionary before using len()? Some objects may have no len(). And how about using is_valid_body just like in func create?","commit_id":"eda047ea4ff6ecf3b25ef3c2e89b0b763e83504c"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"8905455f83759c353e08a270cbf7433f7c4133b3","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if not body:"},{"line_number":140,"context_line":"            expl \u003d _(\u0027Request body empty\u0027)"},{"line_number":141,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":142,"context_line":"        if len(body) \u003e 1:"},{"line_number":143,"context_line":"            expl \u003d _(\u0027Request body contains too many items\u0027)"},{"line_number":144,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BGAc%3D","line":142,"in_reply_to":"AAAATn%2F%2BQ20%3D","updated":"2013-12-02 16:31:44.000000000","message":"Good catch.  The updated patch has is_valid_body.","commit_id":"eda047ea4ff6ecf3b25ef3c2e89b0b763e83504c"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c3669b8f79f4d89a3c96aa537d57f3149f4184f2","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        if not self.is_valid_body(body, \u0027encryption\u0027):"},{"line_number":143,"context_line":"            expl \u003d _(\u0027Update body is not valid. It must contain \"encryption.\"\u0027)"},{"line_number":144,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":145,"context_line":"        if type(body) is not dict:"},{"line_number":146,"context_line":"            expl \u003d _(\u0027Update body is not valid. It must be a dictionary.\u0027)"},{"line_number":147,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":148,"context_line":"        if len(body) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F92xw%3D","line":145,"updated":"2013-12-05 07:27:48.000000000","message":"This seems redundant to me since _is_valid_body() has tested that body has \u0027encryption\u0027.  If you know there are cases that could trigger this issue, please add a unittest to verify.","commit_id":"d789717e2ef0c4063cfb2b746771629c6235512a"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"bec7973423a359ba5064e861d698427fb56cb8e2","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        if not self.is_valid_body(body, \u0027encryption\u0027):"},{"line_number":143,"context_line":"            expl \u003d _(\u0027Update body is not valid. It must contain \"encryption.\"\u0027)"},{"line_number":144,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":145,"context_line":"        if type(body) is not dict:"},{"line_number":146,"context_line":"            expl \u003d _(\u0027Update body is not valid. It must be a dictionary.\u0027)"},{"line_number":147,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":148,"context_line":"        if len(body) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9yEQ%3D","line":145,"in_reply_to":"AAAATn%2F92xw%3D","updated":"2013-12-05 23:43:04.000000000","message":"I removed this line, since I agree that it is redundant.","commit_id":"d789717e2ef0c4063cfb2b746771629c6235512a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c3669b8f79f4d89a3c96aa537d57f3149f4184f2","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self._check_type(context, type_id)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if self._encrypted_type_in_use(context, type_id):"},{"line_number":155,"context_line":"            expl \u003d _(\u0027Cannot update encryption specs. Volume type in use.\u0027)"},{"line_number":156,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F92zw%3D","line":154,"updated":"2013-12-05 07:27:48.000000000","message":"Not sure I follow why encryption specs cannot be changed if type is being used.","commit_id":"d789717e2ef0c4063cfb2b746771629c6235512a"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"bec7973423a359ba5064e861d698427fb56cb8e2","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self._check_type(context, type_id)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if self._encrypted_type_in_use(context, type_id):"},{"line_number":155,"context_line":"            expl \u003d _(\u0027Cannot update encryption specs. Volume type in use.\u0027)"},{"line_number":156,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9yCw%3D","line":154,"in_reply_to":"AAAATn%2F92zw%3D","updated":"2013-12-05 23:43:04.000000000","message":"Updating the encryption specs (such as the key size or the cipher) could cause existing encrypted volumes to be inaccessible.","commit_id":"d789717e2ef0c4063cfb2b746771629c6235512a"}],"cinder/db/api.py":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"e37fc6647d02030707aabb711b7c64e645be2463","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"# TODO(joel-coffman): split into two functions -- update and create"},{"line_number":463,"context_line":"def volume_type_encryption_update_or_create(context, volume_type_id,"},{"line_number":464,"context_line":"                                            encryption_specs):"},{"line_number":465,"context_line":"    return IMPL.volume_type_encryption_update_or_create(context,"},{"line_number":466,"context_line":"                                                        volume_type_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F97PY%3D","side":"PARENT","line":463,"updated":"2013-12-04 12:07:31.000000000","message":"Why split this function into \u0027create\u0027 and \u0027update\u0027 if both call the same function in the actual implementation?","commit_id":"d3a6d29aef60bdc90c8762875fdf20ecbdfb4bb4"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"bec7973423a359ba5064e861d698427fb56cb8e2","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"# TODO(joel-coffman): split into two functions -- update and create"},{"line_number":463,"context_line":"def volume_type_encryption_update_or_create(context, volume_type_id,"},{"line_number":464,"context_line":"                                            encryption_specs):"},{"line_number":465,"context_line":"    return IMPL.volume_type_encryption_update_or_create(context,"},{"line_number":466,"context_line":"                                                        volume_type_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9yEE%3D","side":"PARENT","line":463,"in_reply_to":"AAAATn%2F97PY%3D","updated":"2013-12-05 23:43:04.000000000","message":"The latest patch includes two different functions in the actual implementation.","commit_id":"d3a6d29aef60bdc90c8762875fdf20ecbdfb4bb4"}],"cinder/tests/test_db_api.py":[{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"2568203818d3c8168352a79ce4549b399e17a056","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        if updated:"},{"line_number":591,"context_line":"            values \u003d base_values"},{"line_number":592,"context_line":"        else:"},{"line_number":593,"context_line":"            values \u003d updated_values"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        def compose(val, step):"},{"line_number":596,"context_line":"            if isinstance(val, str):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FyrA%3D","line":593,"updated":"2014-01-08 12:31:54.000000000","message":"Shouldn\u0027t the bodies of these cases be swapped? Currently, if updated \u003d\u003d False, you use the updated values, which seems counter intuitive.","commit_id":"7cd41f57673fc61ab10b8215ce4dbc8c7c869849"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"baace2bccbf61c2d0f5cc44a44c82cb577151e55","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        if updated:"},{"line_number":591,"context_line":"            values \u003d base_values"},{"line_number":592,"context_line":"        else:"},{"line_number":593,"context_line":"            values \u003d updated_values"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        def compose(val, step):"},{"line_number":596,"context_line":"            if isinstance(val, str):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FxPo%3D","line":593,"in_reply_to":"AAAAUH%2F%2FyrA%3D","updated":"2014-01-08 17:13:34.000000000","message":"Good catch. This is fixed in the 5th patch.","commit_id":"7cd41f57673fc61ab10b8215ce4dbc8c7c869849"}]}
