)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pass the empty body into the controller"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows POST and PUT reqeust without content-body. The"},{"line_number":10,"context_line":"default body: None will be passed into the controller, and"},{"line_number":11,"context_line":"will be validated in the controller, so it fixes the bug 1253089."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAATn%2F84GQ%3D","line":9,"updated":"2013-12-19 09:29:59.000000000","message":"reqeust \u003d\u003e requests","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"2a000faa4b089203820ff0984d33371aa800bdb3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pass the empty body into the controller"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows POST and PUT reqeust without content-body. The"},{"line_number":10,"context_line":"default body: None will be passed into the controller, and"},{"line_number":11,"context_line":"will be validated in the controller, so it fixes the bug 1253089."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAATn%2F8zY0%3D","line":9,"in_reply_to":"AAAATn%2F84GQ%3D","updated":"2013-12-20 06:40:56.000000000","message":"done","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/api/openstack/compute/consoles.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return dict(consoles\u003d[_translate_keys(console)"},{"line_number":96,"context_line":"                              for console in consoles])"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def create(self, req, server_id, body):"},{"line_number":99,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":100,"context_line":"        self.console_api.create_console("},{"line_number":101,"context_line":"                                req.environ[\u0027nova.context\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84FA%3D","line":98,"updated":"2013-12-19 09:29:59.000000000","message":"body \u003d None","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"2a000faa4b089203820ff0984d33371aa800bdb3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return dict(consoles\u003d[_translate_keys(console)"},{"line_number":96,"context_line":"                              for console in consoles])"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def create(self, req, server_id, body):"},{"line_number":99,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":100,"context_line":"        self.console_api.create_console("},{"line_number":101,"context_line":"                                req.environ[\u0027nova.context\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F8zYI%3D","line":98,"in_reply_to":"AAAATn%2F84FA%3D","updated":"2013-12-20 06:40:56.000000000","message":"hi. garyk.\nthanks for your review.\nYes, we can give the default value here.\nBut the default value will be override.\nhttps://review.openstack.org/#/c/57447/10/nova/api/openstack/wsgi.py line:962\n\nThe default value here will tell the developer it\u0027s effective, but actually it\u0027s not. \nSo I think no default value here may be better. \n\nand I have a more detail explanation in : https://review.openstack.org/#/c/57447/6/nova/api/openstack/compute/plugins/v3/consoles.py","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":114,"context_line":"        return _translate_detail_keys(console)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def update(self, req, server_id, id, body):"},{"line_number":117,"context_line":"        \"\"\"You can\u0027t update a console.\"\"\""},{"line_number":118,"context_line":"        raise exc.HTTPNotImplemented()"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84E4%3D","line":116,"updated":"2013-12-19 09:29:59.000000000","message":"ditto","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/api/openstack/compute/plugins/v3/consoles.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"4637d71bdc0560c2ff804a885ecaae7678c2ddf3","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @extensions.expected_errors(404)"},{"line_number":65,"context_line":"    @wsgi.response(201)"},{"line_number":66,"context_line":"    def create(self, req, server_id, body\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            self.console_api.create_console("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9lDs%3D","line":66,"updated":"2013-12-10 01:39:22.000000000","message":"rather than adding a default value I think it\u0027d be better to just fix the testcases to pass an empty body in","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"9faeb6df69ee3b9dcd2a4e47854a76e296f60b00","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @extensions.expected_errors(404)"},{"line_number":65,"context_line":"    @wsgi.response(201)"},{"line_number":66,"context_line":"    def create(self, req, server_id, body\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            self.console_api.create_console("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9eGU%3D","line":66,"in_reply_to":"AAAATn%2F9hpU%3D","updated":"2013-12-11 14:53:23.000000000","message":"Because there are some decorators, we still can\u0027t get parameters of the original method via method.func_code.co_varnames. will roll back to this patch set.","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"d0f31cdd4b135f8512a64b8f11911f0d93d99e6d","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @extensions.expected_errors(404)"},{"line_number":65,"context_line":"    @wsgi.response(201)"},{"line_number":66,"context_line":"    def create(self, req, server_id, body\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            self.console_api.create_console("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9hpU%3D","line":66,"in_reply_to":"AAAATn%2F9imo%3D","updated":"2013-12-10 15:39:45.000000000","message":"sorry, we can get the method parameters before call it. will change it.","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"773d52670a8a38993f7d71f73655b5f2455a19fc","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @extensions.expected_errors(404)"},{"line_number":65,"context_line":"    @wsgi.response(201)"},{"line_number":66,"context_line":"    def create(self, req, server_id, body\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            self.console_api.create_console("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9imo%3D","line":66,"in_reply_to":"AAAATn%2F9lDs%3D","updated":"2013-12-10 13:30:12.000000000","message":"hi, Chris. \nWe must add the parameter here.\nIf we want to pass the empty body into controller, \nwe need add default value: body\u003d\"\" , when there is no content body with the request.\n \nhttps://review.openstack.org/#/c/57447/6/nova/api/openstack/wsgi.py#L976\n\nSo if there is no the parameter: body in this method, it will raise:\n\"got an unexpected keyword argument \u0027body\u0027\"\n\nWe can\u0027t know which method have the parameter: body, before we call it in :\n\nhttps://review.openstack.org/#/c/57447/6/nova/api/openstack/wsgi.py#1807\n\nI consider the http request method: PUT and POST should go with the content body\n\nIf no, we will add the default value \"\" for it. And ignore the content body when the request method is GET or DELETE.\n\nBut the default value will no effect here, it will override by \"\". I will update the \"\" to None as the default value in wsgi.py, and remove the None here.","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @extensions.expected_errors(404)"},{"line_number":65,"context_line":"    @wsgi.response(201)"},{"line_number":66,"context_line":"    def create(self, req, server_id, body):"},{"line_number":67,"context_line":"        \"\"\"Creates a new console.\"\"\""},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            self.console_api.create_console("}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84Es%3D","line":66,"updated":"2013-12-19 09:29:59.000000000","message":"body\u003dNone","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/api/openstack/extensions.py":[{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"d3f798ac92b0ad9ec2399b87b2289c017381804a","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                    # converts NotAuthorized to HTTPForbidden"},{"line_number":485,"context_line":"                    raise"},{"line_number":486,"context_line":"                elif isinstance(exc, TypeError):"},{"line_number":487,"context_line":"                    msg \u003d _(\"Request with wrong number of parameters\")"},{"line_number":488,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"                LOG.exception(_(\"Unexpected exception in API method\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BuM4%3D","line":487,"updated":"2013-11-21 03:39:12.000000000","message":"I don\u0027t think TypeError means \"Request with wrong number of parameters\".","commit_id":"a19ee986b1d68cb3ba06c32b41cd9d67390bad3a"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"b74df320c84f31da554cab4ecc5b461a63c9aacb","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                    # converts NotAuthorized to HTTPForbidden"},{"line_number":485,"context_line":"                    raise"},{"line_number":486,"context_line":"                elif isinstance(exc, TypeError):"},{"line_number":487,"context_line":"                    msg \u003d _(\"Request with wrong number of parameters\")"},{"line_number":488,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"                LOG.exception(_(\"Unexpected exception in API method\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BtnQ%3D","line":487,"in_reply_to":"AAAATn%2F%2BuM4%3D","updated":"2013-11-21 08:02:53.000000000","message":"thanks for you review. I think here is just handle the case Request with wrong number of parameters, other TypeError should be caught in the action and raise WSGIHTTPException.  Any suggestions to the explanation msg?","commit_id":"a19ee986b1d68cb3ba06c32b41cd9d67390bad3a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def delete(self, req, id):"},{"line_number":170,"context_line":"        raise webob.exc.HTTPNotFound()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def create(self, req, body):"},{"line_number":173,"context_line":"        raise webob.exc.HTTPNotFound()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84Eg%3D","line":172,"updated":"2013-12-19 09:29:59.000000000","message":"body\u003dNone","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/api/openstack/wsgi.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a2202bc6334ebb8606128fa93296817b6ac7011a","unresolved":false,"context_lines":[{"line_number":844,"context_line":""},{"line_number":845,"context_line":"        if len(request.body) \u003c\u003d 0:"},{"line_number":846,"context_line":"            LOG.debug(_(\"Empty body provided in request\"))"},{"line_number":847,"context_line":"            return content_type, \u0027\u0027"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        return content_type, request.body"},{"line_number":850,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Boeg%3D","line":847,"updated":"2013-11-22 08:53:24.000000000","message":"From the line 845-847 can be removed. line 849 will return same thing.","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"3b7d2c1e3a2fbc56fd8bc53e026e026514eb73b2","unresolved":false,"context_lines":[{"line_number":844,"context_line":""},{"line_number":845,"context_line":"        if len(request.body) \u003c\u003d 0:"},{"line_number":846,"context_line":"            LOG.debug(_(\"Empty body provided in request\"))"},{"line_number":847,"context_line":"            return content_type, \u0027\u0027"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        return content_type, request.body"},{"line_number":850,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bn6s%3D","line":847,"in_reply_to":"AAAATn%2F%2Boeg%3D","updated":"2013-11-22 10:16:37.000000000","message":"yes? it can be removed, just want to keep the log. and will remove it","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"4637d71bdc0560c2ff804a885ecaae7678c2ddf3","unresolved":false,"context_lines":[{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return None"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def _should_with_body(self, request):"},{"line_number":921,"context_line":"        return request.method in _METHODS_WITH_BODY"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    @webob.dec.wsgify(RequestClass\u003dRequest)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9lCI%3D","line":920,"updated":"2013-12-10 01:39:22.000000000","message":"perhaps rename it to _should_have_body?","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"773d52670a8a38993f7d71f73655b5f2455a19fc","unresolved":false,"context_lines":[{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return None"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def _should_with_body(self, request):"},{"line_number":921,"context_line":"        return request.method in _METHODS_WITH_BODY"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    @webob.dec.wsgify(RequestClass\u003dRequest)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9iiA%3D","line":920,"in_reply_to":"AAAATn%2F9lCI%3D","updated":"2013-12-10 13:30:12.000000000","message":"done","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"}],"nova/tests/api/openstack/compute/plugins/v3/test_consoles.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.stubs.Set(console.api.API, \u0027create_console\u0027, fake_create_console)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        req \u003d fakes.HTTPRequestV3.blank(self.url)"},{"line_number":146,"context_line":"        self.controller.create(req, self.uuid, None)"},{"line_number":147,"context_line":"        self.assertEqual(self.controller.create.wsgi_code, 201)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_create_console_unknown_instance(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84Fs%3D","line":146,"updated":"2013-12-19 09:29:59.000000000","message":"why not set the default as None, then you will have to update this","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequestV3.blank(self.url)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPNotFound, self.controller.create,"},{"line_number":156,"context_line":"                          req, self.uuid, None)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_show_console(self):"},{"line_number":159,"context_line":"        def fake_get_console(cons_self, context, instance_id, console_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84Fo%3D","line":156,"updated":"2013-12-19 09:29:59.000000000","message":"ditto","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/tests/api/openstack/compute/test_consoles.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        self.stubs.Set(console.api.API, \u0027create_console\u0027, fake_create_console)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.url)"},{"line_number":147,"context_line":"        self.controller.create(req, self.uuid, None)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_show_console(self):"},{"line_number":150,"context_line":"        def fake_get_console(cons_self, context, instance_id, console_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84Fk%3D","line":147,"updated":"2013-12-19 09:29:59.000000000","message":"ditto","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/tests/api/openstack/compute/test_extensions.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"4637d71bdc0560c2ff804a885ecaae7678c2ddf3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def index(self, req):"},{"line_number":50,"context_line":"        return self.body"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def create(self, req, body\u003dNone):"},{"line_number":53,"context_line":"        msg \u003d \u0027All aboard the fail train!\u0027"},{"line_number":54,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9lCM%3D","line":52,"updated":"2013-12-10 01:39:22.000000000","message":"I don\u0027t think the default value is needed here either","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"773d52670a8a38993f7d71f73655b5f2455a19fc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def index(self, req):"},{"line_number":50,"context_line":"        return self.body"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def create(self, req, body\u003dNone):"},{"line_number":53,"context_line":"        msg \u003d \u0027All aboard the fail train!\u0027"},{"line_number":54,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9ifg%3D","line":52,"in_reply_to":"AAAATn%2F9lCM%3D","updated":"2013-12-10 13:30:12.000000000","message":"the same reason in the console controller.","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aabd779251b741c2f8d6e7344bcb748e31761c27","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def index(self, req):"},{"line_number":50,"context_line":"        return self.body"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def create(self, req, body):"},{"line_number":53,"context_line":"        msg \u003d \u0027All aboard the fail train!\u0027"},{"line_number":54,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F84FU%3D","line":52,"updated":"2013-12-19 09:29:59.000000000","message":"body \u003d None","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}],"nova/tests/api/openstack/test_wsgi.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a2202bc6334ebb8606128fa93296817b6ac7011a","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                  content_type\u003d\u0027application/json\u0027)"},{"line_number":333,"context_line":"        req.body \u003d \u0027\u0027"},{"line_number":334,"context_line":"        response \u003d req.get_response(app)"},{"line_number":335,"context_line":"        self.assertEqual(response.status_int, 400)"},{"line_number":336,"context_line":"        req.body \u003d \u0027{\"body\": {\"key\": \"value\"}}\u0027"},{"line_number":337,"context_line":"        response \u003d req.get_response(app)"},{"line_number":338,"context_line":"        self.assertEqual(response.body, \u0027success\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BoS8%3D","line":335,"updated":"2013-11-22 08:53:24.000000000","message":"This looks like didn\u0027t really test the case you want to fix. Because before it returned 400 too.","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f20d2270a29893d7250041c675ba83b58a19179d","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                  content_type\u003d\u0027application/json\u0027)"},{"line_number":333,"context_line":"        req.body \u003d \u0027\u0027"},{"line_number":334,"context_line":"        response \u003d req.get_response(app)"},{"line_number":335,"context_line":"        self.assertEqual(response.status_int, 400)"},{"line_number":336,"context_line":"        req.body \u003d \u0027{\"body\": {\"key\": \"value\"}}\u0027"},{"line_number":337,"context_line":"        response \u003d req.get_response(app)"},{"line_number":338,"context_line":"        self.assertEqual(response.body, \u0027success\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BnTw%3D","line":335,"in_reply_to":"AAAATn%2F%2Bn50%3D","updated":"2013-11-22 13:31:59.000000000","message":"I run this testcase after remove your change for wsgi, then this test still can pass. We need assert the parameter body passed as empty dict.","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"58c53214667a1bd0ff398b4fcac5c7061df8aed7","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                  content_type\u003d\u0027application/json\u0027)"},{"line_number":333,"context_line":"        req.body \u003d \u0027\u0027"},{"line_number":334,"context_line":"        response \u003d req.get_response(app)"},{"line_number":335,"context_line":"        self.assertEqual(response.status_int, 400)"},{"line_number":336,"context_line":"        req.body \u003d \u0027{\"body\": {\"key\": \"value\"}}\u0027"},{"line_number":337,"context_line":"        response \u003d req.get_response(app)"},{"line_number":338,"context_line":"        self.assertEqual(response.body, \u0027success\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bj64%3D","line":335,"in_reply_to":"AAAATn%2F%2BnTw%3D","updated":"2013-11-23 10:31:58.000000000","message":"oh, I forget it. \nFor v3 api,  the response code is changed from 500 to 400.\nbut for v2 api, it is always 400, just the response message have been changed.\n\nSo, I just still need check the response body.","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"3b7d2c1e3a2fbc56fd8bc53e026e026514eb73b2","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                  content_type\u003d\u0027application/json\u0027)"},{"line_number":333,"context_line":"        req.body \u003d \u0027\u0027"},{"line_number":334,"context_line":"        response \u003d req.get_response(app)"},{"line_number":335,"context_line":"        self.assertEqual(response.status_int, 400)"},{"line_number":336,"context_line":"        req.body \u003d \u0027{\"body\": {\"key\": \"value\"}}\u0027"},{"line_number":337,"context_line":"        response \u003d req.get_response(app)"},{"line_number":338,"context_line":"        self.assertEqual(response.body, \u0027success\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bn50%3D","line":335,"in_reply_to":"AAAATn%2F%2BoS8%3D","updated":"2013-11-22 10:16:37.000000000","message":"here, it should return 400 due to without body.\nnext case, the body will be added, it will return 200.","commit_id":"74d12370b3abdac3b5ad810a6429d65b82bae265"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"4637d71bdc0560c2ff804a885ecaae7678c2ddf3","unresolved":false,"context_lines":[{"line_number":303,"context_line":""},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"class ResourceTest(test.NoDBTestCase):"},{"line_number":306,"context_line":"    def test_resource_call_with_different_method(self):"},{"line_number":307,"context_line":"        expected_body \u003d {}"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        class Controller(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9lAc%3D","line":306,"updated":"2013-12-10 01:39:22.000000000","message":"I think this test should be split into separate get/put/post/delete ones rather than all in one testcase","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"773d52670a8a38993f7d71f73655b5f2455a19fc","unresolved":false,"context_lines":[{"line_number":303,"context_line":""},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"class ResourceTest(test.NoDBTestCase):"},{"line_number":306,"context_line":"    def test_resource_call_with_different_method(self):"},{"line_number":307,"context_line":"        expected_body \u003d {}"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        class Controller(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9ifQ%3D","line":306,"in_reply_to":"AAAATn%2F9lAc%3D","updated":"2013-12-10 13:30:12.000000000","message":"Done","commit_id":"26714aa58f52506de3bcce5bfa5fe20849750d23"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30be77669dba2c6c73ec4fb65acfbf9f8831c53","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        response \u003d req.get_response(app)"},{"line_number":341,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":342,"context_line":"        self.assertEqual(response.status_int, 200)"},{"line_number":343,"context_line":"        req.conten_type \u003d \u0027application/json\u0027"},{"line_number":344,"context_line":"        response \u003d req.get_response(app)"},{"line_number":345,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":346,"context_line":"        self.assertEqual(response.status_int, 200)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F8460%3D","line":343,"updated":"2013-12-19 05:57:24.000000000","message":"typo s/conten_type/content_type/\n\nbut it isn\u0027t failing any test because none of the tests that check content type are using GET. Maybe use the same pattern as the below test_resource_call_with_method_post where you create the webob.Request.blank(content_type\u003d\u0027application/json\u0027). And also check content type for the GET too i.e. make the POST and GET tests more similar in general.","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"2a000faa4b089203820ff0984d33371aa800bdb3","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        response \u003d req.get_response(app)"},{"line_number":341,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":342,"context_line":"        self.assertEqual(response.status_int, 200)"},{"line_number":343,"context_line":"        req.conten_type \u003d \u0027application/json\u0027"},{"line_number":344,"context_line":"        response \u003d req.get_response(app)"},{"line_number":345,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":346,"context_line":"        self.assertEqual(response.status_int, 200)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F8zVw%3D","line":343,"in_reply_to":"AAAATn%2F8460%3D","updated":"2013-12-20 06:40:56.000000000","message":"DONE\nit isn\u0027t failing because the content_type will be ignored when the request method is GET or DELETE.","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"},{"author":{"_account_id":5586,"name":"Ivan-Zhu","email":"zhubo198511@gmail.com","username":"ivan-zhu"},"change_message_id":"0de053769bbec070873a9c66f95e20530730c4d1","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        response \u003d req.get_response(app)"},{"line_number":341,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":342,"context_line":"        self.assertEqual(response.status_int, 200)"},{"line_number":343,"context_line":"        req.conten_type \u003d \u0027application/json\u0027"},{"line_number":344,"context_line":"        response \u003d req.get_response(app)"},{"line_number":345,"context_line":"        self.assertEqual(response.body, \u0027off\u0027)"},{"line_number":346,"context_line":"        self.assertEqual(response.status_int, 200)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F8tzo%3D","line":343,"in_reply_to":"AAAATn%2F8zVw%3D","updated":"2013-12-21 13:13:06.000000000","message":"Because there is no content-body with request GET or DELETE.  the content-type is no effective, we needn\u0027t check it.","commit_id":"0ff9955208621339bed9660ce1bbdba7e4b48c9c"}]}
