)]}'
{"glance/api/v1/images.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"e73c3fb943e3f422eeb9a916fba70a92ceb3acc0","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        image_meta \u003d redact_loc(image_meta)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"        try:"},{"line_number":906,"context_line":"            if hasattr(req.context, \u0027trust_id\u0027):"},{"line_number":907,"context_line":"                trust_auth.delete_trust(req.context.trust_id)"},{"line_number":908,"context_line":"        except Exception:"},{"line_number":909,"context_line":"            LOG.exception(_LE(\"Unable to delete trust %s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_3394d9e0","line":906,"updated":"2015-11-05 09:24:03.000000000","message":"I think we need debug messages here.","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"}],"glance/api/v1/upload_utils.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"e73c3fb943e3f422eeb9a916fba70a92ceb3acc0","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # after image upload."},{"line_number":97,"context_line":"    # If it\u0027s not possible to perform this operation then we will use the"},{"line_number":98,"context_line":"    # existing user token for all requests."},{"line_number":99,"context_line":"    try:"},{"line_number":100,"context_line":"        cxt.trust_id \u003d trust_auth.create_trust("},{"line_number":101,"context_line":"            cxt.auth_token, cxt.tenant)"},{"line_number":102,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_f3bc116e","line":99,"updated":"2015-11-05 09:24:03.000000000","message":"I think we need debug messages here.","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"1a68b842eb95a79eaf182e07805bb17a0ea323ee","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # after image upload."},{"line_number":97,"context_line":"    # If it\u0027s not possible to perform this operation then we will use the"},{"line_number":98,"context_line":"    # existing user token for all requests."},{"line_number":99,"context_line":"    try:"},{"line_number":100,"context_line":"        cxt.trust_id \u003d trust_auth.create_trust("},{"line_number":101,"context_line":"            cxt.auth_token, cxt.tenant)"},{"line_number":102,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_a22ce302","line":99,"in_reply_to":"fa80f949_f3bc116e","updated":"2015-11-10 12:35:29.000000000","message":"Hmm, maybe for testing...","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"599337a7e563c59dcf4d6f73f723dad12fc57e15","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            cxt.auth_token, cxt.tenant)"},{"line_number":102,"context_line":"    except Exception:"},{"line_number":103,"context_line":"        LOG.exception(_LE(\"Unable to create trust. \""},{"line_number":104,"context_line":"                          \"Use the existing user token.\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    try:"},{"line_number":107,"context_line":"        # By default image_data will be passed as CooperativeReader object."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_0674eefa","line":104,"updated":"2015-11-05 10:19:38.000000000","message":"Need to show original error message.","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"1a68b842eb95a79eaf182e07805bb17a0ea323ee","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            cxt.auth_token, cxt.tenant)"},{"line_number":102,"context_line":"    except Exception:"},{"line_number":103,"context_line":"        LOG.exception(_LE(\"Unable to create trust. \""},{"line_number":104,"context_line":"                          \"Use the existing user token.\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    try:"},{"line_number":107,"context_line":"        # By default image_data will be passed as CooperativeReader object."}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_c2080794","line":104,"in_reply_to":"fa80f949_0674eefa","updated":"2015-11-10 12:35:29.000000000","message":"Yup, I\u0027ll add it here","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"}],"glance/common/config.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"cea5868df095d8298a897d50cae060831538bf1a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                      \u0027supported by the version of OpenSSL on the platform.\u0027"},{"line_number":176,"context_line":"                      \u0027 Examples are \"sha1\", \"sha256\", \"sha512\", etc.\u0027)),"},{"line_number":177,"context_line":"    cfg.BoolOpt(\u0027use_trusts\u0027, default\u003dTrue,"},{"line_number":178,"context_line":"                help\u003d_(\"Create resources using trust token rather \""},{"line_number":179,"context_line":"                       \"than user\u0027s token\")),"},{"line_number":180,"context_line":"]"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_5182d801","line":178,"updated":"2015-10-28 09:47:39.000000000","message":"IMO, we need to describe here in more details where the trusts will be applicable i.e. when uploading images.","commit_id":"486615efc3ad9288b5bf5899d1fe5451952c73da"}],"glance/common/trust_auth.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"99eae41d20d997ff75c0b2a3e890fac7b9bba340","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    return keystone"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def get_client_for_trusts(trust_id\u003dNone):"},{"line_number":40,"context_line":"    settings \u003d _get_keystone_settings()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_1d053b79","line":39,"updated":"2015-10-14 12:29:12.000000000","message":"I see that we are passing admin login and password to client.\nNot sure it is good solution. Trusts are useful because they allows to not store username/password and generate tokens based on it, otherwise they are useless.","commit_id":"1d77d00feeb19a0af3a7e6b79e26ea06e171f950"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"e27dbb3338262f13d9cf314220bc843881059327","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    return keystone"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def get_client_for_trusts(trust_id\u003dNone):"},{"line_number":40,"context_line":"    settings \u003d _get_keystone_settings()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_7a678825","line":39,"in_reply_to":"5a2ca52d_1d053b79","updated":"2015-10-14 16:16:18.000000000","message":"I\u0027m not sure if you get this right... We use this function to generate admin\u0027s client.\n\nFirst time, we call it to get glance user_id, and second, when we provide trust_id there, to reauthenticate.\n\nPassing admin\u0027s login and password is absolutely normal and they do it in Murano and Heat as well. And also, trusts just allow to get user\u0027s token, but anyway we have to provide admin\u0027s credentials.","commit_id":"1d77d00feeb19a0af3a7e6b79e26ea06e171f950"},{"author":{"_account_id":16658,"name":"Darja Shakhray","email":"damalyavkina@gmail.com","username":"dshakhray"},"change_message_id":"fc828ffada2f38a96d111e93878ac6f4ee2b9b56","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _get_keystone_settings():"},{"line_number":85,"context_line":"    importutils.import_module(\u0027keystonemiddleware.auth_token\u0027)"},{"line_number":86,"context_line":"    return {"},{"line_number":87,"context_line":"        \u0027auth_url\u0027: CONF.keystone_authtoken.auth_uri.replace(\u0027v2.0\u0027, \u0027v3\u0027),"},{"line_number":88,"context_line":"        \u0027username\u0027: CONF.keystone_authtoken.admin_user,"},{"line_number":89,"context_line":"        \u0027password\u0027: CONF.keystone_authtoken.admin_password,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_8a54d454","line":86,"updated":"2015-10-18 12:38:21.000000000","message":"It doesn\u0027t look good. It would be better to create a variable and to return its value like","commit_id":"1d77d00feeb19a0af3a7e6b79e26ea06e171f950"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"cea5868df095d8298a897d50cae060831538bf1a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    return ks_client.Client(**kwargs)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def _get_client_for_trusts(trust_id\u003dNone):"},{"line_number":36,"context_line":"    settings \u003d _get_keystone_settings()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    kwargs \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_2c3fc3b5","line":35,"updated":"2015-10-28 09:47:39.000000000","message":"IMO, it would be better to have settings as input parameter for the func.\nIn this case you just need to provide correct kwargs but the dependency between functions would be more obvious.","commit_id":"486615efc3ad9288b5bf5899d1fe5451952c73da"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"23293d750223e5c87ab6d3143061cba955895fb7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    keystone_client.trusts.delete(trust_id)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def renew_token(trust_id):"},{"line_number":72,"context_line":"    return _get_client_for_trusts(trust_id).auth_token"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_2cd903f4","line":71,"updated":"2015-10-28 09:54:43.000000000","message":"I guess we need debug messages here because it simplifies programmer live:)","commit_id":"486615efc3ad9288b5bf5899d1fe5451952c73da"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"cea5868df095d8298a897d50cae060831538bf1a","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def _get_keystone_settings():"},{"line_number":76,"context_line":"    importutils.import_module(\u0027keystonemiddleware.auth_token\u0027)"},{"line_number":77,"context_line":"    return {"},{"line_number":78,"context_line":"        \u0027auth_url\u0027: CONF.keystone_authtoken.auth_uri + \u0027/v3\u0027,"},{"line_number":79,"context_line":"        \u0027username\u0027: CONF.keystone_authtoken.username,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_71403457","line":76,"updated":"2015-10-28 09:47:39.000000000","message":"I am wondering why we have hidden dependency here. What is the goal of this?","commit_id":"486615efc3ad9288b5bf5899d1fe5451952c73da"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"e73c3fb943e3f422eeb9a916fba70a92ceb3acc0","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    settings \u003d _get_keystone_settings()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    kwargs \u003d {"},{"line_number":44,"context_line":"        \u0027project_name\u0027: project_name,"},{"line_number":45,"context_line":"        \u0027trust_id\u0027: trust_id,"},{"line_number":46,"context_line":"        \u0027username\u0027: settings[\u0027username\u0027],"},{"line_number":47,"context_line":"        \u0027password\u0027: settings[\u0027password\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_8ed79abe","line":44,"updated":"2015-11-05 09:24:03.000000000","message":"Could you please explain why do we need project_name here?\nI think it doesn\u0027t need to be here because the scope is defined by trust.","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"1a68b842eb95a79eaf182e07805bb17a0ea323ee","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    settings \u003d _get_keystone_settings()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    kwargs \u003d {"},{"line_number":44,"context_line":"        \u0027project_name\u0027: project_name,"},{"line_number":45,"context_line":"        \u0027trust_id\u0027: trust_id,"},{"line_number":46,"context_line":"        \u0027username\u0027: settings[\u0027username\u0027],"},{"line_number":47,"context_line":"        \u0027password\u0027: settings[\u0027password\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_c28c8737","line":44,"in_reply_to":"fa80f949_8ed79abe","updated":"2015-11-10 12:35:29.000000000","message":"Before create trust, to get service user_id, we have to pass project_name there. See lines 68-69.","commit_id":"6f3420b67ffab2f119bcec3d1129dfe5b4ec2477"}]}
