)]}'
{"tempest/lib/services/compute/servers_client.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"278a8e012770daad063460b9861b3b3f1e2c6e56","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_2179d9c6","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"updated":"2020-03-10 06:49:08.000000000","message":"@Martin:\nsee the bug report, https://bugs.launchpad.net/tempest/+bug/1864625\nwhen body is empty(b\u0027\u0027) while schema is not, validate_response raises exception, that\u0027s why else branch is needed.","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"176755f1e476c6436cdf9d412eed503cfe3b45b3","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_929a595f","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"in_reply_to":"1fa4df85_2179d9c6","updated":"2020-03-10 10:51:35.000000000","message":"I see, sorry, I misread and thought the problem is loading byte content, not validation.","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"7dbab27ceed27d0999b1fc776469e28840982e81","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_6ece87b5","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"in_reply_to":"1fa4df85_4be93d7e","updated":"2020-03-16 01:41:43.000000000","message":"jsonschema.validate expects a string input, and if body is not empty, it will be changed to string by json.loads(body), but if body is empty, it will remain the type of bytes(b \u0027\u0027).","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"},{"author":{"_account_id":31239,"name":"Paras Babbar","email":"pbabbar@redhat.com","username":"pbabbar"},"change_message_id":"d6076516a1d117ce495f48a546ea414f78c15048","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_51f8e447","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"in_reply_to":"1fa4df85_6ece87b5","updated":"2020-03-29 01:50:24.000000000","message":"The change make sense, but we can also use  something like this here as we use oslo_Serialization so : oslo_serialization.base64.decode_as_text(encoded, encoding\u003d\u0027utf-8\u0027)","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a2014910616ae3b6ae5aff3e1f6af10aa79ab329","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_003f38d6","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"in_reply_to":"1fa4df85_6ece87b5","updated":"2020-05-14 20:45:43.000000000","message":"ohk its on scheme side things complain. lgtm","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"bca3675b9fcafba45030ee6d99c0b44399dfdb9a","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                               post_body)"},{"line_number":210,"context_line":"        if body:"},{"line_number":211,"context_line":"            body \u003d json.loads(body)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            if isinstance(body, bytes):"},{"line_number":214,"context_line":"                body \u003d body.decode(\u0027utf-8\u0027)"},{"line_number":215,"context_line":"        self.validate_response(schema, resp, body)"},{"line_number":216,"context_line":"        return rest_client.ResponseBody(resp, body)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_4be93d7e","line":214,"range":{"start_line":212,"start_character":0,"end_line":214,"end_character":43},"in_reply_to":"1fa4df85_929a595f","updated":"2020-03-15 23:52:49.000000000","message":"does this handled by oslo_serialization ? we do not use json lib directly but oslo_serialization.jsonutils","commit_id":"be86aec05d7f21b929a45ddcab73269791c90153"}]}
