)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c9abee43_59e21e3f","updated":"2021-12-09 14:27:12.000000000","message":"Thank you very much, Carlos, addressing this bug is very trick with several corner cases. Nice work! How did you test all of them ?! Do you have any log or note that we can analyse what scenarios have been tested ? Another point, I think this bug could have some tempest tests to verify it, what do you think ?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"adfb9307_7daa459a","updated":"2021-12-17 13:31:25.000000000","message":"Thanks for reviewing, Felipe. Please check changes and answers inline","commit_id":"2f7294113b566bbee0588b1f6a11c36b45778d11"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1c3b7dc8f3f7c99308dc723b5dd8ff3eb3f39f99","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"22c616a1_b3afeb3d","updated":"2022-01-20 13:19:17.000000000","message":"ping on this with my vote","commit_id":"2f7294113b566bbee0588b1f6a11c36b45778d11"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"70368854ce32463c380926e5f4ab0595fb6067dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d09ca00c_0fd8863c","updated":"2021-12-20 13:25:16.000000000","message":"recheck","commit_id":"2f7294113b566bbee0588b1f6a11c36b45778d11"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"5c437c6dc434cc38f3f0075e0c6d1ce8809934de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f7e39998_bdab7177","updated":"2022-01-10 00:39:20.000000000","message":"thks carlos, some replies.","commit_id":"2f7294113b566bbee0588b1f6a11c36b45778d11"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"e6b7198ae6e78013a5c288eb480c9f4abeb0227f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"51f414b1_2d948e01","updated":"2022-07-28 03:27:20.000000000","message":"LGTM.thanks","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"16231ba320b387f50c7bda613f301e07256812f2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"1b205fba_3caf9952","updated":"2022-03-09 22:45:00.000000000","message":"Thank you for the reviews\nPlease check answers and changes inline","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"f99d54876648e7ae2792c49f68bf74cd99c1b9c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"cb348a43_ea57d50a","updated":"2022-10-13 22:10:25.000000000","message":"Thanks for your patience with this Carlos; CI hasn\u0027t run for a while.. workflowing this should kick it off and alert us if there are any potential regressions.","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"9054c6bec79b947905dcc6aa311f16bfea5a8661","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"603472d7_aaefac4a","updated":"2022-03-09 22:45:11.000000000","message":"Waiting on CI output","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"250a96c93c199bda01b3b44e7c4e21ad77b05fd1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"571cacb4_23527db7","updated":"2022-07-07 12:40:39.000000000","message":"thanks carlos, LGTM!","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"}],"manila/scheduler/manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"cf66d553f94562bc9ce2665c31a8a1200c25fa11","unresolved":true,"context_lines":[{"line_number":155,"context_line":"            self, context, share, new_share_type_id):"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if new_share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        new_share_type \u003d share_types.get_share_type(context, new_share_type_id)"},{"line_number":161,"context_line":"        new_type_extra_specs \u003d new_share_type.get(\u0027extra_specs\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"03e16046_996a53f5","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":18},"updated":"2021-07-20 19:38:31.000000000","message":"please add a comment above this to indicate why","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            self, context, share, new_share_type_id):"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if new_share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        new_share_type \u003d share_types.get_share_type(context, new_share_type_id)"},{"line_number":161,"context_line":"        new_type_extra_specs \u003d new_share_type.get(\u0027extra_specs\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2bf29bff_9a3e8bfe","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":18},"in_reply_to":"03e16046_996a53f5","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"cf66d553f94562bc9ce2665c31a8a1200c25fa11","unresolved":true,"context_lines":[{"line_number":185,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":187,"context_line":"        except Exception:"},{"line_number":188,"context_line":"            LOG.exception(\"Failed to update usages allocated for share \""},{"line_number":189,"context_line":"                          \"migration.\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def migrate_share_to_host("}],"source_content_type":"text/x-python","patch_set":1,"id":"1861b0c8_86219b39","line":188,"range":{"start_line":188,"start_character":64,"end_line":188,"end_character":70},"updated":"2021-07-20 19:38:31.000000000","message":"failed share migration","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"cf66d553f94562bc9ce2665c31a8a1200c25fa11","unresolved":true,"context_lines":[{"line_number":185,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":187,"context_line":"        except Exception:"},{"line_number":188,"context_line":"            LOG.exception(\"Failed to update usages allocated for share \""},{"line_number":189,"context_line":"                          \"migration.\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def migrate_share_to_host("}],"source_content_type":"text/x-python","patch_set":1,"id":"2a30dac1_02bfbd06","line":188,"range":{"start_line":188,"start_character":37,"end_line":188,"end_character":43},"updated":"2021-07-20 19:38:31.000000000","message":"revert","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":187,"context_line":"        except Exception:"},{"line_number":188,"context_line":"            LOG.exception(\"Failed to update usages allocated for share \""},{"line_number":189,"context_line":"                          \"migration.\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def migrate_share_to_host("}],"source_content_type":"text/x-python","patch_set":1,"id":"baf47648_cc728303","line":188,"range":{"start_line":188,"start_character":64,"end_line":188,"end_character":70},"in_reply_to":"1861b0c8_86219b39","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":187,"context_line":"        except Exception:"},{"line_number":188,"context_line":"            LOG.exception(\"Failed to update usages allocated for share \""},{"line_number":189,"context_line":"                          \"migration.\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def migrate_share_to_host("}],"source_content_type":"text/x-python","patch_set":1,"id":"e974ad7e_b24baefd","line":188,"range":{"start_line":188,"start_character":37,"end_line":188,"end_character":43},"in_reply_to":"2a30dac1_02bfbd06","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"cf66d553f94562bc9ce2665c31a8a1200c25fa11","unresolved":true,"context_lines":[{"line_number":209,"context_line":"                \u0027migrate_share_to_host\u0027,"},{"line_number":210,"context_line":"                {\u0027task_state\u0027: constants.TASK_STATE_MIGRATION_ERROR},"},{"line_number":211,"context_line":"                context, ex, request_spec)"},{"line_number":212,"context_line":"            self._revert_allocated_quotas_in_share_migration("},{"line_number":213,"context_line":"                context, share_ref, new_share_type_id)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"41828308_37a854e4","line":212,"range":{"start_line":212,"start_character":35,"end_line":212,"end_character":41},"updated":"2021-07-20 19:38:31.000000000","message":"share_type_quotas","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                \u0027migrate_share_to_host\u0027,"},{"line_number":210,"context_line":"                {\u0027task_state\u0027: constants.TASK_STATE_MIGRATION_ERROR},"},{"line_number":211,"context_line":"                context, ex, request_spec)"},{"line_number":212,"context_line":"            self._revert_allocated_quotas_in_share_migration("},{"line_number":213,"context_line":"                context, share_ref, new_share_type_id)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f6e0fda6_9eb12616","line":212,"range":{"start_line":212,"start_character":35,"end_line":212,"end_character":41},"in_reply_to":"41828308_37a854e4","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":172,"context_line":"        new_share_type \u003d share_types.get_share_type(context, new_share_type_id)"},{"line_number":173,"context_line":"        new_type_extra_specs \u003d new_share_type.get(\u0027extra_specs\u0027, None)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        new_type_replication_type \u003d None"},{"line_number":176,"context_line":"        if new_type_extra_specs:"},{"line_number":177,"context_line":"            new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":178,"context_line":"                \u0027replication_type\u0027, None)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        deltas \u003d {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"a67c6b63_9a3f5c44","line":178,"range":{"start_line":175,"start_character":8,"end_line":178,"end_character":41},"updated":"2021-12-09 14:27:12.000000000","message":"nit, one statement:\nnew_type_replication_type  \u003d new_type_extra_specs.get(\u0027replication_type\u0027) if new_type_extra_specs else None\n\nnit: from what I know, you don\u0027t need to specify \"None\" in the \"get\" function, the default is None.","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        new_share_type \u003d share_types.get_share_type(context, new_share_type_id)"},{"line_number":173,"context_line":"        new_type_extra_specs \u003d new_share_type.get(\u0027extra_specs\u0027, None)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        new_type_replication_type \u003d None"},{"line_number":176,"context_line":"        if new_type_extra_specs:"},{"line_number":177,"context_line":"            new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":178,"context_line":"                \u0027replication_type\u0027, None)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        deltas \u003d {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"38d260f2_cdcc75f7","line":178,"range":{"start_line":175,"start_character":8,"end_line":178,"end_character":41},"in_reply_to":"a67c6b63_9a3f5c44","updated":"2021-12-17 13:31:25.000000000","message":"I did try it one line but the statement got too long. Then, here I preferred the code to be more readable over using the smart way to do it with python...\nAnd yes, there\u0027s no need for the None in the get function :)\nThanks for the suggestion :)","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":198,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":199,"context_line":"        except Exception:"},{"line_number":200,"context_line":"            LOG.exception(\"Failed to revert usages allocated allocated for \""},{"line_number":201,"context_line":"                          \"failed for share migration.\")"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def migrate_share_to_host("},{"line_number":204,"context_line":"            self, context, share_id, host, force_host_assisted_migration,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9114cb24_af9b036e","line":201,"range":{"start_line":200,"start_character":27,"end_line":201,"end_character":53},"updated":"2021-12-09 14:27:12.000000000","message":"I think it is a bit wrong, please, rewrite it: \"Failed to revert allocated quota usages.\"","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":198,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dnew_share_type_id)"},{"line_number":199,"context_line":"        except Exception:"},{"line_number":200,"context_line":"            LOG.exception(\"Failed to revert usages allocated allocated for \""},{"line_number":201,"context_line":"                          \"failed for share migration.\")"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def migrate_share_to_host("},{"line_number":204,"context_line":"            self, context, share_id, host, force_host_assisted_migration,"}],"source_content_type":"text/x-python","patch_set":3,"id":"0108b07b_3d5bd981","line":201,"range":{"start_line":200,"start_character":27,"end_line":201,"end_character":53},"in_reply_to":"9114cb24_af9b036e","updated":"2021-12-17 13:31:25.000000000","message":"Done","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"}],"manila/share/api.py":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2b184f317b32ae09b81648da50edf0edc610c799","unresolved":true,"context_lines":[{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        deltas.update({"},{"line_number":1411,"context_line":"            \u0027share_type_id\u0027: new_share_type[\u0027id\u0027],"},{"line_number":1412,"context_line":"            \u0027shares\u0027: 1,"},{"line_number":1413,"context_line":"            \u0027gigabytes\u0027: share[\u0027size\u0027]"},{"line_number":1414,"context_line":"        })"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"8e4097e0_37264824","line":1413,"range":{"start_line":1412,"start_character":0,"end_line":1413,"end_character":38},"updated":"2021-03-25 21:51:42.000000000","message":"Just want to call the attention to this reservation. In order to allocate these quotas in the new share-type, we need to allocate \u0027shares\u0027 and \u0027gigabytes\u0027 again, which will consume extra quotas during the migration process, since they are only reverted after finishing the migration (cancel/complete/start error). So, if the user doesn\u0027t have these quotas, the migration will fail here.\nOne alternative would be to modify quotas \u0027reserve\u0027 method to support quota reservatiopn for share-type type only.","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"bbcc80f8ae0cd4a33e20b01d9d6ed98e6301f6a4","unresolved":true,"context_lines":[{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        deltas.update({"},{"line_number":1411,"context_line":"            \u0027share_type_id\u0027: new_share_type[\u0027id\u0027],"},{"line_number":1412,"context_line":"            \u0027shares\u0027: 1,"},{"line_number":1413,"context_line":"            \u0027gigabytes\u0027: share[\u0027size\u0027]"},{"line_number":1414,"context_line":"        })"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f36556c7_2c68f270","line":1413,"range":{"start_line":1412,"start_character":0,"end_line":1413,"end_character":38},"in_reply_to":"8e4097e0_37264824","updated":"2021-03-26 13:56:51.000000000","message":"The sum of the quota scoped to each share type should anyhow be equal to the quota not scoped to a share type - so I think this is fine","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        deltas.update({"},{"line_number":1411,"context_line":"            \u0027share_type_id\u0027: new_share_type[\u0027id\u0027],"},{"line_number":1412,"context_line":"            \u0027shares\u0027: 1,"},{"line_number":1413,"context_line":"            \u0027gigabytes\u0027: share[\u0027size\u0027]"},{"line_number":1414,"context_line":"        })"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f97d8193_4ac160a8","line":1413,"range":{"start_line":1412,"start_character":0,"end_line":1413,"end_character":38},"in_reply_to":"f36556c7_2c68f270","updated":"2021-09-22 14:27:40.000000000","message":"Ack","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"bbcc80f8ae0cd4a33e20b01d9d6ed98e6301f6a4","unresolved":true,"context_lines":[{"line_number":1416,"context_line":"        try:"},{"line_number":1417,"context_line":"            reservations \u003d QUOTAS.reserve("},{"line_number":1418,"context_line":"                context, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e863f9ce_04cdcf63","line":1419,"updated":"2021-03-26 13:56:51.000000000","message":"I\u0027m not sure about user_id. Should the quota be attributed to the original creator of the share (which is done here) or to the performer of the migration (which would mean to not pass the user_id and use the context instead)?","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"422054cf04d5a590ecf3d5a4f474c1ad68a3f60c","unresolved":true,"context_lines":[{"line_number":1416,"context_line":"        try:"},{"line_number":1417,"context_line":"            reservations \u003d QUOTAS.reserve("},{"line_number":1418,"context_line":"                context, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bec2d1be_fffd7238","line":1419,"in_reply_to":"3123b878_327bcb99","updated":"2021-12-21 06:48:58.000000000","message":"i agree with Carlos, the new share must in the same project with source share(since end user can\u0027t choice share type not available to him), if soruce share and dest share in different pool, source project should consume quota. if in the same pool source project no need to consume quota.","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"16231ba320b387f50c7bda613f301e07256812f2","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"        try:"},{"line_number":1417,"context_line":"            reservations \u003d QUOTAS.reserve("},{"line_number":1418,"context_line":"                context, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dbb3f5d5_8f37c21e","line":1419,"in_reply_to":"bec2d1be_fffd7238","updated":"2022-03-09 22:45:00.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"        try:"},{"line_number":1417,"context_line":"            reservations \u003d QUOTAS.reserve("},{"line_number":1418,"context_line":"                context, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3123b878_327bcb99","line":1419,"in_reply_to":"e863f9ce_04cdcf63","updated":"2021-09-22 14:27:40.000000000","message":"I\u0027d say no, unless the owner of the share changes as soon as we start the migration (which currently does not happen).\n\n1. User creates a share - the share will have user_id set as the id of the user that requested the share\n2. Admin request the share to be migrated\n2.1 A new share instance is requested [1]\n2.2 A new share instance is provided\n3. We complete the migration\n4. Check the share/share instance\n\nShare instances do not contain a user_id field. This field is part of the share, and the share instance will always be related to the source share. So the source share is still related to the share instance even after the migration gets completed. That makes me think we should keep consuming quotas for this specific user id. Otherwise, migrating a share would also mean changing owners.\n\nWe can have some more thoughts from other people on that too :)\n\n[1] https://github.com/openstack/manila/blob/master/manila/share/manager.py#L1058-L1061","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"bbcc80f8ae0cd4a33e20b01d9d6ed98e6301f6a4","unresolved":true,"context_lines":[{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"},{"line_number":1423,"context_line":"        except exception.OverQuota as e:"},{"line_number":1424,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"},{"line_number":1425,"context_line":"            usages \u003d e.kwargs[\u0027usages\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"d281eb9f_3bb24290","line":1422,"updated":"2021-03-26 13:56:51.000000000","message":"same like above","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], **deltas)"},{"line_number":1420,"context_line":"            QUOTAS.commit("},{"line_number":1421,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1422,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"},{"line_number":1423,"context_line":"        except exception.OverQuota as e:"},{"line_number":1424,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"},{"line_number":1425,"context_line":"            usages \u003d e.kwargs[\u0027usages\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"26013528_f54334ae","line":1422,"in_reply_to":"d281eb9f_3bb24290","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"bbcc80f8ae0cd4a33e20b01d9d6ed98e6301f6a4","unresolved":true,"context_lines":[{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"            if \u0027replica_gigabytes\u0027 in overs:"},{"line_number":1432,"context_line":"                LOG.warning(\"Replica gigabytes quota exceeded \""},{"line_number":1433,"context_line":"                            \"for %(s_pid)s, tried to extend \""},{"line_number":1434,"context_line":"                            \"%(s_size)sG share (%(d_consumed)dG of \""},{"line_number":1435,"context_line":"                            \"%(d_quota)dG already consumed).\", {"},{"line_number":1436,"context_line":"                                \u0027s_pid\u0027: context.project_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"130b1b5d_ad86e30b","line":1433,"updated":"2021-03-26 13:56:51.000000000","message":"copy\u0026paste error: this is not an \u0027extend\u0027 operation here, I suggest to use \u0027migrate\u0027","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d57f75f6dea4482af68da9e4d899dc25a81e6ac8","unresolved":false,"context_lines":[{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"            if \u0027replica_gigabytes\u0027 in overs:"},{"line_number":1432,"context_line":"                LOG.warning(\"Replica gigabytes quota exceeded \""},{"line_number":1433,"context_line":"                            \"for %(s_pid)s, tried to extend \""},{"line_number":1434,"context_line":"                            \"%(s_size)sG share (%(d_consumed)dG of \""},{"line_number":1435,"context_line":"                            \"%(d_quota)dG already consumed).\", {"},{"line_number":1436,"context_line":"                                \u0027s_pid\u0027: context.project_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"e6b0d0be_b1d811b1","line":1433,"in_reply_to":"130b1b5d_ad86e30b","updated":"2021-09-22 14:27:40.000000000","message":"Done","commit_id":"2197207adc60207bd1c4ea16ea94ab8181a720a5"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"        return snapshot"},{"line_number":1397,"context_line":""},{"line_number":1398,"context_line":"    def _modify_quotas_for_share_migration(self, context, share,"},{"line_number":1399,"context_line":"                                           new_share_type):"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"        new_type_extra_specs \u003d self.get_share_attributes_from_share_type("}],"source_content_type":"text/x-python","patch_set":3,"id":"6570c1eb_d4cb101a","line":1398,"range":{"start_line":1398,"start_character":8,"end_line":1398,"end_character":42},"updated":"2021-12-09 14:27:12.000000000","message":"this function looks a bit trick, please, add a header comment explaining how it works, the scenarios and so on.","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"        return snapshot"},{"line_number":1397,"context_line":""},{"line_number":1398,"context_line":"    def _modify_quotas_for_share_migration(self, context, share,"},{"line_number":1399,"context_line":"                                           new_share_type):"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"        new_type_extra_specs \u003d self.get_share_attributes_from_share_type("}],"source_content_type":"text/x-python","patch_set":3,"id":"b6825905_251942c4","line":1398,"range":{"start_line":1398,"start_character":8,"end_line":1398,"end_character":42},"in_reply_to":"6570c1eb_d4cb101a","updated":"2021-12-17 13:31:25.000000000","message":"Done","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1401,"context_line":"        new_type_extra_specs \u003d self.get_share_attributes_from_share_type("},{"line_number":1402,"context_line":"            new_share_type)"},{"line_number":1403,"context_line":"        new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"84d2ce5c_1029ba8e","line":1404,"range":{"start_line":1404,"start_character":32,"end_line":1404,"end_character":36},"updated":"2021-12-09 14:27:12.000000000","message":"nit: not required, the python default is \"none\"","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"        new_type_extra_specs \u003d self.get_share_attributes_from_share_type("},{"line_number":1402,"context_line":"            new_share_type)"},{"line_number":1403,"context_line":"        new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"aebb4625_44de70a5","line":1404,"range":{"start_line":1404,"start_character":32,"end_line":1404,"end_character":36},"in_reply_to":"84d2ce5c_1029ba8e","updated":"2021-12-17 13:31:25.000000000","message":"Ack","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1402,"context_line":"            new_share_type)"},{"line_number":1403,"context_line":"        new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":1408,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"c53bea91_1629a133","line":1405,"range":{"start_line":1405,"start_character":8,"end_line":1405,"end_character":21},"updated":"2021-12-09 14:27:12.000000000","message":"new_share_type_id\n\nnit: a bit useless this variable, though","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"            new_share_type)"},{"line_number":1403,"context_line":"        new_type_replication_type \u003d new_type_extra_specs.get("},{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":1408,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a41f0dd_300a05ee","line":1405,"range":{"start_line":1405,"start_character":8,"end_line":1405,"end_character":21},"in_reply_to":"c53bea91_1629a133","updated":"2021-12-17 13:31:25.000000000","message":"Ack","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":1408,"context_line":"            return"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        deltas \u003d {}"},{"line_number":1411,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1b737cb3_8e9f7f84","line":1408,"range":{"start_line":1407,"start_character":8,"end_line":1408,"end_character":18},"updated":"2021-12-09 14:27:12.000000000","message":"Given it returns directly, this one should be the first statement","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1404,"context_line":"            \u0027replication_type\u0027, None)"},{"line_number":1405,"context_line":"        share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        if share_type_id \u003d\u003d share[\u0027share_type_id\u0027]:"},{"line_number":1408,"context_line":"            return"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        deltas \u003d {}"},{"line_number":1411,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"d0209c58_324b738e","line":1408,"range":{"start_line":1407,"start_character":8,"end_line":1408,"end_character":18},"in_reply_to":"1b737cb3_8e9f7f84","updated":"2021-12-17 13:31:25.000000000","message":"Done","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"        # NOTE(carloss): If a new share type with a replication type was"},{"line_number":1413,"context_line":"        # specified, there is need to allocate quotas in the new share type."},{"line_number":1414,"context_line":"        # We won\u0027t remove the current consumed quotas, since both share"},{"line_number":1415,"context_line":"        # instances will co-exist until the migration gets completed,"},{"line_number":1416,"context_line":"        # cancelled or it fails."},{"line_number":1417,"context_line":"        if new_type_replication_type:"},{"line_number":1418,"context_line":"            deltas[\u0027share_replicas\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"72575742_dc6b12f2","line":1415,"range":{"start_line":1414,"start_character":30,"end_line":1415,"end_character":68},"updated":"2021-12-09 14:27:12.000000000","message":"That\u0027s make sense when you are migrating to a different pool. What about retyping ?! In this case, the user will consume double quota, which could lead to error in an edge scenario. Example, I have one user that has 10G free, this user wants to retying a 10G share to different type (same pool) with migration. No more quota space should be consumed here, otherwise this operation will always fail. Does the user need double quota space for retyping ?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"422054cf04d5a590ecf3d5a4f474c1ad68a3f60c","unresolved":true,"context_lines":[{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"        # NOTE(carloss): If a new share type with a replication type was"},{"line_number":1413,"context_line":"        # specified, there is need to allocate quotas in the new share type."},{"line_number":1414,"context_line":"        # We won\u0027t remove the current consumed quotas, since both share"},{"line_number":1415,"context_line":"        # instances will co-exist until the migration gets completed,"},{"line_number":1416,"context_line":"        # cancelled or it fails."},{"line_number":1417,"context_line":"        if new_type_replication_type:"},{"line_number":1418,"context_line":"            deltas[\u0027share_replicas\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"e39a5f19_5f95ac48","line":1415,"range":{"start_line":1414,"start_character":30,"end_line":1415,"end_character":68},"in_reply_to":"4250ca01_bb1fa99a","updated":"2021-12-21 06:48:58.000000000","message":"so, we need to check whether share type binds share_backend_name to the same storage pool as the source share, maybe code like below:\n\nsource_share_type_id \u003d share.get(\u0027share_type_id\u0027)\nshare_backend_name \u003d new_type_extra_specs.get(\u0027share_backend_name\u0027)\nsame_pool \u003d False\nif share_backend_name:\n    pools \u003d self.scheduler_rpcapi.get_pools(context.elevated(), cached\u003dTrue)\n    for pool in pools:\n        if pool.get(\u0027share_backend_name\u0027) \u003d\u003d share_backend_name:\n            if pool.get(\u0027name\u0027) \u003d\u003d share[\u0027host\u0027]:\n                same_pool \u003d True\n...\n...\ndeltas \u003d {}\nundo_deltas \u003d {}\nif new_type_replication_type:\n   deltas[\u0027share_replicas\u0027] \u003d 1\n   deltas[\u0027replica_gigabytes\u0027] \u003d share[\u0027size\u0027]\n   undo_deltas[\u0027share_replicas\u0027] \u003d -1\n   undo_deltas[\u0027replica_gigabytes\u0027] \u003d -share[\u0027size\u0027]\ndeltas.update({\n   \u0027share_type_id\u0027: new_share_type_id,\n   \u0027shares\u0027: 1,\n   \u0027gigabytes\u0027: share[\u0027size\u0027]\n   })\nundo_deltas.update({\n   \u0027share_type_id\u0027: source_share_type_id,\n   \u0027shares\u0027: -1,\n   \u0027gigabytes\u0027: -share[\u0027size\u0027]\n   })\ntry:\n    # same pool just switch transfer the quota consumiption, if failed to migration need\n    # to roll back later.\n    if same_pool:\n        undo_reservations \u003d QUOTAS.reserve(\n                context, share_type_id\u003dsource_share_type_id, **undo_deltas)\n        do_reservations \u003d QUOTAS.reserve(\n                context, share_type_id\u003dshare_type_id, **deltas)\n        QUOTAS.commit(\n                context, undo_reservations, project_id\u003dshare[\u0027project_id\u0027],\n                share_type_id\u003dsource_share_type_id)\n        QUOTAS.commit(\n                context, do_reservations, project_id\u003dshare[\u0027project_id\u0027],\n                share_type_id\u003dshare_type_id)\n    else:\n        reservations \u003d QUOTAS.reserve(\n                context, project_id\u003dshare[\u0027project_id\u0027],\n                user_id\u003dshare[\u0027user_id\u0027], **deltas)\n        QUOTAS.commit(\n                context, reservations, project_id\u003dshare[\u0027project_id\u0027],\n                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)\nexcept exception.OverQuota as e:\n    ...","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"16231ba320b387f50c7bda613f301e07256812f2","unresolved":false,"context_lines":[{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"        # NOTE(carloss): If a new share type with a replication type was"},{"line_number":1413,"context_line":"        # specified, there is need to allocate quotas in the new share type."},{"line_number":1414,"context_line":"        # We won\u0027t remove the current consumed quotas, since both share"},{"line_number":1415,"context_line":"        # instances will co-exist until the migration gets completed,"},{"line_number":1416,"context_line":"        # cancelled or it fails."},{"line_number":1417,"context_line":"        if new_type_replication_type:"},{"line_number":1418,"context_line":"            deltas[\u0027share_replicas\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"937f2a7b_1448859c","line":1415,"range":{"start_line":1414,"start_character":30,"end_line":1415,"end_character":68},"in_reply_to":"6f3a937e_233a1207","updated":"2022-03-09 22:45:00.000000000","message":"I understand the retype scenario, but let\u0027s think thorough it:\nWhen retyping, the new type can contain different extra specs, and even though the share would be in the same pool, the backend could not be capable of just acking the change and adding the new capabilities to the share. In that case, they would need to create a new share, move the data and then follow the normal migration workflow. If we just ignore this fact here, two instances will be created and it will end up in only half of the quotas being actually consumed.\nWe can not foresee what all of the backends are capable of doing or not.\nSo it\u0027s better being safe and leaving the quotas here while the entire migration do not occur than leave unconsumed quota.\nIt wouldn\u0027t be that big of a problem if the user hits into a quota exception, they\u0027d need to contact their administrator, and I believe we already had this discussion in the past for this change :)","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":true,"context_lines":[{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"        # NOTE(carloss): If a new share type with a replication type was"},{"line_number":1413,"context_line":"        # specified, there is need to allocate quotas in the new share type."},{"line_number":1414,"context_line":"        # We won\u0027t remove the current consumed quotas, since both share"},{"line_number":1415,"context_line":"        # instances will co-exist until the migration gets completed,"},{"line_number":1416,"context_line":"        # cancelled or it fails."},{"line_number":1417,"context_line":"        if new_type_replication_type:"},{"line_number":1418,"context_line":"            deltas[\u0027share_replicas\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"4250ca01_bb1fa99a","line":1415,"range":{"start_line":1414,"start_character":30,"end_line":1415,"end_character":68},"in_reply_to":"72575742_dc6b12f2","updated":"2021-12-17 13:31:25.000000000","message":"This retyping scenario is a good one to think about. I think in this case we would need to switch transfer the quota consumiption (undo the allocation from the source and do the allocation to the dest immediately).\nWdyt?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"5c437c6dc434cc38f3f0075e0c6d1ce8809934de","unresolved":true,"context_lines":[{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"        # NOTE(carloss): If a new share type with a replication type was"},{"line_number":1413,"context_line":"        # specified, there is need to allocate quotas in the new share type."},{"line_number":1414,"context_line":"        # We won\u0027t remove the current consumed quotas, since both share"},{"line_number":1415,"context_line":"        # instances will co-exist until the migration gets completed,"},{"line_number":1416,"context_line":"        # cancelled or it fails."},{"line_number":1417,"context_line":"        if new_type_replication_type:"},{"line_number":1418,"context_line":"            deltas[\u0027share_replicas\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"6f3a937e_233a1207","line":1415,"range":{"start_line":1414,"start_character":30,"end_line":1415,"end_character":68},"in_reply_to":"e39a5f19_5f95ac48","updated":"2022-01-10 00:39:20.000000000","message":"+1","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1419,"context_line":"            deltas[\u0027replica_gigabytes\u0027] \u003d share[\u0027size\u0027]"},{"line_number":1420,"context_line":""},{"line_number":1421,"context_line":"        deltas.update({"},{"line_number":1422,"context_line":"            \u0027share_type_id\u0027: new_share_type[\u0027id\u0027],"},{"line_number":1423,"context_line":"            \u0027shares\u0027: 1,"},{"line_number":1424,"context_line":"            \u0027gigabytes\u0027: share[\u0027size\u0027]"},{"line_number":1425,"context_line":"        })"}],"source_content_type":"text/x-python","patch_set":3,"id":"10870d17_03f7f6dc","line":1422,"range":{"start_line":1422,"start_character":28,"end_line":1422,"end_character":49},"updated":"2021-12-09 14:27:12.000000000","message":"if you created the variable for this dict, i think you should use it: new_share_type_id","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"            deltas[\u0027replica_gigabytes\u0027] \u003d share[\u0027size\u0027]"},{"line_number":1420,"context_line":""},{"line_number":1421,"context_line":"        deltas.update({"},{"line_number":1422,"context_line":"            \u0027share_type_id\u0027: new_share_type[\u0027id\u0027],"},{"line_number":1423,"context_line":"            \u0027shares\u0027: 1,"},{"line_number":1424,"context_line":"            \u0027gigabytes\u0027: share[\u0027size\u0027]"},{"line_number":1425,"context_line":"        })"}],"source_content_type":"text/x-python","patch_set":3,"id":"d393a69a_4ad820d3","line":1422,"range":{"start_line":1422,"start_character":28,"end_line":1422,"end_character":49},"in_reply_to":"10870d17_03f7f6dc","updated":"2021-12-17 13:31:25.000000000","message":"Done","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1431,"context_line":"            QUOTAS.commit("},{"line_number":1432,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1433,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"},{"line_number":1434,"context_line":"        except exception.OverQuota as e:"},{"line_number":1435,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"},{"line_number":1436,"context_line":"            usages \u003d e.kwargs[\u0027usages\u0027]"},{"line_number":1437,"context_line":"            quotas \u003d e.kwargs[\u0027quotas\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3d89bd36_3fa1eced","line":1434,"range":{"start_line":1434,"start_character":8,"end_line":1434,"end_character":39},"updated":"2021-12-09 14:27:12.000000000","message":"you are only reraise for some scenaros, is it correct ? I think you should reraise in all scenarios, only in some you want to reraise with different error and log, right ?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"            QUOTAS.commit("},{"line_number":1432,"context_line":"                context, reservations, project_id\u003dshare[\u0027project_id\u0027],"},{"line_number":1433,"context_line":"                user_id\u003dshare[\u0027user_id\u0027], share_type_id\u003dshare_type_id)"},{"line_number":1434,"context_line":"        except exception.OverQuota as e:"},{"line_number":1435,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"},{"line_number":1436,"context_line":"            usages \u003d e.kwargs[\u0027usages\u0027]"},{"line_number":1437,"context_line":"            quotas \u003d e.kwargs[\u0027quotas\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"c1806f7b_00dde095","line":1434,"range":{"start_line":1434,"start_character":8,"end_line":1434,"end_character":39},"in_reply_to":"3d89bd36_3fa1eced","updated":"2021-12-17 13:31:25.000000000","message":"The quota mechanism already handles some of the errors that could be thrown, so I think it is okay to follow the pattern that the other quota allocations are using, which is to expect for a OverQuota.","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1440,"context_line":"                return (usages[name][\u0027reserved\u0027] + usages[name][\u0027in_use\u0027])"},{"line_number":1441,"context_line":""},{"line_number":1442,"context_line":"            if \u0027replica_gigabytes\u0027 in overs:"},{"line_number":1443,"context_line":"                LOG.warning(\"Replica gigabytes quota exceeded \""},{"line_number":1444,"context_line":"                            \"for %(s_pid)s, tried to migrate \""},{"line_number":1445,"context_line":"                            \"%(s_size)sG share (%(d_consumed)dG of \""},{"line_number":1446,"context_line":"                            \"%(d_quota)dG already consumed).\", {"}],"source_content_type":"text/x-python","patch_set":3,"id":"ee1538b8_c64ca2cf","line":1443,"range":{"start_line":1443,"start_character":20,"end_line":1443,"end_character":27},"updated":"2021-12-09 14:27:12.000000000","message":"warning ? Warning sounds more: it will work, but found a possible error. Here, it seems that the entire migration will fail, right ?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"                return (usages[name][\u0027reserved\u0027] + usages[name][\u0027in_use\u0027])"},{"line_number":1441,"context_line":""},{"line_number":1442,"context_line":"            if \u0027replica_gigabytes\u0027 in overs:"},{"line_number":1443,"context_line":"                LOG.warning(\"Replica gigabytes quota exceeded \""},{"line_number":1444,"context_line":"                            \"for %(s_pid)s, tried to migrate \""},{"line_number":1445,"context_line":"                            \"%(s_size)sG share (%(d_consumed)dG of \""},{"line_number":1446,"context_line":"                            \"%(d_quota)dG already consumed).\", {"}],"source_content_type":"text/x-python","patch_set":3,"id":"284b202a_6f8ed419","line":1443,"range":{"start_line":1443,"start_character":20,"end_line":1443,"end_character":27},"in_reply_to":"ee1538b8_c64ca2cf","updated":"2021-12-17 13:31:25.000000000","message":"The error is already being raised by the exception, being treated and displayed as such.\nThe warning illustrates the current quota situation in this scenario and shows some details. If this was the only thing we\u0027re displaying, I\u0027d be all in for the change... But as it isn\u0027t I\u0027m okay with warning.\nBtw, all the other occurrences in the file are also using warning to raise overquota messages, so this keeps the pattern that is being used :)","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1571,"context_line":"                    \" given share %s has extra_spec \""},{"line_number":1572,"context_line":"                    \"\u0027driver_handles_share_servers\u0027 as True.\") % share[\u0027id\u0027]"},{"line_number":1573,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1574,"context_line":"            self._modify_quotas_for_share_migration(context, share,"},{"line_number":1575,"context_line":"                                                    new_share_type)"},{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            share_type \u003d {}"},{"line_number":1578,"context_line":"            share_type_id \u003d share_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"5738caec_877a48dd","line":1575,"range":{"start_line":1574,"start_character":12,"end_line":1575,"end_character":67},"updated":"2021-12-09 14:27:12.000000000","message":"Is the expected behaviour not reverting it in the API service ?!","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":true,"context_lines":[{"line_number":1571,"context_line":"                    \" given share %s has extra_spec \""},{"line_number":1572,"context_line":"                    \"\u0027driver_handles_share_servers\u0027 as True.\") % share[\u0027id\u0027]"},{"line_number":1573,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1574,"context_line":"            self._modify_quotas_for_share_migration(context, share,"},{"line_number":1575,"context_line":"                                                    new_share_type)"},{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            share_type \u003d {}"},{"line_number":1578,"context_line":"            share_type_id \u003d share_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"85d92550_fcc83743","line":1575,"range":{"start_line":1574,"start_character":12,"end_line":1575,"end_character":67},"in_reply_to":"5738caec_877a48dd","updated":"2021-12-17 13:31:25.000000000","message":"Sorry, I didn\u0027t understand your question... Could you please clarify?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"5c437c6dc434cc38f3f0075e0c6d1ce8809934de","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"                    \" given share %s has extra_spec \""},{"line_number":1572,"context_line":"                    \"\u0027driver_handles_share_servers\u0027 as True.\") % share[\u0027id\u0027]"},{"line_number":1573,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1574,"context_line":"            self._modify_quotas_for_share_migration(context, share,"},{"line_number":1575,"context_line":"                                                    new_share_type)"},{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            share_type \u003d {}"},{"line_number":1578,"context_line":"            share_type_id \u003d share_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"844caa7f_54842fa6","line":1575,"range":{"start_line":1574,"start_character":12,"end_line":1575,"end_character":67},"in_reply_to":"85d92550_fcc83743","updated":"2022-01-10 00:39:20.000000000","message":"Done","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"}],"manila/share/manager.py":[{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"cb49c0a735a9af0880aee401b73d13db0ab4e2b7","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"2dd84a20_7b64b9d4","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"updated":"2021-12-09 14:27:12.000000000","message":"This function is very close to the one in the scheduler manager. Actually, this onde is just a more generic version. So, I think you could avoid replicated code using only this one in the quota lib. What do you think ?! A bug here may mean bug in two place, given they are copy.","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"8cfff56d79535a03a9a6e2a77f7fd937c3cee51f","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"a1acefd7_750385a4","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"in_reply_to":"2dd84a20_7b64b9d4","updated":"2021-12-17 13:31:25.000000000","message":"If I move this to the quotas lib, I\u0027ll be making calls to the share API (see line 1066), and I don\u0027t think it is ideal to have this calls there... If it\u0027s a utils file, it would possibly be okay though...","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"ce8b7a07cefc604ff0b4fe7640e4f8c9d27566ef","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"c6d8bf77_b67d00d4","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"in_reply_to":"67b90908_88149201","updated":"2022-03-09 22:47:12.000000000","message":"moved to share_types... doesn\u0027t make much sense to have it in the quotas lib as we\u0027d be invoking share types lib and a lot of other things. Utils/common files also do not sound right because of the things we invoke and those files do not have much complex functions with multiple calls to the db and so on. So I thought the most neutral place for this would be the actual share_types file we have.","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"1c3b7dc8f3f7c99308dc723b5dd8ff3eb3f39f99","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"67b90908_88149201","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"in_reply_to":"73c1b8e7_599950c3","updated":"2022-01-20 13:19:17.000000000","message":"How do you plan to solve it ?","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"5c437c6dc434cc38f3f0075e0c6d1ce8809934de","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"73c1b8e7_599950c3","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"in_reply_to":"a1acefd7_750385a4","updated":"2022-01-10 00:39:20.000000000","message":"I got it.. But you could retrieve the infos before calling the generic Quota method, so there only the revert logic is done without any share_api calls.\n\nAnyway, if you prefer to add to utils lib works too. The point is more about solving the issue of having those two functions doing the same thing (replicated code). Feel free to solve as you prefer :)","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"250a96c93c199bda01b3b44e7c4e21ad77b05fd1","unresolved":true,"context_lines":[{"line_number":1048,"context_line":"        return self.driver.connection_get_info(context, share_instance,"},{"line_number":1049,"context_line":"                                               share_server)"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _revert_allocated_share_type_quotas_during_migration("},{"line_number":1052,"context_line":"            self, context, source_instance, dest_instance,"},{"line_number":1053,"context_line":"            deallocate_from_current_type\u003dFalse):"},{"line_number":1054,"context_line":"        current_type_id \u003d source_instance[\u0027share_type_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"58008af1_8f247985","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":60},"in_reply_to":"c6d8bf77_b67d00d4","updated":"2022-07-07 12:40:39.000000000","message":"got it, nice!","commit_id":"17cab0f3b4b1605df0addb9fc72e906e8547838d"}],"manila/share/share_types.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"f99d54876648e7ae2792c49f68bf74cd99c1b9c4","unresolved":true,"context_lines":[{"line_number":476,"context_line":"            and not allow_deallocate_from_current_type):"},{"line_number":477,"context_line":"        return"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    new_share_type \u003d get_share_type(context, share_type_id)"},{"line_number":480,"context_line":"    new_type_extra_specs \u003d new_share_type.get(\u0027extra_specs\u0027, None)"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    new_type_replication_type \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"60cf54d9_30c52b92","line":479,"updated":"2022-10-13 22:10:25.000000000","message":"this here is slightly confusing, because in a case where the migration is completed, this method is actually called on the original share type..","commit_id":"6a6aa0f146034ffa0d9ebb4c84c7d7485af5b007"}]}
