)]}'
{"glance/api/v1/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9ddf42ff57007f4748adda292108193750edc42d","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        If the above constraint is violated, we reject with 400 \"Bad Request\"."},{"line_number":407,"context_line":"        \"\"\""},{"line_number":408,"context_line":"        if source:"},{"line_number":409,"context_line":"            for scheme in [\u0027s3\u0027, \u0027s3+http\u0027, \u0027s3+https\u0027,"},{"line_number":410,"context_line":"                           \u0027swift\u0027, \u0027swift+http\u0027, \u0027swift+https\u0027,"},{"line_number":411,"context_line":"                           \u0027http\u0027, \u0027https\u0027,"},{"line_number":412,"context_line":"                           \u0027rbd\u0027, \u0027sheepdog\u0027, \u0027cinder\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9kns%3D","line":409,"updated":"2013-12-10 04:02:23.000000000","message":"According to you are fixing this part, I thoughts is that: IMO we\u0027d better call store.get_schemes() to get correct schema prefix list which store supported, for example swift store is [1], the reason to me is that this way can prevent code duplication, and if we do the change in future we can just do it at one place, at store driver, but try to keep all positions in developer/reviewer\u0027s mind.\n\nget_store_from_scheme(\u0027swift\u0027).get_schemes()\n\n[1] https://github.com/openstack/glance/blob/master/glance/store/swift.py#L263","commit_id":"ec53fc097d9bb6b455f4d0602914bfe6c656146c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9ddf42ff57007f4748adda292108193750edc42d","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                           \u0027swift\u0027, \u0027swift+http\u0027, \u0027swift+https\u0027,"},{"line_number":411,"context_line":"                           \u0027http\u0027, \u0027https\u0027,"},{"line_number":412,"context_line":"                           \u0027rbd\u0027, \u0027sheepdog\u0027, \u0027cinder\u0027]:"},{"line_number":413,"context_line":"                if source.lower()[:source.find(\u0027:\u0027)] \u003d\u003d scheme:"},{"line_number":414,"context_line":"                    return source"},{"line_number":415,"context_line":"            msg \u003d _(\"External sourcing not supported for store %s\") % source"},{"line_number":416,"context_line":"            LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9kng%3D","line":413,"updated":"2013-12-10 04:02:23.000000000","message":"i prefer use urlparse:\n\npieces \u003d urlparse.urlparse(source)\npieces.scheme in [....]","commit_id":"ec53fc097d9bb6b455f4d0602914bfe6c656146c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa9c36ebbd03ae183a01bd0d39e13a92007fe7b1","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        Note the absence of file:// for security reasons, see LP bug #942118."},{"line_number":407,"context_line":"        If the above constraint is violated, we reject with 400 \"Bad Request\"."},{"line_number":408,"context_line":"        \"\"\""},{"line_number":409,"context_line":"        schemes \u003d [scheme for scheme in get_known_schemes()"},{"line_number":410,"context_line":"                   if scheme !\u003d \u0027file\u0027]"},{"line_number":411,"context_line":"        if source:"},{"line_number":412,"context_line":"            for scheme in schemes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9hxs%3D","line":409,"updated":"2013-12-10 15:22:57.000000000","message":"nit: i prefer move this line down to below \"if\" block.","commit_id":"cbb406381a8eaedadf9910441eebbd9e14566cff"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa9c36ebbd03ae183a01bd0d39e13a92007fe7b1","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                   if scheme !\u003d \u0027file\u0027]"},{"line_number":411,"context_line":"        if source:"},{"line_number":412,"context_line":"            for scheme in schemes:"},{"line_number":413,"context_line":"                if source.lower()[:source.find(\u0027:\u0027)] \u003d\u003d scheme:"},{"line_number":414,"context_line":"                    return source"},{"line_number":415,"context_line":"            msg \u003d _(\"External sourcing not supported for store %s\") % source"},{"line_number":416,"context_line":"            LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9hxI%3D","line":413,"updated":"2013-12-10 15:22:57.000000000","message":"Can you reply my comments which i posted in last PS? why you don\u0027t like go that way.\n\nhttps://review.openstack.org/#/c/60333/2/glance/api/v1/images.py","commit_id":"cbb406381a8eaedadf9910441eebbd9e14566cff"}],"glance/tests/unit/v1/test_api.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"f5996b74ad9a6fadb69feb3b187c9783d46cb1d0","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        fixture_headers \u003d {"},{"line_number":268,"context_line":"            \u0027x-image-meta-store\u0027: \u0027bad\u0027,"},{"line_number":269,"context_line":"            \u0027x-image-meta-name\u0027: \u0027bogus\u0027,"},{"line_number":270,"context_line":"            \u0027x-image-meta-location\u0027: \u0027http+swift://localhost:0/image.qcow2\u0027,"},{"line_number":271,"context_line":"            \u0027x-image-meta-disk-format\u0027: \u0027qcow2\u0027,"},{"line_number":272,"context_line":"            \u0027x-image-meta-container-format\u0027: \u0027bare\u0027,"},{"line_number":273,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9aU0%3D","line":270,"updated":"2013-12-11 20:05:11.000000000","message":"Can you use a more dramatic bad scheme here? Maybe just do \u0027bad+scheme://\u0027...\n\nI think that way it will be more obvious what this is testing to someone without any context.","commit_id":"ff246a0e15127189bbee3348be2982cc8c1714ee"}]}
