)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c369f315_725628e5","updated":"2022-11-07 13:35:18.000000000","message":"Haixin,\nfixed comments. Also updated bug as per PR.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"5655b66edabea2f40180fc1173cd8519f2107756","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a6bf5dc_de3cb596","updated":"2022-11-04 20:17:06.000000000","message":"The use case is to allow new share extend limit per share type. Share type ABC has limits of share min share size 1 GB, max share size 100 GB.\n\nBut customer request to extend share, in this case admin set max share extend size to 200 GB and can extend the share upto that limit. While non-admin user can extend only upto 100 GB.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"69b2fd49_f0dd61aa","updated":"2022-11-07 08:43:41.000000000","message":"thanks for your change, Kiran.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"fe0371d270f2ac964def36d29d78c63ac109a65a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"54004f83_a15079af","updated":"2022-11-08 05:42:16.000000000","message":"LGTM, thanks for your change.","commit_id":"55027de13e64e378bd6ab4a9d14cbcb5b970ed89"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"4e238d3b6dfdd91bd762bdd7718c65d8124f3403","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6e75531f_964ea2b9","updated":"2022-11-23 01:43:09.000000000","message":"Thanks Kiran for proposing this solution. How did you test it ? Do you have any tempest patch to test this new feature ?","commit_id":"55027de13e64e378bd6ab4a9d14cbcb5b970ed89"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"6701ac508379922cb7f13cb795a67ef0fd3a00ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ea5f44c4_de844bb1","updated":"2022-11-24 01:08:41.000000000","message":"Thanks Kiran. The code looks good. I will trigger NetApp CI as soon as it has free nodes.","commit_id":"1b813a7aad31191a795f36f910103b969288522e"},{"author":{"_account_id":34489,"name":"Matheus Andrade","email":"matheus.handrade15@gmail.com","username":"matheusandrade"},"change_message_id":"d54cd81778c2510ae77bdf08fe3f0820aa0d1e24","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"e57a0955_44f9aad8","updated":"2023-03-01 17:50:17.000000000","message":"LGTM, thanks for your changes Kiran!","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1af8bd004330a309ad14c84e96d653a1267da3bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"e3b76c7f_ea607e56","updated":"2023-03-01 18:50:28.000000000","message":"Thanks for the change, i\u0027ve some comments inline","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"98e0f3d46eb1aeec9a9412bd1c9aa9c67938db75","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e1a6490d_6ac627ca","updated":"2023-03-14 02:06:25.000000000","message":"LGTM，thanks for your change.","commit_id":"956ac5ca80e9ab5dbb7602c303c3454eba042440"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"267f40e28c329295f228609d192fb283dfaa9b8c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"ddef66fe_5e753f90","updated":"2023-05-30 19:08:16.000000000","message":"LGTM, thanks kiran!\nI believe this deserves functional testing. Could you please write some?","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"3ec8f2cb88d5182133f51cc42187c9aed193789a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"c78abf77_2e3df88c","updated":"2023-05-30 19:18:41.000000000","message":"recheck\nI was taking a look at the scenario tests in the generic driver job. All tests failed. Let\u0027s get a clean run and analyze the logs","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"e2c2d8d9783e4a507bf7d44450886fe5804e5d64","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"17a813f6_4c758438","in_reply_to":"0d0b4d1c_7a3a7647","updated":"2023-06-01 09:01:49.000000000","message":"i think we can merged this first, and then add tempest tests.","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"e60bc5bf43ec720678353c659092c8458bd52676","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"0d0b4d1c_7a3a7647","in_reply_to":"9d88e0db_c8c4b3e6","updated":"2023-05-31 13:05:02.000000000","message":"sure, will do it. If possible, lets get this merged first.","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3c140f2f9a51358418c2d4193e93a3d03023cbb5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"fca8c292_e5d33683","in_reply_to":"ddef66fe_5e753f90","updated":"2023-05-31 03:32:24.000000000","message":"You mean tempest tests ?","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d75b595e704ec921d3bfdba365b12b94760be4a6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"9d88e0db_c8c4b3e6","in_reply_to":"fca8c292_e5d33683","updated":"2023-05-31 12:59:08.000000000","message":"yes :)","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"f1f626661e733d380ad5e07bf94dc576195b0ef3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"4cf9d364_1bbec605","updated":"2023-06-01 13:02:49.000000000","message":"As per the job runs, the generic scenario and generic driver jobs are broken [1]. I\u0027m okay merging this change then. Please add the functional tests as soon as you can. In the past we had issues with not testing the change with tempest tests, where we didn\u0027t have the functional test runs before merging the change and we broke CI (and Manila). It is important that we avoid it at all costs. It\u0027s also good to keep in mind that functional tests are (and have always been) a requirement for merging new features :)\n\nThank you for the hard work and patience with this change, Kiran!\n\n[1] https://zuul.opendev.org/t/openstack/builds?job_name\u003dmanila-tempest-plugin-generic-scenario\u0026project\u003dopenstack/manila","commit_id":"7a4a81b53cce886902f383d064fd737aa4d67cb9"}],"doc/source/admin/capabilities_and_extra_specs.rst":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1af8bd004330a309ad14c84e96d653a1267da3bc","unresolved":true,"context_lines":[{"line_number":271,"context_line":"* **provisioning:max_share_extend_size** can set the max size of share extend,"},{"line_number":272,"context_line":"  the value must be an integer and greater than 0. If administrators set this"},{"line_number":273,"context_line":"  capability as an extra-spec in a share type, the size of share extended with"},{"line_number":274,"context_line":"  the share type can not be greater than the specified value."}],"source_content_type":"text/x-rst","patch_set":5,"id":"d18bf7a0_88b7efd0","line":274,"range":{"start_line":274,"start_character":60,"end_line":274,"end_character":61},"updated":"2023-03-01 18:50:28.000000000","message":"There\u0027s a caveat here. This capability is ignored for regular users and the \"provisioning:max_share_size\" is the only effective limit. Can you please call this out","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"421588b61ddb61743e505629904a673709ff85fc","unresolved":false,"context_lines":[{"line_number":271,"context_line":"* **provisioning:max_share_extend_size** can set the max size of share extend,"},{"line_number":272,"context_line":"  the value must be an integer and greater than 0. If administrators set this"},{"line_number":273,"context_line":"  capability as an extra-spec in a share type, the size of share extended with"},{"line_number":274,"context_line":"  the share type can not be greater than the specified value."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ce0ea3a2_cf32e7c5","line":274,"range":{"start_line":274,"start_character":60,"end_line":274,"end_character":61},"in_reply_to":"d18bf7a0_88b7efd0","updated":"2023-03-10 14:46:54.000000000","message":"Done","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"}],"manila/share/api.py":[{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":true,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        # ensure we pass the share_type provisioning filter on size"},{"line_number":249,"context_line":"        share_types.provision_filter_on_size(context, share_type, size,"},{"line_number":250,"context_line":"                                             operation\u003d\u0027create\u0027)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        if snapshot is None:"},{"line_number":253,"context_line":"            share_type_id \u003d share_type[\u0027id\u0027] if share_type else None"}],"source_content_type":"text/x-python","patch_set":1,"id":"641e2841_62c1777b","line":250,"range":{"start_line":250,"start_character":44,"end_line":250,"end_character":64},"updated":"2022-11-07 08:43:41.000000000","message":"we can remove this, default operation is \u0027create\u0027 in function provision_filter_on_size.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        # ensure we pass the share_type provisioning filter on size"},{"line_number":249,"context_line":"        share_types.provision_filter_on_size(context, share_type, size,"},{"line_number":250,"context_line":"                                             operation\u003d\u0027create\u0027)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        if snapshot is None:"},{"line_number":253,"context_line":"            share_type_id \u003d share_type[\u0027id\u0027] if share_type else None"}],"source_content_type":"text/x-python","patch_set":1,"id":"f33e3db1_6ca9fd08","line":250,"range":{"start_line":250,"start_character":44,"end_line":250,"end_character":64},"in_reply_to":"641e2841_62c1777b","updated":"2022-11-07 13:35:18.000000000","message":"Done","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":true,"context_lines":[{"line_number":1706,"context_line":"            # ensure pass the size limitations in the share type"},{"line_number":1707,"context_line":"            size \u003d share[\u0027size\u0027]"},{"line_number":1708,"context_line":"            share_types.provision_filter_on_size(context, share_type, size,"},{"line_number":1709,"context_line":"                                                 operation\u003d\u0027create\u0027)"},{"line_number":1710,"context_line":"            new_share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1711,"context_line":"            dhss \u003d share_type[\u0027extra_specs\u0027][\u0027driver_handles_share_servers\u0027]"},{"line_number":1712,"context_line":"            dhss \u003d strutils.bool_from_string(dhss, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a1e97f90_ce87680a","line":1709,"range":{"start_line":1709,"start_character":48,"end_line":1709,"end_character":68},"updated":"2022-11-07 08:43:41.000000000","message":"we can remove this, default operation is \u0027create\u0027 in function provision_filter_on_size.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":false,"context_lines":[{"line_number":1706,"context_line":"            # ensure pass the size limitations in the share type"},{"line_number":1707,"context_line":"            size \u003d share[\u0027size\u0027]"},{"line_number":1708,"context_line":"            share_types.provision_filter_on_size(context, share_type, size,"},{"line_number":1709,"context_line":"                                                 operation\u003d\u0027create\u0027)"},{"line_number":1710,"context_line":"            new_share_type_id \u003d new_share_type[\u0027id\u0027]"},{"line_number":1711,"context_line":"            dhss \u003d share_type[\u0027extra_specs\u0027][\u0027driver_handles_share_servers\u0027]"},{"line_number":1712,"context_line":"            dhss \u003d strutils.bool_from_string(dhss, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"42074558_2612aa80","line":1709,"range":{"start_line":1709,"start_character":48,"end_line":1709,"end_character":68},"in_reply_to":"a1e97f90_ce87680a","updated":"2022-11-07 13:35:18.000000000","message":"Done","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":true,"context_lines":[{"line_number":2445,"context_line":"                context, share[\u0027instance\u0027][\u0027share_type_id\u0027])"},{"line_number":2446,"context_line":"        except (exception.InvalidShareType, exception.ShareTypeNotFound):"},{"line_number":2447,"context_line":"            share_type \u003d None"},{"line_number":2448,"context_line":"        if context.is_admin:"},{"line_number":2449,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2450,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2451,"context_line":"        else:"},{"line_number":2452,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2453,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2454,"context_line":""},{"line_number":2455,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2456,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"0125fac7_a4331480","line":2453,"range":{"start_line":2448,"start_character":8,"end_line":2453,"end_character":78},"updated":"2022-11-07 08:43:41.000000000","message":"in your bug describe:\nif max share size is 100 gb, max share extend size should be 150gb. This allows user to extend the share if its already created with max share size limit. However, this extend limit would again possibly ignored by admin i.e. admin can extend share to even 200gb or max value supported by provider\n\nadmin will ignore extend limit. limited only by the maximum share size. so maybe:\n\nshare_types.provision_filter_on_size(context, share_type, new_size)\nif not context.is_admin:\n    share_types.provision_filter_on_size(context, share_type,\n                                         new_size, operation\u003d\u0027extend\u0027)","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":true,"context_lines":[{"line_number":2445,"context_line":"                context, share[\u0027instance\u0027][\u0027share_type_id\u0027])"},{"line_number":2446,"context_line":"        except (exception.InvalidShareType, exception.ShareTypeNotFound):"},{"line_number":2447,"context_line":"            share_type \u003d None"},{"line_number":2448,"context_line":"        if context.is_admin:"},{"line_number":2449,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2450,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2451,"context_line":"        else:"},{"line_number":2452,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2453,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2454,"context_line":""},{"line_number":2455,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2456,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"56dfe671_a2da2704","line":2453,"range":{"start_line":2448,"start_character":8,"end_line":2453,"end_character":78},"in_reply_to":"0125fac7_a4331480","updated":"2022-11-07 13:35:18.000000000","message":"If I put limit only on non-admin user, it will change existing behaviour. Also, If we do not restrict admin to specify size within limits, admin can use any large number with which share creation is not possible on backend (might be he does by mistake). \nSo better to use share max size limit for non-admin and share extend max size limit for admin during extend operation. This will also preserve existing behaviour.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"fe0371d270f2ac964def36d29d78c63ac109a65a","unresolved":false,"context_lines":[{"line_number":2445,"context_line":"                context, share[\u0027instance\u0027][\u0027share_type_id\u0027])"},{"line_number":2446,"context_line":"        except (exception.InvalidShareType, exception.ShareTypeNotFound):"},{"line_number":2447,"context_line":"            share_type \u003d None"},{"line_number":2448,"context_line":"        if context.is_admin:"},{"line_number":2449,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2450,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2451,"context_line":"        else:"},{"line_number":2452,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2453,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2454,"context_line":""},{"line_number":2455,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2456,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"71db434e_1f9fb373","line":2453,"range":{"start_line":2448,"start_character":8,"end_line":2453,"end_character":78},"in_reply_to":"56dfe671_a2da2704","updated":"2022-11-08 05:42:16.000000000","message":"yes, i think that is right. This makes more sense than the bug describes.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"4e238d3b6dfdd91bd762bdd7718c65d8124f3403","unresolved":true,"context_lines":[{"line_number":2447,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2448,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2449,"context_line":"        else:"},{"line_number":2450,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2451,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2452,"context_line":""},{"line_number":2453,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2454,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"4220a535_ad3c9d3c","line":2451,"range":{"start_line":2450,"start_character":12,"end_line":2451,"end_character":78},"updated":"2022-11-23 01:43:09.000000000","message":"the code is a bit confuse. Why is it passing the operation as create if it is a extend operation here ? From a reader view, it is definitely not clear.","commit_id":"55027de13e64e378bd6ab4a9d14cbcb5b970ed89"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6a8ff434d863bdddffe7833f0012f9749576c9a0","unresolved":true,"context_lines":[{"line_number":2447,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2448,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2449,"context_line":"        else:"},{"line_number":2450,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2451,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2452,"context_line":""},{"line_number":2453,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2454,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"edc92f14_b7bded44","line":2451,"range":{"start_line":2450,"start_character":12,"end_line":2451,"end_character":78},"in_reply_to":"4220a535_ad3c9d3c","updated":"2022-11-23 08:39:21.000000000","message":"provision_filter_on_size() passing the operation as \u0027create\u0027 since function filters with max limit as value specified in key \u0027provisioning:max_share_size\u0027 if operation\nis passed as \u0027create\u0027 (for non-admin) and as value specified in key \u0027provisioning:max_share_extend_size\u0027 if operation is passed as \u0027extend\u0027\n(for admin).\n\nSeems this is confusing, so I change \u0027extend\u0027 to \u0027admin-extend\u0027 and \u0027create\u0027 to \u0027extend\u0027","commit_id":"55027de13e64e378bd6ab4a9d14cbcb5b970ed89"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"0e3f304b544e180adc0080c4f3ce9d185a0cfbe8","unresolved":false,"context_lines":[{"line_number":2447,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2448,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2449,"context_line":"        else:"},{"line_number":2450,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2451,"context_line":"                                                 new_size, operation\u003d\u0027create\u0027)"},{"line_number":2452,"context_line":""},{"line_number":2453,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2454,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"c89f9694_a115b232","line":2451,"range":{"start_line":2450,"start_character":12,"end_line":2451,"end_character":78},"in_reply_to":"edc92f14_b7bded44","updated":"2022-11-24 01:08:48.000000000","message":"Done","commit_id":"55027de13e64e378bd6ab4a9d14cbcb5b970ed89"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1af8bd004330a309ad14c84e96d653a1267da3bc","unresolved":true,"context_lines":[{"line_number":2448,"context_line":"                context, share[\u0027instance\u0027][\u0027share_type_id\u0027])"},{"line_number":2449,"context_line":"        except (exception.InvalidShareType, exception.ShareTypeNotFound):"},{"line_number":2450,"context_line":"            share_type \u003d None"},{"line_number":2451,"context_line":"        if context.is_admin:"},{"line_number":2452,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2453,"context_line":"                                                 new_size,"},{"line_number":2454,"context_line":"                                                 operation\u003d\u0027admin-extend\u0027)"},{"line_number":2455,"context_line":"        else:"},{"line_number":2456,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2457,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2458,"context_line":""},{"line_number":2459,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2460,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"99f68b76_7749c43f","line":2457,"range":{"start_line":2451,"start_character":8,"end_line":2457,"end_character":78},"updated":"2023-03-01 18:50:28.000000000","message":"the use of \"context.is_admin\" to gate actions lends poorly to our aim to make RBAC enforcement flexible and extensible.. \n\nI think we\u0027ll benefit from using a separate granular policy here, like the one we introduced for \"force_extend\". We can default that policy to ADMIN. Perhaps we could call this policy:\n\n \"extend_beyond_max_share_size_spec\"\n \nThat way, you can do:\n\n  allowed_to_extend_past_max_share_size \u003d policy.check_policy(\n                   context, \u0027share\u0027, \u0027extend_beyond_max_share_size_spec\u0027,\n                   target_obj\u003dshare, do_raise\u003dFalse)\n  if allowed_to_extend_past_max_share_size:\n     share_types.provision_filter_on_size(context, share_type,\n                                          new_size,\n                                          operation\u003d\u0027admin-extend\u0027)\n  else:\n     share_types.provision_filter_on_size(context, share_type,\n                                          new_size, operation\u003d\u0027extend\u0027)","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"421588b61ddb61743e505629904a673709ff85fc","unresolved":false,"context_lines":[{"line_number":2448,"context_line":"                context, share[\u0027instance\u0027][\u0027share_type_id\u0027])"},{"line_number":2449,"context_line":"        except (exception.InvalidShareType, exception.ShareTypeNotFound):"},{"line_number":2450,"context_line":"            share_type \u003d None"},{"line_number":2451,"context_line":"        if context.is_admin:"},{"line_number":2452,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2453,"context_line":"                                                 new_size,"},{"line_number":2454,"context_line":"                                                 operation\u003d\u0027admin-extend\u0027)"},{"line_number":2455,"context_line":"        else:"},{"line_number":2456,"context_line":"            share_types.provision_filter_on_size(context, share_type,"},{"line_number":2457,"context_line":"                                                 new_size, operation\u003d\u0027extend\u0027)"},{"line_number":2458,"context_line":""},{"line_number":2459,"context_line":"        replicas \u003d self.db.share_replicas_get_all_by_share("},{"line_number":2460,"context_line":"            context, share[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"6df60714_5bf37c3d","line":2457,"range":{"start_line":2451,"start_character":8,"end_line":2457,"end_character":78},"in_reply_to":"99f68b76_7749c43f","updated":"2023-03-10 14:46:54.000000000","message":"Done","commit_id":"25d858d8dd06f8f3a9a4111d263517797c6b3886"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"267f40e28c329295f228609d192fb283dfaa9b8c","unresolved":true,"context_lines":[{"line_number":2462,"context_line":"            share_type \u003d None"},{"line_number":2463,"context_line":""},{"line_number":2464,"context_line":"        allowed_to_extend_past_max_share_size \u003d policy.check_policy("},{"line_number":2465,"context_line":"            context, \u0027share\u0027, \u0027extend_beyond_max_share_size_spec\u0027,"},{"line_number":2466,"context_line":"            target_obj\u003dshare, do_raise\u003dFalse)"},{"line_number":2467,"context_line":"        if allowed_to_extend_past_max_share_size:"},{"line_number":2468,"context_line":"            share_types.provision_filter_on_size(context, share_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9d548c19_e112d13b","line":2465,"range":{"start_line":2465,"start_character":31,"end_line":2465,"end_character":64},"updated":"2023-05-30 19:08:16.000000000","message":"nit: could be a string set somewhere, so we don\u0027t need to continue re-declaring it :)","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3c140f2f9a51358418c2d4193e93a3d03023cbb5","unresolved":false,"context_lines":[{"line_number":2462,"context_line":"            share_type \u003d None"},{"line_number":2463,"context_line":""},{"line_number":2464,"context_line":"        allowed_to_extend_past_max_share_size \u003d policy.check_policy("},{"line_number":2465,"context_line":"            context, \u0027share\u0027, \u0027extend_beyond_max_share_size_spec\u0027,"},{"line_number":2466,"context_line":"            target_obj\u003dshare, do_raise\u003dFalse)"},{"line_number":2467,"context_line":"        if allowed_to_extend_past_max_share_size:"},{"line_number":2468,"context_line":"            share_types.provision_filter_on_size(context, share_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"48deff6b_53be853a","line":2465,"range":{"start_line":2465,"start_character":31,"end_line":2465,"end_character":64},"in_reply_to":"9d548c19_e112d13b","updated":"2023-05-31 03:32:24.000000000","message":"There are no references of policy name defined elsewhere. But it looks like we should do it, so declared in constants.","commit_id":"3bcc57f21e932cc9ac1992af68e43dbb53f08955"}],"manila/share/share_types.py":[{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":true,"context_lines":[{"line_number":435,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"def provision_filter_on_size(context, share_type, size, operation\u003dNone):"},{"line_number":439,"context_line":"    \"\"\"This function filters share provisioning requests on size limits."},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    If a share type has provisioning size min/max set, this filter"}],"source_content_type":"text/x-python","patch_set":1,"id":"b19648db_62188b7a","line":438,"range":{"start_line":438,"start_character":66,"end_line":438,"end_character":70},"updated":"2022-11-07 08:43:41.000000000","message":"\u0027create\u0027\n\nthat means the default value of operation is \u0027create\u0027.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"def provision_filter_on_size(context, share_type, size, operation\u003dNone):"},{"line_number":439,"context_line":"    \"\"\"This function filters share provisioning requests on size limits."},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    If a share type has provisioning size min/max set, this filter"}],"source_content_type":"text/x-python","patch_set":1,"id":"f5a652e6_3b882999","line":438,"range":{"start_line":438,"start_character":66,"end_line":438,"end_character":70},"in_reply_to":"b19648db_62188b7a","updated":"2022-11-07 13:35:18.000000000","message":"Done","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"4e41f7c1f7fed09fff13936c05f6525cb09b5cae","unresolved":true,"context_lines":[{"line_number":447,"context_line":"        if not share_type:"},{"line_number":448,"context_line":"            return"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    if operation is None:"},{"line_number":451,"context_line":"        operation \u003d \u0027create\u0027  # default operation"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    size_int \u003d int(size)"},{"line_number":454,"context_line":"    extra_specs \u003d share_type.get(\u0027extra_specs\u0027, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"24262daf_3f3e239a","line":451,"range":{"start_line":450,"start_character":4,"end_line":451,"end_character":49},"updated":"2022-11-07 08:43:41.000000000","message":"we can remove this two lines.","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"b4eedbd7fe0439c12f9532b8881f530f7ffb45bf","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        if not share_type:"},{"line_number":448,"context_line":"            return"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    if operation is None:"},{"line_number":451,"context_line":"        operation \u003d \u0027create\u0027  # default operation"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    size_int \u003d int(size)"},{"line_number":454,"context_line":"    extra_specs \u003d share_type.get(\u0027extra_specs\u0027, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"234e917c_bab25823","line":451,"range":{"start_line":450,"start_character":4,"end_line":451,"end_character":49},"in_reply_to":"24262daf_3f3e239a","updated":"2022-11-07 13:35:18.000000000","message":"Done","commit_id":"acdbbf15a4d9bcac9b49242e20ad26810ad13873"}]}
