)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"921bb4f662aa6c83853d6d989dc222c405e837bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f3c9fb09_e4af69a6","updated":"2023-06-28 13:28:16.000000000","message":"run Pure Storage CI","commit_id":"f544b873ec1ca6684d6307254ab46bd27810a440"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"208f51d9b126f3e61a8fe515d701a2a07d25caf0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"433d5a77_7ef4c1ce","updated":"2023-07-14 19:20:01.000000000","message":"o/ I was testing this change and ran into a couple of issues... Could you please take a look?","commit_id":"f0973e31034b8d77c13ed18148ceafa70fca7f63"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"49cb7f8f_a144299e","updated":"2023-08-10 13:42:06.000000000","message":"Thank you Goutham for the patch. Overall it looks very well, just some questions and some minor points.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"c469171d_bc45cdfc","in_reply_to":"49cb7f8f_a144299e","updated":"2023-08-12 19:03:38.000000000","message":"Thanks for the review; i\u0027ve responded and updated this change.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"dc2a8e27_3aeb9a4b","updated":"2023-08-17 12:42:42.000000000","message":"Great work on this change, Goutham\nAdded a few comments with questions/suggestions inline. Please take a look.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3688609006e0876bf6be6b41accb0d451e810216","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"87a9a7cd_cf7b3de8","updated":"2023-08-15 17:53:56.000000000","message":"recheck\n\nWe fixed the failing jobs with https://review.opendev.org/c/openstack/manila-tempest-plugin/+/891359","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"0a2f4f83_6cac42fc","in_reply_to":"dc2a8e27_3aeb9a4b","updated":"2023-08-17 22:05:58.000000000","message":"Thanks Carlos; i\u0027ve added a new patch with responses to your suggestions.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"1de59a25_40b2aaa4","updated":"2023-08-18 10:01:07.000000000","message":"thanks for your change, some comments.","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"387d2660_28a2fdf0","in_reply_to":"1de59a25_40b2aaa4","updated":"2023-08-18 17:51:57.000000000","message":"Thank you Haixin; i\u0027ve responded and changed some things per your suggestions.","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"54388fab7ecaaf2f4474aa5408ed11d65e58f8ac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"caa642bc_932bd6e6","updated":"2023-08-21 21:13:49.000000000","message":"LGTM, thank you for working on the change and addressing the comments, Goutham","commit_id":"f641577d8a872ff381fe1c465e67b198c052b0be"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ae64b9195900c47c71dfd46e4098951e8c6f4710","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"77605579_c6e96286","updated":"2023-08-24 15:39:30.000000000","message":"Late to the party, but overrall looks great, can\u0027t find any issue with the current proposal and implementation.\nI didn\u0027t reviewed the tests, but looks like it has a good coverage. Thanks for the hard and great work in this feature.","commit_id":"f641577d8a872ff381fe1c465e67b198c052b0be"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"000ccb846a8e321c9695b7c221b2787d110335ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"2d6ba915_cfcc8529","updated":"2023-08-23 22:10:16.000000000","message":"Let\u0027s get this in. In case someone has some feedback, please add it to this change and we can have a follow-up change this cycle. Thank you for your hard work on this change Goutham!","commit_id":"f641577d8a872ff381fe1c465e67b198c052b0be"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0e1644f533e1dad935f3c6fb27d234dca2201667","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"dd99a911_a35c90d6","updated":"2023-08-18 19:22:29.000000000","message":"recheck","commit_id":"f641577d8a872ff381fe1c465e67b198c052b0be"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"a8fa676adff67fe9fa5a761db3a771704948fc06","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"ff219102_ee5c9a89","updated":"2023-08-22 02:51:34.000000000","message":"thank you for working on the change\nthe code LGTM.","commit_id":"f641577d8a872ff381fe1c465e67b198c052b0be"}],"api-ref/source/parameters.yaml":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":96,"context_line":"  type: string"},{"line_number":97,"context_line":"resource_lock_id_path:"},{"line_number":98,"context_line":"  description: |"},{"line_number":99,"context_line":"    The UUID of the resource lock"},{"line_number":100,"context_line":"  in: path"},{"line_number":101,"context_line":"  required: true"},{"line_number":102,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"cd37e35c_fc496272","line":99,"range":{"start_line":99,"start_character":29,"end_line":99,"end_character":33},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"  type: string"},{"line_number":97,"context_line":"resource_lock_id_path:"},{"line_number":98,"context_line":"  description: |"},{"line_number":99,"context_line":"    The UUID of the resource lock"},{"line_number":100,"context_line":"  in: path"},{"line_number":101,"context_line":"  required: true"},{"line_number":102,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"06e5a08b_c845a78e","line":99,"range":{"start_line":99,"start_character":29,"end_line":99,"end_character":33},"in_reply_to":"cd37e35c_fc496272","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":2565,"context_line":"  type: string"},{"line_number":2566,"context_line":"resource_lock_resource_action:"},{"line_number":2567,"context_line":"  description: |"},{"line_number":2568,"context_line":"    The action pertaining to a resource that the resource lock prevents. For"},{"line_number":2569,"context_line":"    example, if a resource lock prevents deletion of a share, the value of"},{"line_number":2570,"context_line":"    ``resource_action`` is ``delete``."},{"line_number":2571,"context_line":"  in: body"},{"line_number":2572,"context_line":"  required: true"},{"line_number":2573,"context_line":"  type: string"},{"line_number":2574,"context_line":"resource_lock_resource_action_optional:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"bb29f233_19326419","line":2571,"range":{"start_line":2568,"start_character":4,"end_line":2571,"end_character":10},"updated":"2023-08-10 13:42:06.000000000","message":"As a API reader, I would like to know what kind of enum values this enum parameter can receive. How can we solve this issue ? See the share status enum documentation [1] \n\n[1] https://review.opendev.org/c/openstack/manila/+/887115/9/api-ref/source/parameters.yaml#3381","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":2565,"context_line":"  type: string"},{"line_number":2566,"context_line":"resource_lock_resource_action:"},{"line_number":2567,"context_line":"  description: |"},{"line_number":2568,"context_line":"    The action pertaining to a resource that the resource lock prevents. For"},{"line_number":2569,"context_line":"    example, if a resource lock prevents deletion of a share, the value of"},{"line_number":2570,"context_line":"    ``resource_action`` is ``delete``."},{"line_number":2571,"context_line":"  in: body"},{"line_number":2572,"context_line":"  required: true"},{"line_number":2573,"context_line":"  type: string"},{"line_number":2574,"context_line":"resource_lock_resource_action_optional:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"e4e36fbf_02921f80","line":2571,"range":{"start_line":2568,"start_character":4,"end_line":2571,"end_character":10},"in_reply_to":"bb29f233_19326419","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":3,"context_line":"service_token_locks:"},{"line_number":4,"context_line":"  description: |"},{"line_number":5,"context_line":"    An auth-token specified via the header ``X-Service-Token``. With the"},{"line_number":6,"context_line":"    OpenStack Identity (Keystone) context, this token can be obtained by"},{"line_number":7,"context_line":"    obtained by a user that has the ``service`` role. The presence of this"},{"line_number":8,"context_line":"    header is used by resource lock API methods to set or match the lock user\u0027s"},{"line_number":9,"context_line":"    context. A resource lock created by a service user cannot be"},{"line_number":10,"context_line":"    manipulated by non-service users."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"b9ce7deb_32462761","line":7,"range":{"start_line":6,"start_character":61,"end_line":7,"end_character":15},"updated":"2023-08-17 12:42:42.000000000","message":"please remove the duplication :)","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":3,"context_line":"service_token_locks:"},{"line_number":4,"context_line":"  description: |"},{"line_number":5,"context_line":"    An auth-token specified via the header ``X-Service-Token``. With the"},{"line_number":6,"context_line":"    OpenStack Identity (Keystone) context, this token can be obtained by"},{"line_number":7,"context_line":"    obtained by a user that has the ``service`` role. The presence of this"},{"line_number":8,"context_line":"    header is used by resource lock API methods to set or match the lock user\u0027s"},{"line_number":9,"context_line":"    context. A resource lock created by a service user cannot be"},{"line_number":10,"context_line":"    manipulated by non-service users."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"faf5f0f6_cd4edaeb","line":7,"range":{"start_line":6,"start_character":61,"end_line":7,"end_character":15},"in_reply_to":"b9ce7deb_32462761","updated":"2023-08-17 22:05:58.000000000","message":"Done","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"}],"api-ref/source/resource-locks.inc":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":3,"context_line":"Resource Locks (since API v2.80)"},{"line_number":4,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Create, update and delete locks on user actions on resources."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create a resource lock"}],"source_content_type":"text/x-c++src","patch_set":9,"id":"3be480c2_eaffbf80","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":26},"updated":"2023-08-10 13:42:06.000000000","message":"Create, list, update and delete","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":3,"context_line":"Resource Locks (since API v2.80)"},{"line_number":4,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Create, update and delete locks on user actions on resources."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create a resource lock"}],"source_content_type":"text/x-c++src","patch_set":9,"id":"759988aa_d1ddfbbe","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":26},"in_reply_to":"3be480c2_eaffbf80","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"   - 400"},{"line_number":34,"context_line":"   - 403"},{"line_number":35,"context_line":"   - 404"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Request"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"0a7679dc_48adfd61","line":35,"range":{"start_line":33,"start_character":5,"end_line":35,"end_character":8},"updated":"2023-08-17 12:42:42.000000000","message":"If we end up raising HTTPConflict in the resource locks API due to the resource status not being valid, please update this","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"   - 400"},{"line_number":34,"context_line":"   - 403"},{"line_number":35,"context_line":"   - 404"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Request"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"3b19049d_ad27cd35","line":35,"range":{"start_line":33,"start_character":5,"end_line":35,"end_character":8},"in_reply_to":"0a7679dc_48adfd61","updated":"2023-08-17 22:05:58.000000000","message":"Done","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":44,"context_line":"   - resource_lock: resource_lock_object"},{"line_number":45,"context_line":"   - resource_id: resource_lock_resource_id"},{"line_number":46,"context_line":"   - resource_type: resource_lock_resource_type"},{"line_number":47,"context_line":"   - resource_action: resource_lock_resource_action_create_optional"},{"line_number":48,"context_line":"   - lock_reason: resource_lock_lock_reason_optional"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Request Example"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"d02acd28_3f4809b2","line":47,"range":{"start_line":47,"start_character":22,"end_line":47,"end_character":67},"updated":"2023-08-17 12:42:42.000000000","message":"shouldn\u0027t the resource action be always required? Otherwise we\u0027d not know what exactly is being locked, unless we default to something. That way, we\u0027d make sure people know exactly what action they are locking and will prevent \"accidental\" locks.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"54388fab7ecaaf2f4474aa5408ed11d65e58f8ac","unresolved":false,"context_lines":[{"line_number":44,"context_line":"   - resource_lock: resource_lock_object"},{"line_number":45,"context_line":"   - resource_id: resource_lock_resource_id"},{"line_number":46,"context_line":"   - resource_type: resource_lock_resource_type"},{"line_number":47,"context_line":"   - resource_action: resource_lock_resource_action_create_optional"},{"line_number":48,"context_line":"   - lock_reason: resource_lock_lock_reason_optional"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Request Example"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"bdf18f6e_ed7c1530","line":47,"range":{"start_line":47,"start_character":22,"end_line":47,"end_character":67},"in_reply_to":"9551a8af_bdecadaf","updated":"2023-08-21 21:13:49.000000000","message":"Ack","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"   - resource_lock: resource_lock_object"},{"line_number":45,"context_line":"   - resource_id: resource_lock_resource_id"},{"line_number":46,"context_line":"   - resource_type: resource_lock_resource_type"},{"line_number":47,"context_line":"   - resource_action: resource_lock_resource_action_create_optional"},{"line_number":48,"context_line":"   - lock_reason: resource_lock_lock_reason_optional"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Request Example"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"9551a8af_bdecadaf","line":47,"range":{"start_line":47,"start_character":22,"end_line":47,"end_character":67},"in_reply_to":"d02acd28_3f4809b2","updated":"2023-08-17 22:05:58.000000000","message":"we\u0027re defaulting to \"delete\"; the spec called this out too.. i expect that\u0027ll be the most common action to lock on.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"   - 403"},{"line_number":101,"context_line":"   - 404"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Request"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"ce7a990c_097403ea","line":101,"range":{"start_line":100,"start_character":3,"end_line":101,"end_character":8},"updated":"2023-08-17 12:42:42.000000000","message":"I believe there\u0027s a change someone can get a 401 here","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"   - 403"},{"line_number":101,"context_line":"   - 404"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Request"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"245f65fa_93384617","line":101,"range":{"start_line":100,"start_character":3,"end_line":101,"end_character":8},"in_reply_to":"ce7a990c_097403ea","updated":"2023-08-17 22:05:58.000000000","message":"Hmm yeah, that\u0027ll be true of all the APIs.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"   - 403"},{"line_number":311,"context_line":"   - 404"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"Request"},{"line_number":314,"context_line":"-------"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"4db6a494_06a00248","line":311,"range":{"start_line":310,"start_character":3,"end_line":311,"end_character":8},"updated":"2023-08-17 12:42:42.000000000","message":"could this also raise 401?","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":".. rest_status_code:: error status.yaml"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"   - 403"},{"line_number":311,"context_line":"   - 404"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"Request"},{"line_number":314,"context_line":"-------"}],"source_content_type":"text/x-c++src","patch_set":11,"id":"10956575_6c6d4896","line":311,"range":{"start_line":310,"start_character":3,"end_line":311,"end_character":8},"in_reply_to":"4db6a494_06a00248","updated":"2023-08-17 22:05:58.000000000","message":"Done","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"}],"doc/source/user/create-and-manage-shares.rst":[{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"  .. code-block:: console"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    $ openstack share lock create myshare share"},{"line_number":1042,"context_line":"    +-----------------+--------------------------------------+"},{"line_number":1043,"context_line":"    | Field           | Value                                |"},{"line_number":1044,"context_line":"    +-----------------+--------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":11,"id":"2a4cbb47_b7613fd9","line":1041,"updated":"2023-08-17 12:42:42.000000000","message":"maybe have a --resource-action here as well could help giving a hint on how to lock different actions in other resources","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"  .. code-block:: console"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    $ openstack share lock create myshare share"},{"line_number":1042,"context_line":"    +-----------------+--------------------------------------+"},{"line_number":1043,"context_line":"    | Field           | Value                                |"},{"line_number":1044,"context_line":"    +-----------------+--------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":11,"id":"e91c3045_6dd8e6df","line":1041,"in_reply_to":"2a4cbb47_b7613fd9","updated":"2023-08-17 22:05:58.000000000","message":"true there are quite a lot of possibilities with all the options we\u0027d have with these commands.. lets rely on the help text from the CLI to clarify the possibilities.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"}],"manila/api/v2/resource_locks.py":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _check_body(self, body, for_update\u003dFalse):"},{"line_number":49,"context_line":"        if \u0027resource_lock\u0027 not in body:"},{"line_number":50,"context_line":"            raise webob.exc.HTTPBadRequest(\"Malformed request body\")"},{"line_number":51,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":52,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":53,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"940fd3c4_9b7f2ea5","line":50,"range":{"start_line":50,"start_character":62,"end_line":50,"end_character":66},"updated":"2023-08-10 13:42:06.000000000","message":"body.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _check_body(self, body, for_update\u003dFalse):"},{"line_number":49,"context_line":"        if \u0027resource_lock\u0027 not in body:"},{"line_number":50,"context_line":"            raise webob.exc.HTTPBadRequest(\"Malformed request body\")"},{"line_number":51,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":52,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":53,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"fe2463d8_3499b99f","line":50,"range":{"start_line":50,"start_character":62,"end_line":50,"end_character":66},"in_reply_to":"940fd3c4_9b7f2ea5","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":51,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":52,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":53,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":55,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":56,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if len(lock_reason) \u003e 1023:"}],"source_content_type":"text/x-python","patch_set":9,"id":"8388ba5c_44e12bbb","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":60},"updated":"2023-08-10 13:42:06.000000000","message":"Resource action is treated as optional as default to \"delete\". For the create API, it is mandatory [1] (only for update it is optional param).\n\n[1] https://review.opendev.org/c/openstack/manila/+/887115/9/api-ref/source/resource-locks.inc#47","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":52,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":53,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":55,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":56,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if len(lock_reason) \u003e 1023:"}],"source_content_type":"text/x-python","patch_set":9,"id":"875743db_7e80da32","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":60},"in_reply_to":"8388ba5c_44e12bbb","updated":"2023-08-12 19:03:38.000000000","message":"Not mandatory for create either; clarified.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":70,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            if not uuidutils.is_uuid_like(resource_id):"},{"line_number":73,"context_line":"                msg \u003d _(\"Resource ID is required and must be in uuid format\")"},{"line_number":74,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":75,"context_line":"            if resource_type not in constants.RESOURCE_LOCK_RESOURCE_TYPES:"},{"line_number":76,"context_line":"                msg \u003d _(\"\u0027resource_type\u0027 is required and must be one \""}],"source_content_type":"text/x-python","patch_set":9,"id":"0682ecd7_9658612d","line":73,"range":{"start_line":73,"start_character":69,"end_line":73,"end_character":75},"updated":"2023-08-10 13:42:06.000000000","message":"format.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            if not uuidutils.is_uuid_like(resource_id):"},{"line_number":73,"context_line":"                msg \u003d _(\"Resource ID is required and must be in uuid format\")"},{"line_number":74,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":75,"context_line":"            if resource_type not in constants.RESOURCE_LOCK_RESOURCE_TYPES:"},{"line_number":76,"context_line":"                msg \u003d _(\"\u0027resource_type\u0027 is required and must be one \""}],"source_content_type":"text/x-python","patch_set":9,"id":"26c6654b_d205e64f","line":73,"range":{"start_line":73,"start_character":69,"end_line":73,"end_character":75},"in_reply_to":"0682ecd7_9658612d","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":true,"context_lines":[{"line_number":89,"context_line":"        filters \u003d req.params.copy()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        params \u003d common.get_pagination_params(req)"},{"line_number":92,"context_line":"        limit, offset \u003d [params.get(\u0027limit\u0027), params.get(\u0027offset\u0027)]"},{"line_number":93,"context_line":"        sort_key, sort_dir \u003d common.get_sort_params(filters)"},{"line_number":94,"context_line":"        for key in (\u0027limit\u0027, \u0027offset\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027):"},{"line_number":95,"context_line":"            filters.pop(key, None)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        show_count \u003d utils.get_bool_from_api_params("},{"line_number":98,"context_line":"            \u0027with_count\u0027, {\u0027with_count\u0027: filters.pop(\u0027with_count\u0027, False)})"}],"source_content_type":"text/x-python","patch_set":9,"id":"84aaa1c4_26869eaf","line":95,"range":{"start_line":92,"start_character":8,"end_line":95,"end_character":34},"updated":"2023-08-12 19:03:38.000000000","message":"```\nlimit, offset \u003d [params.pop(\u0027limit\u0027, None), params.pop(\u0027offset\u0027, None)]\nsort_key, sort_dir \u003d common.get_sort_params(filters)\n```","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"456b5ef8effc1ef0159f5571722fd85d3ffb8a3e","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        filters \u003d req.params.copy()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        params \u003d common.get_pagination_params(req)"},{"line_number":92,"context_line":"        limit, offset \u003d [params.get(\u0027limit\u0027), params.get(\u0027offset\u0027)]"},{"line_number":93,"context_line":"        sort_key, sort_dir \u003d common.get_sort_params(filters)"},{"line_number":94,"context_line":"        for key in (\u0027limit\u0027, \u0027offset\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027):"},{"line_number":95,"context_line":"            filters.pop(key, None)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        show_count \u003d utils.get_bool_from_api_params("},{"line_number":98,"context_line":"            \u0027with_count\u0027, {\u0027with_count\u0027: filters.pop(\u0027with_count\u0027, False)})"}],"source_content_type":"text/x-python","patch_set":9,"id":"831cded0_f0a88d1d","line":95,"range":{"start_line":92,"start_character":8,"end_line":95,"end_character":34},"in_reply_to":"84aaa1c4_26869eaf","updated":"2023-08-12 19:07:30.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"},{"line_number":147,"context_line":"    @wsgi.Controller.authorize"},{"line_number":148,"context_line":"    def create(self, req, body):"},{"line_number":149,"context_line":"        context \u003d req.environ[\u0027manila.context\u0027]"},{"line_number":150,"context_line":"        self._check_body(body)"},{"line_number":151,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"9955bf31_8ba57a0b","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":14},"updated":"2023-08-10 13:42:06.000000000","message":"docstring","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"},{"line_number":147,"context_line":"    @wsgi.Controller.authorize"},{"line_number":148,"context_line":"    def create(self, req, body):"},{"line_number":149,"context_line":"        context \u003d req.environ[\u0027manila.context\u0027]"},{"line_number":150,"context_line":"        self._check_body(body)"},{"line_number":151,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"1520eac8_eaa489f8","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":14},"in_reply_to":"9955bf31_8ba57a0b","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                context,"},{"line_number":155,"context_line":"                resource_id\u003dlock_data[\u0027resource_id\u0027],"},{"line_number":156,"context_line":"                resource_type\u003dlock_data[\u0027resource_type\u0027],"},{"line_number":157,"context_line":"                resource_action\u003d(lock_data.get(\u0027resource_action\u0027) or"},{"line_number":158,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":159,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"        except exception.NotFound:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f8d9f29_fc7ee1ef","line":158,"range":{"start_line":157,"start_character":16,"end_line":158,"end_character":67},"updated":"2023-08-10 13:42:06.000000000","message":"same about the API definition is marking this guy as mandatory, not as optional default to \"delete\".","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                context,"},{"line_number":155,"context_line":"                resource_id\u003dlock_data[\u0027resource_id\u0027],"},{"line_number":156,"context_line":"                resource_type\u003dlock_data[\u0027resource_type\u0027],"},{"line_number":157,"context_line":"                resource_action\u003d(lock_data.get(\u0027resource_action\u0027) or"},{"line_number":158,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":159,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"        except exception.NotFound:"}],"source_content_type":"text/x-python","patch_set":9,"id":"30f7de69_2cbf5ba0","line":158,"range":{"start_line":157,"start_character":16,"end_line":158,"end_character":67},"in_reply_to":"7f8d9f29_fc7ee1ef","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"},{"line_number":166,"context_line":"    @wsgi.Controller.authorize"},{"line_number":167,"context_line":"    def update(self, req, id, body):"},{"line_number":168,"context_line":"        context \u003d req.environ[\u0027manila.context\u0027]"},{"line_number":169,"context_line":"        self._check_body(body, for_update\u003dTrue)"},{"line_number":170,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"55e97721_44b61f9c","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":14},"updated":"2023-08-10 13:42:06.000000000","message":"docstring","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"},{"line_number":166,"context_line":"    @wsgi.Controller.authorize"},{"line_number":167,"context_line":"    def update(self, req, id, body):"},{"line_number":168,"context_line":"        context \u003d req.environ[\u0027manila.context\u0027]"},{"line_number":169,"context_line":"        self._check_body(body, for_update\u003dTrue)"},{"line_number":170,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"37297013_a36541e1","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":14},"in_reply_to":"55e97721_44b61f9c","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"b456f843a83c9a12c0a105cbe8f91347767c3a44","unresolved":true,"context_lines":[{"line_number":159,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":160,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"},{"line_number":161,"context_line":"            )"},{"line_number":162,"context_line":"        except exception.NotFound:"},{"line_number":163,"context_line":"            raise webob.exc.HTTPBadRequest(\"No such resource found.\")"},{"line_number":164,"context_line":"        return self._view_builder.detail(req, resource_lock)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"}],"source_content_type":"text/x-python","patch_set":11,"id":"00c8d14c_b3718867","line":163,"range":{"start_line":162,"start_character":8,"end_line":163,"end_character":69},"updated":"2023-08-17 12:42:42.000000000","message":"This should also handle exception.InvalidShare now, which is what will be raised in case the resource is not in a valid status.","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fe34a103f35ba5ce6243ee6731c34b57520259f9","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":160,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"},{"line_number":161,"context_line":"            )"},{"line_number":162,"context_line":"        except exception.NotFound:"},{"line_number":163,"context_line":"            raise webob.exc.HTTPBadRequest(\"No such resource found.\")"},{"line_number":164,"context_line":"        return self._view_builder.detail(req, resource_lock)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @wsgi.Controller.api_version(RESOURCE_LOCKS_MIN_API_VERSION)"}],"source_content_type":"text/x-python","patch_set":11,"id":"94efc09c_d1942362","line":163,"range":{"start_line":162,"start_character":8,"end_line":163,"end_character":69},"in_reply_to":"00c8d14c_b3718867","updated":"2023-08-17 22:05:58.000000000","message":"Done","commit_id":"3c2678c4ec4111ee22ec4047ac7480f5e7cf982b"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":true,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _check_body(self, body, for_update\u003dFalse):"},{"line_number":49,"context_line":"        if \u0027resource_lock\u0027 not in body:"},{"line_number":50,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"f42079da_a3351c1b","line":50,"range":{"start_line":50,"start_character":18,"end_line":50,"end_character":42},"updated":"2023-08-18 10:01:07.000000000","message":"I find that some places use web.exc and some places use exc, although the effect is the same, but it is better to use the same way. Let\u0027s fix the rest of it together\n\n    raise exc.HTTPBadRequest(","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _check_body(self, body, for_update\u003dFalse):"},{"line_number":49,"context_line":"        if \u0027resource_lock\u0027 not in body:"},{"line_number":50,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"c61c8689_b106243b","line":50,"range":{"start_line":50,"start_character":18,"end_line":50,"end_character":42},"in_reply_to":"f42079da_a3351c1b","updated":"2023-08-18 17:51:57.000000000","message":"good find! thanks! (i do expect python is optimizing imports)","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":true,"context_lines":[{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":55,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":56,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":57,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"52575922_f6e7abd4","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":60},"updated":"2023-08-18 10:01:07.000000000","message":"Create a resource lock:\n\n.. code-block:: bash\n\n  openstack share lock create \u003cresource_id\u003e \\\n    [--resource-action \u003cresource_action\u003e] \\\n    [--resource-type \u003cresource_type\u003e] \\\n    [--reason \u003clock_reason\u003e}]\n\nFrom spec, resource_type is not required, so resource_type should have a default value: share\n\n    resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027share\u0027","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"36c5b7df23a30d6ad003d54e147a184f1ab17543","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":55,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":56,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":57,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"81a3499d_428a8e90","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":60},"in_reply_to":"4aff1321_8f52cdf5","updated":"2023-08-21 07:01:21.000000000","message":"If we do not specify resource_type in the client, it will default to \u0027 \u0027 and an error will be reported on line 79.\nor as you said if the resource_id provided is a UUID - we\u0027d just assume it is a share.\nmaybe the code can be like below:\n\n            if not uuidutils.is_uuid_like(resource_id):\n                msg \u003d _(\"Resource ID is required and must be in uuid format.\")\n                raise exc.HTTPBadRequest(explanation\u003dmsg)\n            resource_type \u003d resource_type or \u0027share\u0027\n            if resource_type not in constants.RESOURCE_LOCK_RESOURCE_TYPES:\n                msg \u003d _(\"\u0027resource_type\u0027 is required and must be one \"\n                        \"of %s\" % constants.RESOURCE_LOCK_RESOURCE_TYPES)\n                raise exc.HTTPBadRequest(explanation\u003dmsg)","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":55,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":56,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":57,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"4aff1321_8f52cdf5","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":60},"in_reply_to":"52575922_f6e7abd4","updated":"2023-08-18 17:51:57.000000000","message":"ack this is optional only in the client - a minor user experience convenience.. because we don\u0027t need to perform a search (list all the resources and find the correct resource) if the resource_id provided is a UUID - we\u0027d just assume it is a share. If it is a name, resource_type is required so we can perform a search.","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"56151da88016f3e115677c83ac6bdc14397fe51a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":55,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":56,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":57,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"8f8d7a8b_df4ae996","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":60},"in_reply_to":"81a3499d_428a8e90","updated":"2023-08-21 15:19:47.000000000","message":"I apologize; i was confusing myself with the way the list method is implemented in the CLI --- when listing locks, the user should be able to filter just with a UUID of the resource.. but, create will require the user to specify the name or ID of the resource as well as the resource type: \n\nhttps://review.opendev.org/c/openstack/python-manilaclient/+/888006/8/manilaclient/osc/v2/resource_locks.py\n\nSo bottom line is \"resource_type\" isn\u0027t optional for this API. \n\nNow, do you have a strong opinion on this? Do you think \"resource_type\" should be optional and default to \"share\"? and why? is it because \"resource_action\" is defaulting to \"delete\"? Or is it because the spec is confusing? (I can fix the spec)","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"a8fa676adff67fe9fa5a761db3a771704948fc06","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                explanation\u003d\"Malformed request body.\")"},{"line_number":52,"context_line":"        lock_data \u003d body[\u0027resource_lock\u0027]"},{"line_number":53,"context_line":"        resource_id \u003d lock_data.get(\u0027resource_id\u0027) or \u0027\u0027"},{"line_number":54,"context_line":"        resource_type \u003d lock_data.get(\u0027resource_type\u0027) or \u0027\u0027"},{"line_number":55,"context_line":"        resource_action \u003d (lock_data.get(\u0027resource_action\u0027) or"},{"line_number":56,"context_line":"                           constants.RESOURCE_ACTION_DELETE)"},{"line_number":57,"context_line":"        lock_reason \u003d lock_data.get(\u0027lock_reason\u0027) or \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1c56e087_28dbafbd","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":60},"in_reply_to":"8f8d7a8b_df4ae996","updated":"2023-08-22 02:51:34.000000000","message":"If both the client and the api decide that resource_type is mandatory, then that is the case. Before I was just confused, the client resource_type written in spec is not a mandatory parameter, but the api is a mandatory parameter, inconsistent.\nNow that both of them have decided that resource_type is a mandatory parameter, there is no problem. Thank you for your explanation","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":true,"context_lines":[{"line_number":155,"context_line":"            resource_lock \u003d self.resource_locks_api.create("},{"line_number":156,"context_line":"                context,"},{"line_number":157,"context_line":"                resource_id\u003dlock_data[\u0027resource_id\u0027],"},{"line_number":158,"context_line":"                resource_type\u003dlock_data[\u0027resource_type\u0027],"},{"line_number":159,"context_line":"                resource_action\u003d(lock_data.get(\u0027resource_action\u0027) or"},{"line_number":160,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":161,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9b69864a_f7d256d1","line":158,"range":{"start_line":158,"start_character":30,"end_line":158,"end_character":57},"updated":"2023-08-18 10:01:07.000000000","message":"same above:\n\n    (lock_data.get(\u0027resource_type\u0027) or \u0027share\u0027),","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            resource_lock \u003d self.resource_locks_api.create("},{"line_number":156,"context_line":"                context,"},{"line_number":157,"context_line":"                resource_id\u003dlock_data[\u0027resource_id\u0027],"},{"line_number":158,"context_line":"                resource_type\u003dlock_data[\u0027resource_type\u0027],"},{"line_number":159,"context_line":"                resource_action\u003d(lock_data.get(\u0027resource_action\u0027) or"},{"line_number":160,"context_line":"                                 constants.RESOURCE_ACTION_DELETE),"},{"line_number":161,"context_line":"                lock_reason\u003dlock_data.get(\u0027lock_reason\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"2ecede85_78fb6605","line":158,"range":{"start_line":158,"start_character":30,"end_line":158,"end_character":57},"in_reply_to":"9b69864a_f7d256d1","updated":"2023-08-18 17:51:57.000000000","message":"an empty or missing \"resource_type\" will result in BadRequest: https://review.opendev.org/c/openstack/manila/+/887115/12/manila/api/v2/resource_locks.py#76","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"}],"manila/db/api.py":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1794,"context_line":""},{"line_number":1795,"context_line":""},{"line_number":1796,"context_line":"def resource_lock_create(context, values):"},{"line_number":1797,"context_line":"    \"\"\"Create a resource lock\"\"\""},{"line_number":1798,"context_line":"    return IMPL.resource_lock_create(context, values)"},{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"8f2055d0_1a090115","line":1797,"range":{"start_line":1797,"start_character":25,"end_line":1797,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":1794,"context_line":""},{"line_number":1795,"context_line":""},{"line_number":1796,"context_line":"def resource_lock_create(context, values):"},{"line_number":1797,"context_line":"    \"\"\"Create a resource lock\"\"\""},{"line_number":1798,"context_line":"    return IMPL.resource_lock_create(context, values)"},{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ef1ec568_83e0f10a","line":1797,"range":{"start_line":1797,"start_character":25,"end_line":1797,"end_character":29},"in_reply_to":"8f2055d0_1a090115","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":""},{"line_number":1801,"context_line":"def resource_lock_update(context, lock_id, values):"},{"line_number":1802,"context_line":"    \"\"\"Update a resource lock\"\"\""},{"line_number":1803,"context_line":"    return IMPL.resource_lock_update(context, lock_id, values)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"d6e5fd0c_ebe136ea","line":1802,"range":{"start_line":1802,"start_character":25,"end_line":1802,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":""},{"line_number":1801,"context_line":"def resource_lock_update(context, lock_id, values):"},{"line_number":1802,"context_line":"    \"\"\"Update a resource lock\"\"\""},{"line_number":1803,"context_line":"    return IMPL.resource_lock_update(context, lock_id, values)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"febd2ff5_7f6fef2b","line":1802,"range":{"start_line":1802,"start_character":25,"end_line":1802,"end_character":29},"in_reply_to":"d6e5fd0c_ebe136ea","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":""},{"line_number":1806,"context_line":"def resource_lock_delete(context, lock_id):"},{"line_number":1807,"context_line":"    \"\"\"Delete a resource lock\"\"\""},{"line_number":1808,"context_line":"    return IMPL.resource_lock_delete(context, lock_id)"},{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"d70981fc_d765f19a","line":1807,"range":{"start_line":1807,"start_character":25,"end_line":1807,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":""},{"line_number":1806,"context_line":"def resource_lock_delete(context, lock_id):"},{"line_number":1807,"context_line":"    \"\"\"Delete a resource lock\"\"\""},{"line_number":1808,"context_line":"    return IMPL.resource_lock_delete(context, lock_id)"},{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"cd896b10_8395e298","line":1807,"range":{"start_line":1807,"start_character":25,"end_line":1807,"end_character":29},"in_reply_to":"d70981fc_d765f19a","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":""},{"line_number":1811,"context_line":"def resource_lock_get(context, lock_id):"},{"line_number":1812,"context_line":"    \"\"\"Retrieve a resource lock\"\"\""},{"line_number":1813,"context_line":"    return IMPL.resource_lock_get(context, lock_id)"},{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7924a74f_b856c7b7","line":1812,"range":{"start_line":1812,"start_character":27,"end_line":1812,"end_character":31},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":""},{"line_number":1811,"context_line":"def resource_lock_get(context, lock_id):"},{"line_number":1812,"context_line":"    \"\"\"Retrieve a resource lock\"\"\""},{"line_number":1813,"context_line":"    return IMPL.resource_lock_get(context, lock_id)"},{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"4175f1c5_96bbf393","line":1812,"range":{"start_line":1812,"start_character":27,"end_line":1812,"end_character":31},"in_reply_to":"7924a74f_b856c7b7","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":""},{"line_number":1816,"context_line":"def resource_lock_get_all(context, **kwargs):"},{"line_number":1817,"context_line":"    \"\"\"Retrieve all resource locks\"\"\""},{"line_number":1818,"context_line":"    return IMPL.resource_lock_get_all(context, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"c538b655_b913c169","line":1817,"range":{"start_line":1817,"start_character":29,"end_line":1817,"end_character":34},"updated":"2023-08-10 13:42:06.000000000","message":"locks.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":""},{"line_number":1816,"context_line":"def resource_lock_get_all(context, **kwargs):"},{"line_number":1817,"context_line":"    \"\"\"Retrieve all resource locks\"\"\""},{"line_number":1818,"context_line":"    return IMPL.resource_lock_get_all(context, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a9e1888_0db838a9","line":1817,"range":{"start_line":1817,"start_character":29,"end_line":1817,"end_character":34},"in_reply_to":"c538b655_b913c169","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"}],"manila/db/sqlalchemy/api.py":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":7064,"context_line":"@require_context"},{"line_number":7065,"context_line":"@context_manager.writer"},{"line_number":7066,"context_line":"def resource_lock_create(context, kwargs):"},{"line_number":7067,"context_line":"    \"\"\"Create a resource lock\"\"\""},{"line_number":7068,"context_line":"    values \u003d copy.deepcopy(kwargs)"},{"line_number":7069,"context_line":"    lock_ref \u003d models.ResourceLock()"},{"line_number":7070,"context_line":"    if not values.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa79a749_57472276","line":7067,"range":{"start_line":7067,"start_character":25,"end_line":7067,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":7064,"context_line":"@require_context"},{"line_number":7065,"context_line":"@context_manager.writer"},{"line_number":7066,"context_line":"def resource_lock_create(context, kwargs):"},{"line_number":7067,"context_line":"    \"\"\"Create a resource lock\"\"\""},{"line_number":7068,"context_line":"    values \u003d copy.deepcopy(kwargs)"},{"line_number":7069,"context_line":"    lock_ref \u003d models.ResourceLock()"},{"line_number":7070,"context_line":"    if not values.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"d03860f1_40fb2c13","line":7067,"range":{"start_line":7067,"start_character":25,"end_line":7067,"end_character":29},"in_reply_to":"fa79a749_57472276","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":7079,"context_line":"@require_context"},{"line_number":7080,"context_line":"@context_manager.writer"},{"line_number":7081,"context_line":"def resource_lock_update(context, lock_id, kwargs):"},{"line_number":7082,"context_line":"    \"\"\"Update a resource lock\"\"\""},{"line_number":7083,"context_line":"    lock_ref \u003d _resource_lock_get(context, lock_id)"},{"line_number":7084,"context_line":"    lock_ref.update(kwargs)"},{"line_number":7085,"context_line":"    lock_ref.save(session\u003dcontext.session)"}],"source_content_type":"text/x-python","patch_set":9,"id":"79eecc32_0dba1005","line":7082,"range":{"start_line":7082,"start_character":25,"end_line":7082,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":7079,"context_line":"@require_context"},{"line_number":7080,"context_line":"@context_manager.writer"},{"line_number":7081,"context_line":"def resource_lock_update(context, lock_id, kwargs):"},{"line_number":7082,"context_line":"    \"\"\"Update a resource lock\"\"\""},{"line_number":7083,"context_line":"    lock_ref \u003d _resource_lock_get(context, lock_id)"},{"line_number":7084,"context_line":"    lock_ref.update(kwargs)"},{"line_number":7085,"context_line":"    lock_ref.save(session\u003dcontext.session)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9cdb393e_d20e6d5b","line":7082,"range":{"start_line":7082,"start_character":25,"end_line":7082,"end_character":29},"in_reply_to":"79eecc32_0dba1005","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":7089,"context_line":"@require_context"},{"line_number":7090,"context_line":"@context_manager.writer"},{"line_number":7091,"context_line":"def resource_lock_delete(context, lock_id):"},{"line_number":7092,"context_line":"    \"\"\"Delete a resource lock\"\"\""},{"line_number":7093,"context_line":"    lock_ref \u003d _resource_lock_get(context, lock_id)"},{"line_number":7094,"context_line":"    lock_ref.soft_delete(session\u003dcontext.session)"},{"line_number":7095,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"2404ffb7_c01dbf2f","line":7092,"range":{"start_line":7092,"start_character":25,"end_line":7092,"end_character":29},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":7089,"context_line":"@require_context"},{"line_number":7090,"context_line":"@context_manager.writer"},{"line_number":7091,"context_line":"def resource_lock_delete(context, lock_id):"},{"line_number":7092,"context_line":"    \"\"\"Delete a resource lock\"\"\""},{"line_number":7093,"context_line":"    lock_ref \u003d _resource_lock_get(context, lock_id)"},{"line_number":7094,"context_line":"    lock_ref.soft_delete(session\u003dcontext.session)"},{"line_number":7095,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"f45ef5f0_8c601360","line":7092,"range":{"start_line":7092,"start_character":25,"end_line":7092,"end_character":29},"in_reply_to":"2404ffb7_c01dbf2f","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":7097,"context_line":"@require_context"},{"line_number":7098,"context_line":"@context_manager.reader"},{"line_number":7099,"context_line":"def resource_lock_get(context, lock_id):"},{"line_number":7100,"context_line":"    \"\"\"Retrieve a resource lock\"\"\""},{"line_number":7101,"context_line":"    return _resource_lock_get(context, lock_id)"},{"line_number":7102,"context_line":""},{"line_number":7103,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"b91e3bad_36c3a4a8","line":7100,"range":{"start_line":7100,"start_character":27,"end_line":7100,"end_character":31},"updated":"2023-08-10 13:42:06.000000000","message":"lock.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":7097,"context_line":"@require_context"},{"line_number":7098,"context_line":"@context_manager.reader"},{"line_number":7099,"context_line":"def resource_lock_get(context, lock_id):"},{"line_number":7100,"context_line":"    \"\"\"Retrieve a resource lock\"\"\""},{"line_number":7101,"context_line":"    return _resource_lock_get(context, lock_id)"},{"line_number":7102,"context_line":""},{"line_number":7103,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"98691cb3_2a912649","line":7100,"range":{"start_line":7100,"start_character":27,"end_line":7100,"end_character":31},"in_reply_to":"b91e3bad_36c3a4a8","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"}],"manila/lock/api.py":[{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"208f51d9b126f3e61a8fe515d701a2a07d25caf0","unresolved":true,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        locks \u003d self.db.resource_lock_get_all(context, filters\u003dsearch_opts,"},{"line_number":77,"context_line":"                                              limit\u003dlimit, offset\u003doffset,"},{"line_number":78,"context_line":"                                              sort_key\u003dsort_key,"},{"line_number":79,"context_line":"                                              sort_dir\u003dsort_dir)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return locks"}],"source_content_type":"text/x-python","patch_set":3,"id":"9df98441_767c1a6c","line":78,"range":{"start_line":78,"start_character":46,"end_line":78,"end_character":63},"updated":"2023-07-14 19:20:01.000000000","message":"this should be forwarded only when there\u0027s a value specified, otherwise it will overwrite the default (\u0027created_at\u0027) in the model.","commit_id":"f0973e31034b8d77c13ed18148ceafa70fca7f63"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d0bd0ff7c04eee0400371791b542bed8968fe8af","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        locks \u003d self.db.resource_lock_get_all(context, filters\u003dsearch_opts,"},{"line_number":77,"context_line":"                                              limit\u003dlimit, offset\u003doffset,"},{"line_number":78,"context_line":"                                              sort_key\u003dsort_key,"},{"line_number":79,"context_line":"                                              sort_dir\u003dsort_dir)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return locks"}],"source_content_type":"text/x-python","patch_set":3,"id":"d1bf2d1d_20a8c1ca","line":78,"range":{"start_line":78,"start_character":46,"end_line":78,"end_character":63},"in_reply_to":"9df98441_767c1a6c","updated":"2023-07-20 08:13:07.000000000","message":"thanks, fixed","commit_id":"f0973e31034b8d77c13ed18148ceafa70fca7f63"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":43,"context_line":"        }"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _check_allow_lock_manipulation(self, context, resource_lock):"},{"line_number":46,"context_line":"        locked_by \u003d resource_lock[\u0027lock_context\u0027]"},{"line_number":47,"context_line":"        update_requested_by \u003d self._get_lock_context(context)[\u0027lock_context\u0027]"},{"line_number":48,"context_line":"        if ((locked_by \u003d\u003d \u0027admin\u0027 and update_requested_by !\u003d \u0027admin\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"8dbd7799_897f6dbc","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":38},"updated":"2023-08-10 13:42:06.000000000","message":"please, add a docstring explaining which scenarios are expected to be allowed. so, the code reader knows what are the business logic without needing to investigate the if conditions (not direct human readable).\n\n\"\"\"Check if the lock manipulation is allowed by the requester.\n\nFollowing scenarios are acceptable:\n1. Locked by admin: only admin can manipulate.\n2. Locked by service: service and admin can manipulate.\n2. Locked by user: all roles can manipulate.\n\"\"\"","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":43,"context_line":"        }"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _check_allow_lock_manipulation(self, context, resource_lock):"},{"line_number":46,"context_line":"        locked_by \u003d resource_lock[\u0027lock_context\u0027]"},{"line_number":47,"context_line":"        update_requested_by \u003d self._get_lock_context(context)[\u0027lock_context\u0027]"},{"line_number":48,"context_line":"        if ((locked_by \u003d\u003d \u0027admin\u0027 and update_requested_by !\u003d \u0027admin\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"c6ea3049_ce901cff","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":38},"in_reply_to":"8dbd7799_897f6dbc","updated":"2023-08-12 19:03:38.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return locks, count"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def create(self, context, resource_id\u003dNone, resource_type\u003dNone,"},{"line_number":90,"context_line":"               resource_action\u003dNone, lock_reason\u003dNone):"},{"line_number":91,"context_line":"        \"\"\"Create a resource lock with the specified information.\"\"\""},{"line_number":92,"context_line":"        get_res_method \u003d getattr(self.db, self.resource_get[resource_type])"},{"line_number":93,"context_line":"        resource \u003d get_res_method(context, resource_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"0383cd71_d3e6fd29","line":90,"range":{"start_line":89,"start_character":30,"end_line":90,"end_character":35},"updated":"2023-08-10 13:42:06.000000000","message":"why do they marked as optional param ? From what I got, they are mandatory values when creating a new locker. Right ?","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":true,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return locks, count"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def create(self, context, resource_id\u003dNone, resource_type\u003dNone,"},{"line_number":90,"context_line":"               resource_action\u003dNone, lock_reason\u003dNone):"},{"line_number":91,"context_line":"        \"\"\"Create a resource lock with the specified information.\"\"\""},{"line_number":92,"context_line":"        get_res_method \u003d getattr(self.db, self.resource_get[resource_type])"},{"line_number":93,"context_line":"        resource \u003d get_res_method(context, resource_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"33f45f74_32429f34","line":90,"range":{"start_line":89,"start_character":30,"end_line":90,"end_character":35},"in_reply_to":"0383cd71_d3e6fd29","updated":"2023-08-12 19:03:38.000000000","message":"this is an internal method; why would that confusion arise?","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"456b5ef8effc1ef0159f5571722fd85d3ffb8a3e","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return locks, count"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def create(self, context, resource_id\u003dNone, resource_type\u003dNone,"},{"line_number":90,"context_line":"               resource_action\u003dNone, lock_reason\u003dNone):"},{"line_number":91,"context_line":"        \"\"\"Create a resource lock with the specified information.\"\"\""},{"line_number":92,"context_line":"        get_res_method \u003d getattr(self.db, self.resource_get[resource_type])"},{"line_number":93,"context_line":"        resource \u003d get_res_method(context, resource_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"056571b0_f20aec40","line":90,"range":{"start_line":89,"start_character":30,"end_line":90,"end_character":35},"in_reply_to":"33f45f74_32429f34","updated":"2023-08-12 19:07:30.000000000","message":"Ack","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":99,"context_line":"            \u0027resource_action\u0027: resource_action,"},{"line_number":100,"context_line":"            \u0027lock_reason\u0027: lock_reason,"},{"line_number":101,"context_line":"        })"},{"line_number":102,"context_line":"        return self.db.resource_lock_create(context, resource_lock)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def update(self, context, lock_id, updates):"},{"line_number":105,"context_line":"        \"\"\"Update a resource lock with the specified information.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"1678edc0_b0911676","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":67},"updated":"2023-08-10 13:42:06.000000000","message":"Can it end up creating a locker of a dead share ? Look, the model resource id is just a string (no id table relationship) [1]. So, if a delete concurrent operation runs between line 93 (get the resource on db) and this create locker object, the locker object will be about a dead share. Am I wrong ?\n\n\n[1]https://review.opendev.org/c/openstack/manila/+/887115/9/manila/db/sqlalchemy/models.py#1471","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":true,"context_lines":[{"line_number":99,"context_line":"            \u0027resource_action\u0027: resource_action,"},{"line_number":100,"context_line":"            \u0027lock_reason\u0027: lock_reason,"},{"line_number":101,"context_line":"        })"},{"line_number":102,"context_line":"        return self.db.resource_lock_create(context, resource_lock)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def update(self, context, lock_id, updates):"},{"line_number":105,"context_line":"        \"\"\"Update a resource lock with the specified information.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"abca55f5_4d929181","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":67},"in_reply_to":"1678edc0_b0911676","updated":"2023-08-12 19:03:38.000000000","message":"thanks for asking; i\u0027ll add that check","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"456b5ef8effc1ef0159f5571722fd85d3ffb8a3e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            \u0027resource_action\u0027: resource_action,"},{"line_number":100,"context_line":"            \u0027lock_reason\u0027: lock_reason,"},{"line_number":101,"context_line":"        })"},{"line_number":102,"context_line":"        return self.db.resource_lock_create(context, resource_lock)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def update(self, context, lock_id, updates):"},{"line_number":105,"context_line":"        \"\"\"Update a resource lock with the specified information.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"2a079d8e_e52402cf","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":67},"in_reply_to":"abca55f5_4d929181","updated":"2023-08-12 19:07:30.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":true,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        For example, deletion lock on a \"deleting\" resource would be futile."},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        resource_state \u003d resource.get(\u0027status\u0027, resource.get(\u0027state\u0027, \u0027\u0027))"},{"line_number":133,"context_line":"        disallowed_statuses \u003d ()"},{"line_number":134,"context_line":"        if resource_action \u003d\u003d \u0027delete\u0027:"},{"line_number":135,"context_line":"            disallowed_statuses \u003d ("}],"source_content_type":"text/x-python","patch_set":12,"id":"6ce09a10_9a0a8f40","line":132,"updated":"2023-08-18 10:01:07.000000000","message":"resource_is_soft_deleted \u003d resource.get(\u0027is_soft_deleted\u0027, \u0027\u0027)\n        if resource_is_soft_deleted:\n            raise exception.InvalidInput(\n                reason\u003d\"Resource can not lock since it has been soft deleted.\")","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        For example, deletion lock on a \"deleting\" resource would be futile."},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        resource_state \u003d resource.get(\u0027status\u0027, resource.get(\u0027state\u0027, \u0027\u0027))"},{"line_number":133,"context_line":"        disallowed_statuses \u003d ()"},{"line_number":134,"context_line":"        if resource_action \u003d\u003d \u0027delete\u0027:"},{"line_number":135,"context_line":"            disallowed_statuses \u003d ("}],"source_content_type":"text/x-python","patch_set":12,"id":"025987c5_ad14b71e","line":132,"in_reply_to":"6ce09a10_9a0a8f40","updated":"2023-08-18 17:51:57.000000000","message":"Thanks; added","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"90ab071048e4bef189dd607776e5793c2b44489e","unresolved":true,"context_lines":[{"line_number":150,"context_line":"        resource_lock \u003d self.db.resource_lock_get(context, lock_id)"},{"line_number":151,"context_line":"        policy.check_policy(context, \u0027resource_lock\u0027, \u0027update\u0027, resource_lock)"},{"line_number":152,"context_line":"        self._check_allow_lock_manipulation(context, resource_lock)"},{"line_number":153,"context_line":"        if \u0027resource_action\u0027 in updates:"},{"line_number":154,"context_line":"            get_res_method \u003d getattr("},{"line_number":155,"context_line":"                self.db,"},{"line_number":156,"context_line":"                self.resource_get[resource_lock[\u0027resource_type\u0027]],"}],"source_content_type":"text/x-python","patch_set":12,"id":"ec814929_7949b837","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":40},"updated":"2023-08-18 10:01:07.000000000","message":"if \u0027resource_action\u0027 in updates or \u0027lock_reason\u0027 in updates:","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0923fa1473b9ae26d4039ebf5e47888e82d6304c","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        resource_lock \u003d self.db.resource_lock_get(context, lock_id)"},{"line_number":151,"context_line":"        policy.check_policy(context, \u0027resource_lock\u0027, \u0027update\u0027, resource_lock)"},{"line_number":152,"context_line":"        self._check_allow_lock_manipulation(context, resource_lock)"},{"line_number":153,"context_line":"        if \u0027resource_action\u0027 in updates:"},{"line_number":154,"context_line":"            get_res_method \u003d getattr("},{"line_number":155,"context_line":"                self.db,"},{"line_number":156,"context_line":"                self.resource_get[resource_lock[\u0027resource_type\u0027]],"}],"source_content_type":"text/x-python","patch_set":12,"id":"23bb4bf6_3d1c4ec1","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":40},"in_reply_to":"ec814929_7949b837","updated":"2023-08-18 17:51:57.000000000","message":"you could update the lock reason on an existing lock always. but this is here so that we can prevent an inconsistent lock action, and really for future proofing. the only lock action allowed right now is \"delete\" and you won\u0027t get into this situation. \n\nWhen access rule locks are added (https://review.opendev.org/c/openstack/manila/+/887725/), we can have a \"show\" lock on an access rule. While a \"show\" lock exists, it doesn\u0027t prevent deletion. User can then delete the \"show\" locked rule, the access rule will transition to \"queued_to_deny\".. \n\nDuring this, if the user updates the existing \"show\" lock to \"delete\", they\u0027ll get an error because of this logic.","commit_id":"090c2f73c4393083a4a71e39314625ea592b0e0a"}],"manila/share/api.py":[{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"208f51d9b126f3e61a8fe515d701a2a07d25caf0","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        self.access_helper \u003d access.ShareInstanceAccess(self.db, None)"},{"line_number":129,"context_line":"        coordination.LOCK_COORDINATOR.start()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @staticmethod"},{"line_number":132,"context_line":"    def prevent_locked_action_on_share(arg):"},{"line_number":133,"context_line":"        \"\"\"Decorator for preventing a locked method from executing on a share."},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"21e26a08_9acee477","line":131,"range":{"start_line":131,"start_character":4,"end_line":131,"end_character":17},"updated":"2023-07-14 19:20:01.000000000","message":"hitting issues with this being marked as static method when the class is being initialized... feels very weird though... we have other examples where we do this as well","commit_id":"f0973e31034b8d77c13ed18148ceafa70fca7f63"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d0bd0ff7c04eee0400371791b542bed8968fe8af","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.access_helper \u003d access.ShareInstanceAccess(self.db, None)"},{"line_number":129,"context_line":"        coordination.LOCK_COORDINATOR.start()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @staticmethod"},{"line_number":132,"context_line":"    def prevent_locked_action_on_share(arg):"},{"line_number":133,"context_line":"        \"\"\"Decorator for preventing a locked method from executing on a share."},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"96b90850_1a124b69","line":131,"range":{"start_line":131,"start_character":4,"end_line":131,"end_character":17},"in_reply_to":"21e26a08_9acee477","updated":"2023-07-20 08:13:07.000000000","message":"yes; i was trying to create a staticmethod for in-class usage. I removed the annotation - it\u0027ll kill a tiny bit of optimization, but shouldn\u0027t be a concern","commit_id":"f0973e31034b8d77c13ed18148ceafa70fca7f63"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1f7569b11934a40a71156153bbe9abd3eee191fd","unresolved":true,"context_lines":[{"line_number":1094,"context_line":"        }"},{"line_number":1095,"context_line":"        return request_spec"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    @prevent_locked_action_on_share(\u0027delete\u0027)"},{"line_number":1098,"context_line":"    def unmanage(self, context, share):"},{"line_number":1099,"context_line":"        policy.check_policy(context, \u0027share\u0027, \u0027unmanage\u0027)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"        self._check_is_share_busy(share)"}],"source_content_type":"text/x-python","patch_set":9,"id":"0302bd4a_9b3dc321","line":1098,"range":{"start_line":1097,"start_character":3,"end_line":1098,"end_character":39},"updated":"2023-08-10 13:42:06.000000000","message":"Is it documented in anywhere ? That seems a very important decision: if a delete locker is part of a share, the operator cannot unmanage it. Delete is different from unmanage (on the storage perspective). Look, one operator may run: \"openstack share unmange ..\" and he/she will get an error saying something like: \"you cannot delete the share, since there is a locker\". I, as an operator, may think: \"oh, I am not deleting it, I just want to forget it from the Manila service\". Is it the desired behavior ? If so, where can the operators find this information before hitting the unexpected error message ?","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b2ef3b539a769fda70b1a696f2e11d38fc2c9da7","unresolved":true,"context_lines":[{"line_number":1094,"context_line":"        }"},{"line_number":1095,"context_line":"        return request_spec"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    @prevent_locked_action_on_share(\u0027delete\u0027)"},{"line_number":1098,"context_line":"    def unmanage(self, context, share):"},{"line_number":1099,"context_line":"        policy.check_policy(context, \u0027share\u0027, \u0027unmanage\u0027)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"        self._check_is_share_busy(share)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f8f4eb0_ebd4e87b","line":1098,"range":{"start_line":1097,"start_character":3,"end_line":1098,"end_character":39},"in_reply_to":"0302bd4a_9b3dc321","updated":"2023-08-12 19:03:38.000000000","message":"\"if a delete locker is part of a share, the operator cannot unmanage it.\"\n\nYes; this is by design. An unmanaged share may disrupt the data path - (disruption depends on a manila configuration option to remove access rules while unmanaging). If that happens, its as good as a deletion according to the lock owner. \n\n\nFrom the operator\u0027s perspective, the error message will read:\n\n\"Resource lock/s [\u003clist of locks\u003e] prevent delete action.\"\n\nOperators are meant to read this message as, make sure you remove the locks before you unmanage. Will \"delete action\" in the message confuse them? I don\u0027t think so.. operators would understand this imo. If you disagree, i can clarify this wherever you suggest.","commit_id":"278802545217e628720a375b9baeb55148b17dfc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"456b5ef8effc1ef0159f5571722fd85d3ffb8a3e","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        }"},{"line_number":1095,"context_line":"        return request_spec"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    @prevent_locked_action_on_share(\u0027delete\u0027)"},{"line_number":1098,"context_line":"    def unmanage(self, context, share):"},{"line_number":1099,"context_line":"        policy.check_policy(context, \u0027share\u0027, \u0027unmanage\u0027)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"        self._check_is_share_busy(share)"}],"source_content_type":"text/x-python","patch_set":9,"id":"f95bb4c6_9db8c5ce","line":1098,"range":{"start_line":1097,"start_character":3,"end_line":1098,"end_character":39},"in_reply_to":"1f8f4eb0_ebd4e87b","updated":"2023-08-12 19:07:30.000000000","message":"Done","commit_id":"278802545217e628720a375b9baeb55148b17dfc"}]}
