)]}'
{"keystone/middleware/s3_token.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c58fcdd396e24da9998093235c84a4db26afa07c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2F1S0%3D","line":48,"updated":"2013-07-22 14:25:15.000000000","message":"Can we add some unit tests?","commit_id":"69c1a4768ed42db829eedbea6a1aa8830421a9ee"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"453bc62de44cdb7a7e6ddfba5ec07bdfd9adf3d9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        count \u003d len(segs)"},{"line_number":77,"context_line":"        if (segs[0] or count \u003c minsegs or count \u003e maxsegs or"},{"line_number":78,"context_line":"                \u0027\u0027 in segs[1:minsegs]):"},{"line_number":79,"context_line":"            raise ValueError(\u0027Invalid path: %s\u0027 % urllib.quote(path))"},{"line_number":80,"context_line":"    else:"},{"line_number":81,"context_line":"        minsegs +\u003d 1"},{"line_number":82,"context_line":"        maxsegs +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FxW4%3D","line":79,"updated":"2013-07-23 15:03:57.000000000","message":"lines 74 - 79 are common code with the below else statement. Thinking this should be pulled out so that it is outside of the if/else. That way if something is changed to the logic it only needs to be done in one place.","commit_id":"b47092cc8fa1d92ad890998d47b717b40c4fea8f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"5d76d212aac8a9d27b55247b93659570ca8934e8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        count \u003d len(segs)"},{"line_number":77,"context_line":"        if (segs[0] or count \u003c minsegs or count \u003e maxsegs or"},{"line_number":78,"context_line":"                \u0027\u0027 in segs[1:minsegs]):"},{"line_number":79,"context_line":"            raise ValueError(\u0027Invalid path: %s\u0027 % urllib.quote(path))"},{"line_number":80,"context_line":"    else:"},{"line_number":81,"context_line":"        minsegs +\u003d 1"},{"line_number":82,"context_line":"        maxsegs +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FxJU%3D","line":79,"in_reply_to":"AAAAQn%2F%2FxW4%3D","updated":"2013-07-23 15:57:39.000000000","message":"It\u0027s not same between two block codes:\n    73~75 vs 81~83: path.split first and not first\n    77~78 vs 85~87: count \u003e maxsegs [+1] and the follow one has one more condition\n    76 \u003d 84\n    79 \u003d 88","commit_id":"b47092cc8fa1d92ad890998d47b717b40c4fea8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9bec1c65e0c462ffd5bf907adbbd733c4cc9858c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2Fmf8%3D","line":48,"updated":"2013-07-26 18:46:47.000000000","message":"rather than copy-pasting, this should go into oslo-incubator.","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"6b6dd2de9c1dbf9ef3632c9e6fe99c126f086c90","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FTTU%3D","line":48,"in_reply_to":"AAAAQn%2F%2FVYo%3D","updated":"2013-08-02 08:54:37.000000000","message":"let me add a comment here","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e569c7eee54f7b69218270090cb31baa580c2e8b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FVYo%3D","line":48,"in_reply_to":"AAAAQn%2F%2Fgsc%3D","updated":"2013-08-01 20:21:02.000000000","message":"I\u0027m also fine with copying until oslo gets it.","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8311a91a600b9fdd5ee08124b2c03351ea57823b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2Fgsc%3D","line":48,"in_reply_to":"AAAAQn%2F%2FlgA%3D","updated":"2013-07-30 01:10:54.000000000","message":"Please submit it to oslo, but we can use it here until oslo gets it.","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"649ee313ee7d709b3d0f348c2debadf7768ceca4","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def split_path(path, minsegs\u003d1, maxsegs\u003dNone, rest_with_last\u003dFalse):"},{"line_number":49,"context_line":"    \"\"\"Validate and split the given HTTP request path."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    **Examples**::"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FlgA%3D","line":48,"in_reply_to":"AAAAQn%2F%2Fmf8%3D","updated":"2013-07-27 05:19:39.000000000","message":"really? this is just a swift-style split, why oslo get it for others? I prefer to put split_path in this s3_token.py \u003e keystone common place \u003e oslo (I\u0027ll email a core of oslo asking what does he think about this)","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9bec1c65e0c462ffd5bf907adbbd733c4cc9858c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def __init__(self, app, conf):"},{"line_number":102,"context_line":"        \"\"\"Common initialization code.\"\"\""},{"line_number":103,"context_line":"        self.app \u003d app"},{"line_number":104,"context_line":"        self.logger \u003d LOG"},{"line_number":105,"context_line":"        self.logger.debug(\u0027Starting the %s component\u0027 % PROTOCOL_NAME)"},{"line_number":106,"context_line":"        self.reseller_prefix \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH_\u0027)"},{"line_number":107,"context_line":"        # where to find the auth service (we use this to validate tokens)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FmfM%3D","line":104,"updated":"2013-07-26 18:46:47.000000000","message":"The bug report says that work has to happen on the swift side to use the standard logging mechanism. Has that been done already?","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"6b6dd2de9c1dbf9ef3632c9e6fe99c126f086c90","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def __init__(self, app, conf):"},{"line_number":102,"context_line":"        \"\"\"Common initialization code.\"\"\""},{"line_number":103,"context_line":"        self.app \u003d app"},{"line_number":104,"context_line":"        self.logger \u003d LOG"},{"line_number":105,"context_line":"        self.logger.debug(\u0027Starting the %s component\u0027 % PROTOCOL_NAME)"},{"line_number":106,"context_line":"        self.reseller_prefix \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH_\u0027)"},{"line_number":107,"context_line":"        # where to find the auth service (we use this to validate tokens)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FTTw%3D","line":104,"in_reply_to":"AAAAQn%2F%2Fgs4%3D","updated":"2013-08-02 08:54:37.000000000","message":"Yes, it\u0027s trying to follow origin style","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8311a91a600b9fdd5ee08124b2c03351ea57823b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def __init__(self, app, conf):"},{"line_number":102,"context_line":"        \"\"\"Common initialization code.\"\"\""},{"line_number":103,"context_line":"        self.app \u003d app"},{"line_number":104,"context_line":"        self.logger \u003d LOG"},{"line_number":105,"context_line":"        self.logger.debug(\u0027Starting the %s component\u0027 % PROTOCOL_NAME)"},{"line_number":106,"context_line":"        self.reseller_prefix \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH_\u0027)"},{"line_number":107,"context_line":"        # where to find the auth service (we use this to validate tokens)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2Fgs4%3D","line":104,"in_reply_to":"AAAAQn%2F%2Flf8%3D","updated":"2013-07-30 01:10:54.000000000","message":"is the above line such that you don\u0027t need to change everywhere that is currently using self.logger?","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"649ee313ee7d709b3d0f348c2debadf7768ceca4","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def __init__(self, app, conf):"},{"line_number":102,"context_line":"        \"\"\"Common initialization code.\"\"\""},{"line_number":103,"context_line":"        self.app \u003d app"},{"line_number":104,"context_line":"        self.logger \u003d LOG"},{"line_number":105,"context_line":"        self.logger.debug(\u0027Starting the %s component\u0027 % PROTOCOL_NAME)"},{"line_number":106,"context_line":"        self.reseller_prefix \u003d conf.get(\u0027reseller_prefix\u0027, \u0027AUTH_\u0027)"},{"line_number":107,"context_line":"        # where to find the auth service (we use this to validate tokens)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2Flf8%3D","line":104,"in_reply_to":"AAAAQn%2F%2FmfM%3D","updated":"2013-07-27 05:19:39.000000000","message":"I think adam young\u0027s original meaning is that swift is imported here but only use its get_logger function, and split_path function. That\u0027s not a good dependency. So he wants remove swift dependency and use a common logging here. So, do something in swift is not necessary. That\u0027s my thought, let me get him here.","commit_id":"bb34d9334dfd3dfe0f713d05d189320b1725e7d8"}],"tests/test_s3_token_middleware.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"453bc62de44cdb7a7e6ddfba5ec07bdfd9adf3d9","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class S3TokenMiddlewareTestUtil(unittest.TestCase):"},{"line_number":198,"context_line":"    def test_split_path(self):"},{"line_number":199,"context_line":"        self.assertRaises(ValueError, s3_token.split_path, \u0027\u0027)"},{"line_number":200,"context_line":"        self.assertRaises(ValueError, s3_token.split_path, \u0027/\u0027)"},{"line_number":201,"context_line":"        self.assertRaises(ValueError, s3_token.split_path, \u0027//\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FxV0%3D","line":198,"updated":"2013-07-23 15:03:57.000000000","message":"This is just a suggestion, but would it be more readable to split this test up into \u0027good\u0027 path and \u0027bad\u0027 path tests separately? Just thinking in the case that the logic in the method being tested fails, we have a lot of assertEquals and assertRaises here for one test. Thoughts?","commit_id":"b47092cc8fa1d92ad890998d47b717b40c4fea8f"}]}
