)]}'
{"keystonemiddleware/ec2_token.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import hashlib"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import logging"},{"line_number":26,"context_line":"from oslo_config import cfg"},{"line_number":27,"context_line":"from oslo_serialization import jsonutils"},{"line_number":28,"context_line":"import requests"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_1bb88210","line":25,"updated":"2015-08-04 00:11:46.000000000","message":"This should be in the first group","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import hashlib"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import logging"},{"line_number":26,"context_line":"from oslo_config import cfg"},{"line_number":27,"context_line":"from oslo_serialization import jsonutils"},{"line_number":28,"context_line":"import requests"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_e81d43be","line":25,"in_reply_to":"3a50d1a3_1bb88210","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import webob.dec"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from keystonemiddleware.i18n import _, _LE"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"keystone_ec2_opts \u003d ["},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027http://localhost:5000/v2.0/ec2tokens\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_9b42520e","line":33,"updated":"2015-08-04 00:11:46.000000000","message":"Add an extra newline here","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import webob.dec"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from keystonemiddleware.i18n import _, _LE"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"keystone_ec2_opts \u003d ["},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027http://localhost:5000/v2.0/ec2tokens\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_c82087fa","line":33,"in_reply_to":"3a50d1a3_9b42520e","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @webob.dec.wsgify()"},{"line_number":120,"context_line":"    def __call__(self, req):"},{"line_number":121,"context_line":"        # NOTE(alevine) We need to calculate the hash here because"},{"line_number":122,"context_line":"        # subsequent access to request modifies the req.body so the hash"},{"line_number":123,"context_line":"        # calculation will yield invalid results."},{"line_number":124,"context_line":"        body_hash \u003d hashlib.sha256(req.body).hexdigest()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_4fa1e6a8","line":121,"updated":"2015-08-04 00:11:46.000000000","message":"(nit) should have a \u0027:\u0027 after the trailing \u0027)\u0027","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @webob.dec.wsgify()"},{"line_number":120,"context_line":"    def __call__(self, req):"},{"line_number":121,"context_line":"        # NOTE(alevine) We need to calculate the hash here because"},{"line_number":122,"context_line":"        # subsequent access to request modifies the req.body so the hash"},{"line_number":123,"context_line":"        # calculation will yield invalid results."},{"line_number":124,"context_line":"        body_hash \u003d hashlib.sha256(req.body).hexdigest()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_28248b0b","line":121,"in_reply_to":"1a4dcd0f_4fa1e6a8","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        elif CONF.keystone_ec2_token.certfile:"},{"line_number":175,"context_line":"            cert \u003d CONF.keystone_ec2_token.certfile"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        response \u003d requests.request(\u0027POST\u0027, CONF.keystone_ec2_token.url,"},{"line_number":178,"context_line":"                                    data\u003dcreds_json, headers\u003dheaders,"},{"line_number":179,"context_line":"                                    verify\u003dverify, cert\u003dcert)"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_ef923257","line":177,"updated":"2015-08-04 00:11:46.000000000","message":"is there any reason to change this?","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        elif CONF.keystone_ec2_token.certfile:"},{"line_number":175,"context_line":"            cert \u003d CONF.keystone_ec2_token.certfile"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        response \u003d requests.request(\u0027POST\u0027, CONF.keystone_ec2_token.url,"},{"line_number":178,"context_line":"                                    data\u003dcreds_json, headers\u003dheaders,"},{"line_number":179,"context_line":"                                    verify\u003dverify, cert\u003dcert)"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_e8ef83ae","line":177,"in_reply_to":"1a4dcd0f_ef923257","updated":"2015-08-04 05:49:15.000000000","message":"I\u0027ve changed this because I\u0027ve copied most code from nova (and this line too) where it works.\nBut I can revert it back to \u0027.post\u0027","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            token_id \u003d result[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":193,"context_line":"        except (AttributeError, KeyError):"},{"line_number":194,"context_line":"            msg \u003d _LE(\"Failure parsing response from keystone\")"},{"line_number":195,"context_line":"            self._logger.exception(msg)"},{"line_number":196,"context_line":"            return self._ec2_error_response(\"AuthFailure\", msg)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_0fe75ee5","line":194,"updated":"2015-08-04 00:11:46.000000000","message":"This should just use _ instead of _LE. If you were only using it for logging then this would be correct, but since it is used as a return value from this method _ is better. For more info take a look at: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            token_id \u003d result[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":193,"context_line":"        except (AttributeError, KeyError):"},{"line_number":194,"context_line":"            msg \u003d _LE(\"Failure parsing response from keystone\")"},{"line_number":195,"context_line":"            self._logger.exception(msg)"},{"line_number":196,"context_line":"            return self._ec2_error_response(\"AuthFailure\", msg)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_08274f13","line":194,"in_reply_to":"1a4dcd0f_0fe75ee5","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"b9a201ba6fc48b8fe760f99728b602c33f3f75fb","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        sig \u003d req.params.get(\u0027Signature\u0027) or req.params.get(\u0027X-Amz-Signature\u0027)"},{"line_number":94,"context_line":"        if sig is None and \u0027Authorization\u0027 in req.headers:"},{"line_number":95,"context_line":"            auth_str \u003d req.headers[\u0027Authorization\u0027]"},{"line_number":96,"context_line":"            sig \u003d auth_str.partition(\"Signature\u003d\")[2].split(\u0027,\u0027)[0]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        return sig"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a7b0d38_67bc096d","line":96,"range":{"start_line":96,"start_character":12,"end_line":96,"end_character":67},"updated":"2015-12-23 13:02:31.000000000","message":"oh gawd","commit_id":"9390329f07473cd791a18e9b55c3a573872cd268"}],"keystonemiddleware/tests/unit/test_ec2_token_middleware.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_0fdd1e42","line":1,"updated":"2015-08-04 00:11:46.000000000","message":"Is this because it was copied from somewhere else?","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_e87463fe","line":1,"in_reply_to":"1a4dcd0f_0fdd1e42","updated":"2015-08-04 05:49:15.000000000","message":"yes. I\u0027ve copied it from s3_token test. Should I change it?","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class FakeResponse(object):"},{"line_number":32,"context_line":"    reason \u003d \"Test Reason\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, status_code\u003d400, json\u003d{}):"},{"line_number":35,"context_line":"        self.status_code \u003d status_code"},{"line_number":36,"context_line":"        self._json \u003d json"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_feed84f0","line":34,"updated":"2015-08-04 00:11:46.000000000","message":"We shouldn\u0027t be using mutables as default args.","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class FakeResponse(object):"},{"line_number":32,"context_line":"    reason \u003d \"Test Reason\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, status_code\u003d400, json\u003d{}):"},{"line_number":35,"context_line":"        self.status_code \u003d status_code"},{"line_number":36,"context_line":"        self._json \u003d json"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_68a4d356","line":34,"in_reply_to":"3a50d1a3_feed84f0","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        req \u003d webob.Request.blank(\u0027/test\u0027)"},{"line_number":82,"context_line":"        req.GET[\u0027Signature\u0027] \u003d \u0027test-signature\u0027"},{"line_number":83,"context_line":"        req.GET[\u0027AWSAccessKeyId\u0027] \u003d \u0027test-key-id\u0027"},{"line_number":84,"context_line":"        body \u003d \u0027Action\u003dListUsers\u0026Version\u003d2010-05-08\u0027"},{"line_number":85,"context_line":"        if six.PY3:"},{"line_number":86,"context_line":"            body \u003d body.encode()"},{"line_number":87,"context_line":"        req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_9e42400e","line":84,"updated":"2015-08-04 00:11:46.000000000","message":"Why not just use the b\u0027\u0027 syntax so you don\u0027t have to check for Python version?","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        req \u003d webob.Request.blank(\u0027/test\u0027)"},{"line_number":82,"context_line":"        req.GET[\u0027Signature\u0027] \u003d \u0027test-signature\u0027"},{"line_number":83,"context_line":"        req.GET[\u0027AWSAccessKeyId\u0027] \u003d \u0027test-key-id\u0027"},{"line_number":84,"context_line":"        body \u003d \u0027Action\u003dListUsers\u0026Version\u003d2010-05-08\u0027"},{"line_number":85,"context_line":"        if six.PY3:"},{"line_number":86,"context_line":"            body \u003d body.encode()"},{"line_number":87,"context_line":"        req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_7325a4a9","line":84,"in_reply_to":"3a50d1a3_9e42400e","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        data \u003d jsonutils.loads(mock_request.call_args[1][\u0027data\u0027])"},{"line_number":98,"context_line":"        expected_data \u003d {"},{"line_number":99,"context_line":"            \"ec2Credentials\": {"},{"line_number":100,"context_line":"                \"access\": \"test-key-id\","},{"line_number":101,"context_line":"                \"headers\": {\"Host\": \"localhost:80\", \"Content-Length\": \"35\"},"},{"line_number":102,"context_line":"                \"host\": \"localhost:80\","}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3e73ec81","line":99,"updated":"2015-08-04 00:11:46.000000000","message":"Should be using \u0027 in these","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        data \u003d jsonutils.loads(mock_request.call_args[1][\u0027data\u0027])"},{"line_number":98,"context_line":"        expected_data \u003d {"},{"line_number":99,"context_line":"            \"ec2Credentials\": {"},{"line_number":100,"context_line":"                \"access\": \"test-key-id\","},{"line_number":101,"context_line":"                \"headers\": {\"Host\": \"localhost:80\", \"Content-Length\": \"35\"},"},{"line_number":102,"context_line":"                \"host\": \"localhost:80\","}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_6849338b","line":99,"in_reply_to":"3a50d1a3_3e73ec81","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f6f5842fc1e7e4fccbb9fb4f7473070418c4d493","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        data \u003d jsonutils.loads(mock_request.call_args[1][\u0027data\u0027])"},{"line_number":136,"context_line":"        expected_data \u003d {"},{"line_number":137,"context_line":"            \"ec2Credentials\": {"},{"line_number":138,"context_line":"                \"access\": \"test-key-id\","},{"line_number":139,"context_line":"                \"headers\": {\"Host\": \"localhost:80\","},{"line_number":140,"context_line":"                            \"Content-Length\": \"35\","}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_5ef7d8d2","line":137,"updated":"2015-08-04 00:11:46.000000000","message":"Same as above","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"7295500b32143c6376b00231c9c96cf6be2c0a40","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        data \u003d jsonutils.loads(mock_request.call_args[1][\u0027data\u0027])"},{"line_number":136,"context_line":"        expected_data \u003d {"},{"line_number":137,"context_line":"            \"ec2Credentials\": {"},{"line_number":138,"context_line":"                \"access\": \"test-key-id\","},{"line_number":139,"context_line":"                \"headers\": {\"Host\": \"localhost:80\","},{"line_number":140,"context_line":"                            \"Content-Length\": \"35\","}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_085f4f42","line":137,"in_reply_to":"3a50d1a3_5ef7d8d2","updated":"2015-08-04 05:49:15.000000000","message":"Done","commit_id":"f7f490c48b94fb8bf16ead235430c86bab2f3d3e"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"a1f01c1a1ccf1705649230248a03acef115d1185","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        super(EC2TokenMiddlewareTestBase, self).setUp()"},{"line_number":61,"context_line":"        self.middleware \u003d ec2_token.EC2Token(FakeApp(), {})"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _validate_ec2_error(self, response, http_status, ec2_code):"},{"line_number":64,"context_line":"        self.assertEqual(http_status, response.status_code,"},{"line_number":65,"context_line":"                         \u0027Expected HTTP status %s\u0027 % http_status)"},{"line_number":66,"context_line":"        root_e \u003d etree.XML(response.body)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_2beb99e0","line":63,"updated":"2015-11-27 14:33:27.000000000","message":"i\u0027d much rather just do a simple check to see if the ec2_code is in the response with a simple \"assertIn\" call, rather than pull in lxml for this one check, even if lxml is in test-requirements.","commit_id":"8ef8aaf510faed891e38c9f1a39a2980fbe1eecb"}]}
