)]}'
{"etc/api-paste.ini":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"ec36ed18d30eb6b6f14045ff818be4ecd93c93bd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"paste.app_factory \u003d searchlight.api.v1.router:API.factory"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[filter:faultwrap]"},{"line_number":20,"context_line":"paste.filter_factory \u003d searchlight.api.middleware.fault:FaultWrapper.factory"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"[filter:versionnegotiation]"},{"line_number":23,"context_line":"paste.filter_factory \u003d searchlight.api.middleware.version_negotiation:VersionNegotiationFilter.factory"}],"source_content_type":"text/x-properties","patch_set":1,"id":"fa69d971_ac0c0743","line":20,"updated":"2016-01-08 07:10:43.000000000","message":"searchlight.api.middleware.fault doesn\u0027t exist","commit_id":"30d13d6ec4d195ba47a84f13a130384066daa667"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"dabd1979d6d539c52b2c70c9a1c12ccbe7f6f66f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"paste.app_factory \u003d searchlight.api.v1.router:API.factory"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[filter:faultwrap]"},{"line_number":20,"context_line":"paste.filter_factory \u003d searchlight.api.middleware.fault:FaultWrapper.factory"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"[filter:versionnegotiation]"},{"line_number":23,"context_line":"paste.filter_factory \u003d searchlight.api.middleware.version_negotiation:VersionNegotiationFilter.factory"}],"source_content_type":"text/x-properties","patch_set":1,"id":"fa69d971_8b5ea6e7","line":20,"in_reply_to":"fa69d971_ac0c0743","updated":"2016-01-08 15:42:41.000000000","message":"Oops :(   Added it to the latest patchset.","commit_id":"30d13d6ec4d195ba47a84f13a130384066daa667"}],"searchlight/api/middleware/context.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                catalog_header \u003d req.headers.get(\u0027X-Service-Catalog\u0027)"},{"line_number":117,"context_line":"                service_catalog \u003d jsonutils.loads(catalog_header)"},{"line_number":118,"context_line":"            except ValueError:"},{"line_number":119,"context_line":"                raise exception.SearchlightException("},{"line_number":120,"context_line":"                    _(\u0027Invalid service catalog json.\u0027))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_05716ae0","line":119,"updated":"2016-01-13 00:27:48.000000000","message":"Generic exceptions can be harder to programmatically handle. I\u0027m not sure this needs its own exception, but it does strike me that this actually should be a bad request exception.  All we are doing is getting a header and parsing the json. The only way it should fail is if the request was bad, right?","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0287ed4f914942479ba9379e4ab35545c18a9932","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                catalog_header \u003d req.headers.get(\u0027X-Service-Catalog\u0027)"},{"line_number":117,"context_line":"                service_catalog \u003d jsonutils.loads(catalog_header)"},{"line_number":118,"context_line":"            except ValueError:"},{"line_number":119,"context_line":"                raise exception.SearchlightException("},{"line_number":120,"context_line":"                    _(\u0027Invalid service catalog json.\u0027))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_9a5e1411","line":119,"in_reply_to":"da6ed579_05716ae0","updated":"2016-01-13 01:53:20.000000000","message":"it did just occur to me that this is likely being added by the keystone middleware, which would mean a server side error.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"36320d061c3edc98465af0a97f60f167822c0377","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                catalog_header \u003d req.headers.get(\u0027X-Service-Catalog\u0027)"},{"line_number":117,"context_line":"                service_catalog \u003d jsonutils.loads(catalog_header)"},{"line_number":118,"context_line":"            except ValueError:"},{"line_number":119,"context_line":"                raise exception.SearchlightException("},{"line_number":120,"context_line":"                    _(\u0027Invalid service catalog json.\u0027))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_9b67d124","line":119,"in_reply_to":"da6ed579_9a5e1411","updated":"2016-01-13 16:28:31.000000000","message":"A ValueError implies the catalog\u0027s invalid, so i think an internal server error is probably ok. This middleware executes before the searchlight code sees the request at all. Arguably this is unnecessary, but i suspect there may have been circumstances under which keystone would return e.g. an html error page. In any case, i haven\u0027t altered the behavior, and looking at it again i think the original behavior was ok.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"}],"searchlight/api/middleware/fault.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \u0027JsonPatchException\u0027: webob.exc.HTTPBadRequest,"},{"line_number":64,"context_line":"        \u0027InvalidJsonPatchBody\u0027: webob.exc.HTTPBadRequest,"},{"line_number":65,"context_line":"        \u0027InvalidJsonPatchPath\u0027: webob.exc.HTTPBadRequest,"},{"line_number":66,"context_line":"        \u0027InvalidQueryException\u0027: webob.exc.HTTPBadRequest,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _map_exception_to_error(self, class_exception):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_42af042a","line":66,"updated":"2016-01-11 06:41:11.000000000","message":"should be InvalidQuery","commit_id":"77b4236c05fac39baf3b81006f50434d7187cbd7"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d664d402dbf6d130d956b0fa683f000ea4bcebd0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \u0027JsonPatchException\u0027: webob.exc.HTTPBadRequest,"},{"line_number":64,"context_line":"        \u0027InvalidJsonPatchBody\u0027: webob.exc.HTTPBadRequest,"},{"line_number":65,"context_line":"        \u0027InvalidJsonPatchPath\u0027: webob.exc.HTTPBadRequest,"},{"line_number":66,"context_line":"        \u0027InvalidQueryException\u0027: webob.exc.HTTPBadRequest,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _map_exception_to_error(self, class_exception):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_c1ae6f2d","line":66,"in_reply_to":"fa69d971_42af042a","updated":"2016-01-11 17:53:45.000000000","message":"Done","commit_id":"77b4236c05fac39baf3b81006f50434d7187cbd7"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\"A middleware that turns exceptions into parsable string."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Inspired by Heat and Cinder\u0027s faultwrapper."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_6507061d","line":19,"updated":"2016-01-13 00:27:48.000000000","message":"Gotta love inspiration!","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        trace \u003d None"},{"line_number":85,"context_line":"        traceback_marker \u003d \u0027Traceback (most recent call last)\u0027"},{"line_number":86,"context_line":"        webob_exc \u003d None"},{"line_number":87,"context_line":"        if isinstance(ex, exception.HTTPExceptionDisguise):"},{"line_number":88,"context_line":"            # An HTTP exception was disguised so it could make it here"},{"line_number":89,"context_line":"            # let\u0027s remove the disguise and set the original HTTP exception"},{"line_number":90,"context_line":"            if cfg.CONF.debug:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_a0696cc0","line":87,"updated":"2016-01-13 00:27:48.000000000","message":"Ok, I see why the HTTPExceptionDisguise name here.  But wrapper still works here.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"}],"searchlight/api/v1/search.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        output \u003d super(RequestDeserializer, self).default(request)"},{"line_number":152,"context_line":"        if \u0027body\u0027 not in output:"},{"line_number":153,"context_line":"            msg \u003d _(\u0027Body expected in request.\u0027)"},{"line_number":154,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":155,"context_line":"        return output[\u0027body\u0027]"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_fd4fbd31","side":"PARENT","line":154,"updated":"2016-01-11 06:41:11.000000000","message":"should here map to some exception also?","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d664d402dbf6d130d956b0fa683f000ea4bcebd0","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        output \u003d super(RequestDeserializer, self).default(request)"},{"line_number":152,"context_line":"        if \u0027body\u0027 not in output:"},{"line_number":153,"context_line":"            msg \u003d _(\u0027Body expected in request.\u0027)"},{"line_number":154,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":155,"context_line":"        return output[\u0027body\u0027]"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_21642b20","side":"PARENT","line":154,"in_reply_to":"fa69d971_fd4fbd31","updated":"2016-01-11 17:53:45.000000000","message":"Yes, you\u0027re right, thanks for the catch. I\u0027ve substituted all the webob exceptions.","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        for key in cls._disallowed_properties:"},{"line_number":160,"context_line":"            if key in query:"},{"line_number":161,"context_line":"                msg \u003d _(\"Attribute \u0027%s\u0027 is read-only.\") % key"},{"line_number":162,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _get_available_resource_types(self):"},{"line_number":165,"context_line":"        return self.plugins.keys()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_7d5aedf3","side":"PARENT","line":162,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    def _validate_resource_type(self, resource_type):"},{"line_number":168,"context_line":"        if resource_type not in self._get_available_resource_types():"},{"line_number":169,"context_line":"            msg \u003d _(\"Resource type \u0027%s\u0027 is not supported.\") % resource_type"},{"line_number":170,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":171,"context_line":"        return resource_type"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _get_index_doc_types(self, resource_types):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_1d741166","side":"PARENT","line":170,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if index not in available_indices:"},{"line_number":194,"context_line":"            msg \u003d _(\"Index \u0027%s\u0027 is not supported.\") % index"},{"line_number":195,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        return index"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_3d71d576","side":"PARENT","line":195,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        if doc_type not in available_types:"},{"line_number":203,"context_line":"            msg \u003d _(\"Document type \u0027%s\u0027 is not supported.\") % doc_type"},{"line_number":204,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        return doc_type"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_dd69998d","side":"PARENT","line":204,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            offset \u003d int(offset)"},{"line_number":211,"context_line":"        except ValueError:"},{"line_number":212,"context_line":"            msg \u003d _(\"offset param must be an integer\")"},{"line_number":213,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if offset \u003c 0:"},{"line_number":216,"context_line":"            msg \u003d _(\"offset param must be positive\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_9d06c1cc","side":"PARENT","line":213,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if offset \u003c 0:"},{"line_number":216,"context_line":"            msg \u003d _(\"offset param must be positive\")"},{"line_number":217,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        return offset"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_bd0b85d5","side":"PARENT","line":217,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            limit \u003d int(limit)"},{"line_number":224,"context_line":"        except ValueError:"},{"line_number":225,"context_line":"            msg \u003d _(\"limit param must be an integer\")"},{"line_number":226,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if limit \u003c 1:"},{"line_number":229,"context_line":"            msg \u003d _(\"limit param must be positive\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_5d0cc9eb","side":"PARENT","line":226,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if limit \u003c 1:"},{"line_number":229,"context_line":"            msg \u003d _(\"limit param must be positive\")"},{"line_number":230,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return limit"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_7d118d03","side":"PARENT","line":230,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    def _validate_actions(self, actions):"},{"line_number":235,"context_line":"        if not actions:"},{"line_number":236,"context_line":"            msg \u003d _(\"actions param cannot be empty\")"},{"line_number":237,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        output \u003d []"},{"line_number":240,"context_line":"        allowed_action_types \u003d [\u0027create\u0027, \u0027update\u0027, \u0027delete\u0027, \u0027index\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_1dfbb1c2","side":"PARENT","line":237,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":254,"context_line":""},{"line_number":255,"context_line":"            if action_type not in allowed_action_types:"},{"line_number":256,"context_line":"                msg \u003d _(\"Invalid action type: \u0027%s\u0027\") % action_type"},{"line_number":257,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":258,"context_line":"            elif (action_type in [\u0027create\u0027, \u0027update\u0027, \u0027index\u0027] and"},{"line_number":259,"context_line":"                    not any([data, script])):"},{"line_number":260,"context_line":"                msg \u003d (_(\"Action type \u0027%s\u0027 requires data or script param.\") %"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_dd00b9ad","side":"PARENT","line":257,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    not any([data, script])):"},{"line_number":260,"context_line":"                msg \u003d (_(\"Action type \u0027%s\u0027 requires data or script param.\") %"},{"line_number":261,"context_line":"                       action_type)"},{"line_number":262,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":263,"context_line":"            elif action_type in [\u0027update\u0027, \u0027delete\u0027] and not document_id:"},{"line_number":264,"context_line":"                msg \u003d (_(\"Action type \u0027%s\u0027 requires ID of the document.\") %"},{"line_number":265,"context_line":"                       action_type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_9d2d6148","side":"PARENT","line":262,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            elif action_type in [\u0027update\u0027, \u0027delete\u0027] and not document_id:"},{"line_number":264,"context_line":"                msg \u003d (_(\"Action type \u0027%s\u0027 requires ID of the document.\") %"},{"line_number":265,"context_line":"                       action_type)"},{"line_number":266,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"            bulk_action \u003d {"},{"line_number":269,"context_line":"                \u0027_op_type\u0027: action_type,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_5d236958","side":"PARENT","line":266,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                                  \"from search plugin \""},{"line_number":305,"context_line":"                                  \"%(ext)s: %(e)s\") %"},{"line_number":306,"context_line":"                              {\u0027ext\u0027: plugin.name, \u0027e\u0027: e})"},{"line_number":307,"context_line":"                    raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"                if resource_type in resource_types:"},{"line_number":310,"context_line":"                    filter_query \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_3d1f9509","side":"PARENT","line":307,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            sort_order \u003d [sort_order]"},{"line_number":335,"context_line":"        elif not isinstance(sort_order, list):"},{"line_number":336,"context_line":"            msg \u003d _(\"\u0027sort\u0027 must be a string, dict or list\")"},{"line_number":337,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        def replace_sort_field(sort_field):"},{"line_number":340,"context_line":"            # Make some alterations for fields that have a \u0027raw\u0027 field so"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_dd1759ec","side":"PARENT","line":337,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                        return {field_name + \".raw\": sort_params}"},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                msg \u003d \"Unhandled sort type replacing \u0027%s\u0027\" % sort_field"},{"line_number":353,"context_line":"                raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":354,"context_line":"            return sort_field"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        return [replace_sort_field(f) for f in sort_order]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_fd149de9","side":"PARENT","line":353,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                if requested_type not in available_types:"},{"line_number":380,"context_line":"                    msg \u003d _(\"Resource type \u0027%s\u0027 is not in the list of enabled \""},{"line_number":381,"context_line":"                            \"plugins\") % requested_type"},{"line_number":382,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        available_indices \u003d self._get_available_indices(types)"},{"line_number":385,"context_line":"        if not indices:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_bdd94559","side":"PARENT","line":382,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                if requested_index not in available_indices:"},{"line_number":391,"context_line":"                    msg \u003d _(\"Index \u0027%s\u0027 is not in the list of enabled \""},{"line_number":392,"context_line":"                            \"plugins\") % requested_index"},{"line_number":393,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        if not isinstance(types, (list, tuple)):"},{"line_number":396,"context_line":"            types \u003d [types]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_7ddf4d3a","side":"PARENT","line":393,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                query_params[\u0027_source\u0027] \u003d _source"},{"line_number":416,"context_line":"            else:"},{"line_number":417,"context_line":"                msg \u003d _(\"\u0027_source\u0027 must be a string, dict or list\")"},{"line_number":418,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        if offset is not None:"},{"line_number":421,"context_line":"            query_params[\u0027offset\u0027] \u003d self._validate_offset(offset)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_1de971e6","side":"PARENT","line":418,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":449,"context_line":"                if not any([action[\u0027_index\u0027], default_index]):"},{"line_number":450,"context_line":"                    msg \u003d (_(\"Action index is missing and no default \""},{"line_number":451,"context_line":"                             \"index has been set.\"))"},{"line_number":452,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"                if not any([action[\u0027_type\u0027], default_type]):"},{"line_number":455,"context_line":"                    msg \u003d (_(\"Action document type is missing and no default \""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_ddee79ec","side":"PARENT","line":452,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"911f1728f04abce438b7a8f01d32fccd486b7516","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                if not any([action[\u0027_type\u0027], default_type]):"},{"line_number":455,"context_line":"                    msg \u003d (_(\"Action document type is missing and no default \""},{"line_number":456,"context_line":"                             \"type has been set.\"))"},{"line_number":457,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        query_params \u003d {"},{"line_number":460,"context_line":"            \u0027default_index\u0027: default_index,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_fdeb3dda","side":"PARENT","line":457,"updated":"2016-01-11 06:41:11.000000000","message":"same here","commit_id":"817db27afea32d5b19ce64e6ce433519665d8bc1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            except KeyError as e:"},{"line_number":74,"context_line":"                raise Exception(\"No registered plugin for type %s\" % e.message)"},{"line_number":75,"context_line":"            return result"},{"line_number":76,"context_line":"        except es_exc.RequestError:"},{"line_number":77,"context_line":"            raise exception.InvalidQuery(query\u003dquery)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def plugins_info(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_00a958df","line":76,"updated":"2016-01-13 00:27:48.000000000","message":"Very nice to see this cleanup.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"}],"searchlight/common/exception.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    a \u0027message\u0027 property. That message will get printf\u0027d"},{"line_number":35,"context_line":"    with the keyword arguments provided to the constructor."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    msg_format \u003d _(\"An unknown exception occurred\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, message\u003dNone, *args, **kwargs):"},{"line_number":40,"context_line":"        if not message:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_65c5c63a","line":37,"updated":"2016-01-13 00:27:48.000000000","message":"The documentation here is wrong now.  It references the \"message\" property.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        try:"},{"line_number":43,"context_line":"            self.message \u003d message % kwargs"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            if True or _FATAL_EXCEPTION_FORMAT_ERRORS:"},{"line_number":46,"context_line":"                raise"},{"line_number":47,"context_line":"            else:"},{"line_number":48,"context_line":"                # at least get the core message out if something happened"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_05b88ae4","line":45,"updated":"2016-01-13 00:27:48.000000000","message":"Ok, I\u0027m having a brain meltdown here, but this whole if block with the \"True\" part of the conditional kind of baffles me. Why even do the check and not just raise? What is the point of this conditional block?","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"623a7e53f0b89c5242f136e4e6970eac8736afad","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    a \u0027message\u0027 property. That message will get printf\u0027d"},{"line_number":35,"context_line":"    with the keyword arguments provided to the constructor."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    msg_format \u003d _(\"An unknown exception occurred\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, message\u003dNone, *args, **kwargs):"},{"line_number":40,"context_line":"        if not message:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_348bf969","line":37,"updated":"2016-01-15 01:41:41.000000000","message":"comment not addressed from PS 5\n\nhttps://review.openstack.org/#/c/263821/5..6/searchlight/common/exception.py","commit_id":"08ded4944599d7d9dc74e54d7704ba6872334a4a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9e1b7fc55bdf03eff49e2b58d7457498d47adf16","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    a \u0027message\u0027 property. That message will get printf\u0027d"},{"line_number":35,"context_line":"    with the keyword arguments provided to the constructor."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    msg_format \u003d _(\"An unknown exception occurred\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, message\u003dNone, *args, **kwargs):"},{"line_number":40,"context_line":"        if not message:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_da7dbf6d","line":37,"in_reply_to":"da6ed579_348bf969","updated":"2016-01-18 23:06:39.000000000","message":"Sorry, missed that one. Done.","commit_id":"08ded4944599d7d9dc74e54d7704ba6872334a4a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"623a7e53f0b89c5242f136e4e6970eac8736afad","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        try:"},{"line_number":43,"context_line":"            self.message \u003d message % kwargs"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            if True or _FATAL_EXCEPTION_FORMAT_ERRORS:"},{"line_number":46,"context_line":"                raise"},{"line_number":47,"context_line":"            else:"},{"line_number":48,"context_line":"                # at least get the core message out if something happened"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_d4ecdd2b","line":45,"updated":"2016-01-15 01:41:41.000000000","message":"comment not addressed from PS 5","commit_id":"08ded4944599d7d9dc74e54d7704ba6872334a4a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9e1b7fc55bdf03eff49e2b58d7457498d47adf16","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        try:"},{"line_number":43,"context_line":"            self.message \u003d message % kwargs"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            if True or _FATAL_EXCEPTION_FORMAT_ERRORS:"},{"line_number":46,"context_line":"                raise"},{"line_number":47,"context_line":"            else:"},{"line_number":48,"context_line":"                # at least get the core message out if something happened"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_3a197b22","line":45,"in_reply_to":"da6ed579_d4ecdd2b","updated":"2016-01-18 23:06:39.000000000","message":"I think this was test code left in; good catch. I\u0027m also not sure why the original code was setting self.message and self.msg.","commit_id":"08ded4944599d7d9dc74e54d7704ba6872334a4a"}],"searchlight/common/wsgi.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a4e9f2b6f47af18dff81ba575301ac3d10aa64de","unresolved":false,"context_lines":[{"line_number":861,"context_line":"            http_exc \u003d translate_exception(request, e)"},{"line_number":862,"context_line":"            # Don\u0027t let webob exceptions through because they\u0027re HTML-formatted"},{"line_number":863,"context_line":"            # Instead, we\u0027ll unwrap them in the \u0027fault\u0027 middleware"},{"line_number":864,"context_line":"            raise exception.HTTPExceptionDisguise(http_exc)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        try:"},{"line_number":867,"context_line":"            response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_c5227201","line":864,"updated":"2016-01-13 00:27:48.000000000","message":"So we add a fault wrap middleware, but then use this HTTPExceptionDisguise.  My preference would be to call it HTTPExceptionWrapper for naming consistency and ease of code tracing.","commit_id":"35c98ed4a7cf23800a6d171fe7d142b5c2f3f7e5"}]}
