)]}'
{"keystone/common/validation/__init__.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"dfa86d8d7dc8a56a209e1052428d10f0eabd31dc","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        @functools.wraps(func)"},{"line_number":32,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":33,"context_line":"            if resource_to_validate in kwargs and kwargs.get("},{"line_number":34,"context_line":"                \u0027resource_to_validate\u0027):"},{"line_number":35,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":36,"context_line":"            return func(*args, **kwargs)"},{"line_number":37,"context_line":"        return wrapper"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_254c239d","line":34,"updated":"2015-07-02 09:54:32.000000000","message":"silly mistake here, it should be kwargs.get(resource_to_validate) instead, but this impact a lot of existing testcase as well.","commit_id":"848c9c9c7186c37d417418b8ae7e8db0f8911919"}],"keystone/tests/unit/test_v3_catalog.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"84c48bbcadb1aa9d8e70f8389dd0544378eddbad","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_44b101df","line":413,"updated":"2015-06-25 07:11:08.000000000","message":"while this is a fine test, should we maybe also test via the router, in terms of doing a self.patch() body\u0027{\u0027service\u0027: {}}, which is closer to simulating the user situation?","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a5ab577db3f3cd54637e4061f5b3592315de9d26","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_1ebd2568","line":413,"in_reply_to":"ba3cc151_ed3ec0b7","updated":"2015-06-30 09:53:50.000000000","message":"@Lance, thanks for the comments, in the case of updating service as what this patch intends to fix, we can provide the testcase for 1.), 2.)\n\nhttp://paste.openstack.org/show/327911/\n\nThe 3.) case, you know, may need some change in the validation layer, \n\nsee: https://review.openstack.org/#/c/195001/1/keystone/common/validation/__init__.py, this may fix the issue, but it will impact a lot of existing testcases, \n\nsee: http://logs.openstack.org/01/195001/1/check/gate-keystone-python27/e6d4940/console.html.gz#_2015-06-24_09_17_00_749\n\nSo, this is why I going to split the fixing into two part and let the 3.) be address after a serial patches.","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"2d7562b2c2876edc3af944845e3f039634b9712e","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_689885c0","line":413,"in_reply_to":"fa32b979_44b101df","updated":"2015-06-25 14:34:22.000000000","message":"@henry, good question. Actually, this patch can only fix the case when there is no body but not the case of when the body is *empty*.\n\nself.patch() is not used in this case since we want to capture exactly what\u0027s the error message is.\n\nCurrently, the exception thrown out when the body is *empty* is from class: `jsonschema.validators.extend` which is out of our control, \nsee: https://github.com/openstack/keystone/blob/master/keystone/common/validation/validators.py#L42\n\nWe can do something to improve it when the request body is empty, this need some change in wsgi.py, but change it will impact a lot of existed testcase.\n\nPossibly, a follow up patch will be proposed to address the case when the body is *empty* beside none if necessary and the refactoring for all of the impacted testcase.\n\nyour thoughts, pls?","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"dd63dd144fcf70b5d0d18f17f7aa89a893fd67bc","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_ed3ec0b7","line":413,"in_reply_to":"fa32b979_689885c0","updated":"2015-06-29 15:06:44.000000000","message":"I think there are three different failing cases to this.\n\n    1.) not sending a request body\n    2.) sending an empty request body\n    3.) sending a empty service request body\n\nWhich should all provider some sort of feedback to the user. Case 3 is the only one that does currently. \n\nhttp://cdn.pasteraw.com/awg47u10vnqxp93iisxcwbll5wx7pw1\n\nI think the first two cases should be tested in this patch.","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"5b7ded1758fd4f41ec8dd453adb9d2f38ff34959","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_f08457b2","line":413,"in_reply_to":"fa32b979_689885c0","updated":"2015-06-26 09:44:21.000000000","message":"Thanks for the explanation. Although I realise it might quite a lot of work, I\u0027d have thought we should be able to catch the error somehow, even if we have to mock something out.  However, if that is too complex, then I understand.  If we are going to leave it like this, however, we need to change the docstring, since we are not calling PATCH in this test method.","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0a36a776247476bd5a2a92889e0e30e000485d45","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        e \u003d self.assertRaises(exception.ValidationError,"},{"line_number":411,"context_line":"                              self.controller.update_service,"},{"line_number":412,"context_line":"                              dict(is_admin\u003dTrue),"},{"line_number":413,"context_line":"                              self.service_id)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # explicitly verify that the error message shows that a *service* is"},{"line_number":416,"context_line":"        # not in the request body."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b2980c1d","line":413,"in_reply_to":"fa32b979_f08457b2","updated":"2015-06-26 13:38:54.000000000","message":"@henry, you are right! pls expect a following up patch to fix it. I will address them in another patch after a serial fixing proposal, mock that is a good idea, but may not solve the issue if we don\u0027t change current IMPL, pls hold on. I am going to fix it, thanks.","commit_id":"9ff813c746b346c9263e1ecdc000c268234d49af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4aa65c618de760aaf66a5d7aa88c45f3d1f7bf63","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        self.assertIn("},{"line_number":418,"context_line":"            \u0027Expecting to find service in request body\u0027,"},{"line_number":419,"context_line":"            six.text_type(e))"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"    def test_delete_service(self):"},{"line_number":422,"context_line":"        \"\"\"Call ``DELETE /services/{service_id}``.\"\"\""},{"line_number":423,"context_line":"        self.delete(\u0027/services/%(service_id)s\u0027 % {"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_4dba4ce3","line":420,"updated":"2015-06-29 15:10:56.000000000","message":"I think we should add some tests showing nothing being passed to Keystone in a POST /v3/services call and asserting Keystone returns some useful info. We should do the same with an empty request. Validation of the service reference itself is done in the keystone/common/validation layer.\n\nhttp://cdn.pasteraw.com/ccnwm22dr9150hbvwpki2ceso7rlsbf","commit_id":"6bd7b87551bc1bf3f47fa389fcf9b40a4ea51572"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"d42897debad9b4c72809a4e3b73fc84768c17b91","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        self.assertIn("},{"line_number":418,"context_line":"            \u0027Expecting to find service in request body\u0027,"},{"line_number":419,"context_line":"            six.text_type(e))"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"    def test_delete_service(self):"},{"line_number":422,"context_line":"        \"\"\"Call ``DELETE /services/{service_id}``.\"\"\""},{"line_number":423,"context_line":"        self.delete(\u0027/services/%(service_id)s\u0027 % {"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_3e3589f6","line":420,"in_reply_to":"ba3cc151_4dba4ce3","updated":"2015-06-30 09:55:18.000000000","message":"see my reply in PS2, pls.","commit_id":"6bd7b87551bc1bf3f47fa389fcf9b40a4ea51572"}]}
