)]}'
{"cinder/api/contrib/types_manage.py":[{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"a261e2a26539e3086278bf7c21d35e5db17034fb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                specs,"},{"line_number":85,"context_line":"                                is_public,"},{"line_number":86,"context_line":"                                description\u003ddescription)"},{"line_number":87,"context_line":"            vol_type \u003d volume_types.get_volume_type_by_name(context, name)"},{"line_number":88,"context_line":"            req.cache_resource(vol_type, name\u003d\u0027types\u0027)"},{"line_number":89,"context_line":"            self._notify_volume_type_info("},{"line_number":90,"context_line":"                context, \u0027volume_type.create\u0027, vol_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_e2425f67","line":87,"updated":"2016-02-01 22:43:01.000000000","message":"Do need the elevated context here.","commit_id":"7304eda4e9801d0add3f59c6e40f3f75d10a0f25"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"e27cf8ddbecdc86374815fa95195ba54a0533d55","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                specs,"},{"line_number":85,"context_line":"                                is_public,"},{"line_number":86,"context_line":"                                description\u003ddescription)"},{"line_number":87,"context_line":"            vol_type \u003d volume_types.get_volume_type_by_name(context, name)"},{"line_number":88,"context_line":"            req.cache_resource(vol_type, name\u003d\u0027types\u0027)"},{"line_number":89,"context_line":"            self._notify_volume_type_info("},{"line_number":90,"context_line":"                context, \u0027volume_type.create\u0027, vol_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_8fd7e4ec","line":87,"in_reply_to":"7a5de9d1_e2425f67","updated":"2016-02-02 16:34:46.000000000","message":"I noticed that no one elevated the context in api code. Seems volume/volume_types.py is appropriate place to elevate the context. Thanks.","commit_id":"7304eda4e9801d0add3f59c6e40f3f75d10a0f25"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"a261e2a26539e3086278bf7c21d35e5db17034fb","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            volume_types.update(context.elevated(), id, name, description,"},{"line_number":143,"context_line":"                                is_public\u003dis_public)"},{"line_number":144,"context_line":"            # Get the updated"},{"line_number":145,"context_line":"            vol_type \u003d volume_types.get_volume_type(context, id)"},{"line_number":146,"context_line":"            req.cache_resource(vol_type, name\u003d\u0027types\u0027)"},{"line_number":147,"context_line":"            self._notify_volume_type_info("},{"line_number":148,"context_line":"                context, \u0027volume_type.update\u0027, vol_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_82a4cb4a","line":145,"updated":"2016-02-01 22:43:01.000000000","message":"Do need the elevated context here.","commit_id":"7304eda4e9801d0add3f59c6e40f3f75d10a0f25"}],"cinder/volume/volume_types.py":[{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"cd118eb7f64b75e079d098c4861428ae59637dc2","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_a8a993e1","line":48,"updated":"2016-02-02 23:42:21.000000000","message":"I think you want to do the elevation of context over in the api but I think query calls also have to be elevated.","commit_id":"3655831f6c32cdbce455b6e82eddcd8bbb57ed1a"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"8f533a2c2d66ebef4eff0a148bb5e1e23768fb87","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_e84eab95","line":48,"in_reply_to":"5a5ae5dd_4826df17","updated":"2016-02-03 00:06:36.000000000","message":"Over on create there are two calls the create:\n   volume_types.create(context,\nFollowed by a query:\n   volume_types.get_volume_type_by_name(context, name)\n\nI think get_volume_type_by_name() needs the elevated context also","commit_id":"3655831f6c32cdbce455b6e82eddcd8bbb57ed1a"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"8f533a2c2d66ebef4eff0a148bb5e1e23768fb87","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_8843776c","line":48,"in_reply_to":"5a5ae5dd_a8a993e1","updated":"2016-02-03 00:06:36.000000000","message":"Done","commit_id":"3655831f6c32cdbce455b6e82eddcd8bbb57ed1a"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"c06f1cbe859fece228dc3b8cebb1bb69cd72571d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_4826df17","line":48,"in_reply_to":"5a5ae5dd_a8a993e1","updated":"2016-02-02 23:55:38.000000000","message":"What does this \"query calls\" mean?","commit_id":"3655831f6c32cdbce455b6e82eddcd8bbb57ed1a"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"43bec5b4e3e5579a2f28cb5bc24e17ccc7c3c772","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_6bdab57a","line":48,"in_reply_to":"5a5ae5dd_e84eab95","updated":"2016-02-03 00:17:08.000000000","message":"The get_volume_type_by_name() calls db.volume_type_get_by_name, and this method has @require_context decorator.\nThe decorator require_context requires *any* user or admin context. We don\u0027t need to escalated context for this.","commit_id":"3655831f6c32cdbce455b6e82eddcd8bbb57ed1a"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"6b1f709e8eadaba44049a1682704e03c24e0df7c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    projects \u003d projects or []"},{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        if not ctxt.is_admin:"},{"line_number":48,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        type_ref \u003d db.volume_type_create(ctxt,"},{"line_number":50,"context_line":"                                         dict(name\u003dname,"},{"line_number":51,"context_line":"                                              extra_specs\u003dextra_specs,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_e436cfb3","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":12},"updated":"2016-02-03 05:24:13.000000000","message":"It\u0027s better to move the line 47~48 before line 46. get_admin_context() doesn\u0027t need to be in the \"try\".","commit_id":"9d04c4993e68fd759a6a4c32e9be1fc1ad876fba"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"6b1f709e8eadaba44049a1682704e03c24e0df7c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":67,"context_line":"    try:"},{"line_number":68,"context_line":"        if not ctxt.is_admin:"},{"line_number":69,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":70,"context_line":"        type_updated \u003d db.volume_type_update(ctxt,"},{"line_number":71,"context_line":"                                             id,"},{"line_number":72,"context_line":"                                             dict(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_2455c7c5","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":44},"updated":"2016-02-03 05:24:13.000000000","message":"ditto.","commit_id":"9d04c4993e68fd759a6a4c32e9be1fc1ad876fba"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5fcea05c50392684913302d1e2f635a81de135d4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":68,"context_line":"    old_volume_type \u003d get_volume_type(ctxt, id)"},{"line_number":69,"context_line":"    if not ctxt.is_admin:"},{"line_number":70,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        type_updated \u003d db.volume_type_update(ctxt,"},{"line_number":73,"context_line":"                                             id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_9a69d38e","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":42},"updated":"2016-03-07 14:21:41.000000000","message":"Just a question - why we\u0027re getting here a completely new context instead of doing context.elevated() to preserve the information that already there? I don\u0027t really have a strong preference for using elevated(), just want to show that this way we\u0027re losing some information. Maybe it doesn\u0027t matter though?","commit_id":"f012655235c5356ac32c8b9059a7335ef95354d5"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"3dbc5ca6c5b8002149def3f9211777f37612d4e9","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":68,"context_line":"    old_volume_type \u003d get_volume_type(ctxt, id)"},{"line_number":69,"context_line":"    if not ctxt.is_admin:"},{"line_number":70,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        type_updated \u003d db.volume_type_update(ctxt,"},{"line_number":73,"context_line":"                                             id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_5fe20230","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":42},"in_reply_to":"5aef4532_9a69d38e","updated":"2016-03-09 20:07:39.000000000","message":"There are two reasons which I selected this way, but as you mentioned we can also use context.elevated() here. I\u0027ll update soon.\n\n- v2/types.py uses same way to get admin context.\n- User validation is done before calling this method, so keeping existing information in old context or creating new context doesn\u0027t matter, I thought.","commit_id":"f012655235c5356ac32c8b9059a7335ef95354d5"}],"releasenotes/notes/permit_volume_type_operations-b2e130fd7088f335.yaml":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"4602a08760792d114c5d593f495161e410bd52a5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Permit volume type operations for policy authorized users"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"dae33548_a659c200","line":3,"updated":"2016-02-16 19:20:48.000000000","message":"Can we get an explanation based on what you have in the commit message about how to use this change please?\n\nI.E.\n- To permit volume type operations for specific user, adds \"storage_type_admin\" role. - Adds \"admin_or_storage_type_admin\" rule to policy.json. \"admin_or_storage_type_admin\": \"is_admin:True or role:storage_type_admin\", - Modify rule for types_manage. \"volume_extension:types_manage\": \"rule:admin_or_storage_type_admin\",","commit_id":"6ad5388692f1aa9361401698a282d5486baa619d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5fcea05c50392684913302d1e2f635a81de135d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - This fix enables a cloud operator to manage policy for"},{"line_number":4,"context_line":"    volume type operations. To permit volume type operations"},{"line_number":5,"context_line":"    for specific user, for example;"},{"line_number":6,"context_line":"    Add \"storage_type_admin\" role."},{"line_number":7,"context_line":"    Add \"admin_or_storage_type_admin\" rule to policy.json."},{"line_number":8,"context_line":"        \"admin_or_storage_type_admin\"; \"is_admin:True or role:storage_type_admin\","},{"line_number":9,"context_line":"    Modify rule for types_manage."},{"line_number":10,"context_line":"        \"volume_extension:types_manage\"; \"rule:admin_or_storage_type_admin\","}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5aef4532_653708e4","line":10,"range":{"start_line":3,"start_character":0,"end_line":10,"end_character":76},"updated":"2016-03-07 14:21:41.000000000","message":"This looks awful when rendered [1]. Can you refer to reno\u0027s documentation [2] and make all the lines starting with \"Add\" and \"Modify\" a list? This would make the note a lot more readable. You can also denote code fragments by formatting using `` characters. For example ``\"storage_type_admin\"``.\n\nTo preview your note locally you can use \"tox -e releasenotes\" and look into cinder/releasenotes/build folder. Please note that reno uses git history, so you need to commit your changes before generating preview.\n\n[1] http://docs-draft.openstack.org/04/274204/7/check/gate-cinder-releasenotes/cef8814//releasenotes/build/html/unreleased.html#bug-fixes\n[2] http://docs.openstack.org/developer/reno/usage.html#formatting","commit_id":"f012655235c5356ac32c8b9059a7335ef95354d5"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"3dbc5ca6c5b8002149def3f9211777f37612d4e9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - This fix enables a cloud operator to manage policy for"},{"line_number":4,"context_line":"    volume type operations. To permit volume type operations"},{"line_number":5,"context_line":"    for specific user, for example;"},{"line_number":6,"context_line":"    Add \"storage_type_admin\" role."},{"line_number":7,"context_line":"    Add \"admin_or_storage_type_admin\" rule to policy.json."},{"line_number":8,"context_line":"        \"admin_or_storage_type_admin\"; \"is_admin:True or role:storage_type_admin\","},{"line_number":9,"context_line":"    Modify rule for types_manage."},{"line_number":10,"context_line":"        \"volume_extension:types_manage\"; \"rule:admin_or_storage_type_admin\","}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5aef4532_5f67a2b6","line":10,"range":{"start_line":3,"start_character":0,"end_line":10,"end_character":76},"in_reply_to":"5aef4532_653708e4","updated":"2016-03-09 20:07:39.000000000","message":"Will do.","commit_id":"f012655235c5356ac32c8b9059a7335ef95354d5"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2f1c60f8631aa6c951900eb6a1a237c2b82bf092","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This fix enables a cloud operator to manage policy for"},{"line_number":5,"context_line":"    volume type operations. To permit volume type operations"},{"line_number":6,"context_line":"    for specific user, for example;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    * Add \"storage_type_admin\" role."},{"line_number":9,"context_line":"    * Add \"admin_or_storage_type_admin\" rule to policy.json."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5aef4532_b85cc919","line":6,"range":{"start_line":4,"start_character":0,"end_line":6,"end_character":35},"updated":"2016-03-10 16:37:14.000000000","message":"This isn\u0027t a commit message. In the release notes reader has no context that helps him to understand what \"this fix\" means. Take a look [1]. That\u0027s a nit, but we can also use ``sth`` to properly format the code. So how about:\n\n ---\n fixes:\n   - |\n     Enabled a cloud operator to correctly manage policy for volume type\n     operations. To permit volume type operations for specific user you can for\n     example do as follows.\n\n     * Add ``storage_type_admin`` role.\n     * Add ``admin_or_storage_type_admin`` rule to ``policy.json``, e.g.\n           ``\"admin_or_storage_type_admin\": \"is_admin:True or role:storage_type_admin\",``\n     * Modify rule for types_manage and volume_type_access, e.g.\n           ``\"volume_extension:types_manage\"; \"rule:admin_or_storage_type_admin\",\n           \"volume_extension:volume_type_access:addProjectAccess\": \"rule:admin_or_storage_type_admin\",\n           \"volume_extension:volume_type_access:removeProjectAccess\": \"rule:admin_or_storage_type_admin\",``\n\n\n[1] http://docs-draft.openstack.org/04/274204/8/check/gate-cinder-releasenotes/3c2d197//releasenotes/build/html/unreleased.html","commit_id":"77405c566fa700fc3280a631b6f4021a29a13b5e"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"48de06ba8f2137ac5615aa540037c48d145564fb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This fix enables a cloud operator to manage policy for"},{"line_number":5,"context_line":"    volume type operations. To permit volume type operations"},{"line_number":6,"context_line":"    for specific user, for example;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    * Add \"storage_type_admin\" role."},{"line_number":9,"context_line":"    * Add \"admin_or_storage_type_admin\" rule to policy.json."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5aef4532_78f6c18f","line":6,"range":{"start_line":4,"start_character":0,"end_line":6,"end_character":35},"in_reply_to":"5aef4532_b85cc919","updated":"2016-03-10 16:40:56.000000000","message":"I agree. I\u0027ll update soon.","commit_id":"77405c566fa700fc3280a631b6f4021a29a13b5e"}]}
