)]}'
{"cinder/api/common.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"43da9327d614921f5fdcf73e796fb692f0ad4b99","unresolved":true,"context_lines":[{"line_number":445,"context_line":"                    \"%s~\" % key in configured_filters):"},{"line_number":446,"context_line":"                invalid_filters.append(key)"},{"line_number":447,"context_line":"    if invalid_filters:"},{"line_number":448,"context_line":"        if \u0027all_tenants\u0027 in invalid_filters:"},{"line_number":449,"context_line":"            invalid_filters.remove(\u0027all_tenants\u0027)"},{"line_number":450,"context_line":"            filters.pop(\u0027all_tenants\u0027)"},{"line_number":451,"context_line":"        if len(invalid_filters) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3733cc8c_61aed51c","line":448,"updated":"2021-03-30 12:57:25.000000000","message":"I suggest adding a comment here:\n\nNOTE: this is a special case: the cinderclient always adds \u0027all_tenants\u0027, so we don\u0027t want to hold that against a non-admin user and we silently ignore it.  See Bug #1917574.","commit_id":"fc41aaadd6aa5f9f9a30c18d4198ec43dbd05b19"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3228c3e80a177c4382f59207d622b4d636023998","unresolved":true,"context_lines":[{"line_number":450,"context_line":"            # \u0027all_tenants\u0027, so we don\u0027t want to hold that against a non-admin"},{"line_number":451,"context_line":"            # user and we silently ignore it.  See Bug #1917574."},{"line_number":452,"context_line":"            invalid_filters.remove(\u0027all_tenants\u0027)"},{"line_number":453,"context_line":"            filters.pop(\u0027all_tenants\u0027)"},{"line_number":454,"context_line":"        if len(invalid_filters) \u003d\u003d 0:"},{"line_number":455,"context_line":"            return"},{"line_number":456,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":10,"id":"dd718899_19ab101f","line":453,"updated":"2021-04-06 12:53:34.000000000","message":"The admin case is handled at line 428 (and it\u0027s covered by a unit test).","commit_id":"b6608bd5b50c74c79eaac0c8a298419b6362633e"}],"cinder/api/contrib/backups.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cdaf597a1b652a0311478027452e24edfc8c8576","unresolved":true,"context_lines":[{"line_number":87,"context_line":"        api_utils.remove_invalid_filter_options("},{"line_number":88,"context_line":"            context,"},{"line_number":89,"context_line":"            filters,"},{"line_number":90,"context_line":"            common.get_enabled_resource_filters(\u0027backup\u0027).get(\u0027backup\u0027, []))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _convert_sort_name(self, req_version, sort_keys):"},{"line_number":93,"context_line":"        \"\"\"Convert sort key \"name\" to \"display_name\". \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"2baa27a6_9e3fea58","line":90,"updated":"2021-03-24 15:12:34.000000000","message":"isn\u0027t this class used by both v2 and v3?  And resource_filters is only a v3 thing.  I think using the resource filters is handled by the decorator.","commit_id":"449784e86ff0b10335f2b4807c9a09f8a4aa4256"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"32eb637bc836e88b967e55019e869ce21cbb4da8","unresolved":true,"context_lines":[{"line_number":87,"context_line":"        api_utils.remove_invalid_filter_options("},{"line_number":88,"context_line":"            context,"},{"line_number":89,"context_line":"            filters,"},{"line_number":90,"context_line":"            common.get_enabled_resource_filters(\u0027backup\u0027).get(\u0027backup\u0027, []))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _convert_sort_name(self, req_version, sort_keys):"},{"line_number":93,"context_line":"        \"\"\"Convert sort key \"name\" to \"display_name\". \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"8d6636af_448b32a3","line":90,"in_reply_to":"2baa27a6_9e3fea58","updated":"2021-03-29 07:25:26.000000000","message":"I did this change to make all API\u0027s consistent and there are a few things i considered before making this change:\n1) V3 backup code calls the index/detail here which in turn calls this method for filtering\n2) get_enabled_resource_filters was introduced in Pike (before which we will never backport this change) and it doesn\u0027t do any microversion check, so it\u0027s safe to assume this will never throw an error\n3) This causes a limitation for the V3 backup API that the filters are hardcoded and not configurable by admin in resource_filters.json file\n4) Similar change is done for v2 volumes API[1] (although I\u0027m not sure it\u0027s entirely correct and if that relates with my intention here)\n\nBut thinking about this again, maybe it will make more sense when we remove the V2 API, move methods to V3 only and then introduce this change. Let me know your thoughts.\n\n[1] https://github.com/openstack/cinder/commit/ee1ac541253c42e3d94c907cb5b49a1172d68817","commit_id":"449784e86ff0b10335f2b4807c9a09f8a4aa4256"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"89dd9d06298b09190de692ab5a4e3792467aa606","unresolved":true,"context_lines":[{"line_number":87,"context_line":"        api_utils.remove_invalid_filter_options("},{"line_number":88,"context_line":"            context,"},{"line_number":89,"context_line":"            filters,"},{"line_number":90,"context_line":"            common.get_enabled_resource_filters(\u0027backup\u0027).get(\u0027backup\u0027, []))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _convert_sort_name(self, req_version, sort_keys):"},{"line_number":93,"context_line":"        \"\"\"Convert sort key \"name\" to \"display_name\". \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"65737b64_f4830a61","line":90,"in_reply_to":"8d6636af_448b32a3","updated":"2021-03-30 08:07:03.000000000","message":"I really don\u0027t know why i made this change since i realized that code never reaches this patch if we specify MV\u003e\u003d3.31\nyou\u0027re correct the decorator handles the general filtering and this method is only executed if MV\u003c\u003d3.31\nThe functionality behaves correctly with resource_filters.json file for backups so please ignore my previous comment.\nI\u0027ve reverted the changes here and in snapshots. Apologies for all the confusion.","commit_id":"449784e86ff0b10335f2b4807c9a09f8a4aa4256"}],"releasenotes/notes/fix-show-volume-non-admins-1bc5238398e73981.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cdaf597a1b652a0311478027452e24edfc8c8576","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1917574 \u003chttps://bugs.launchpad.net/cinder/+bug/1917574\u003e`_:"},{"line_number":5,"context_line":"    Fixed issue where non-admin users could not show a volume by name"},{"line_number":6,"context_line":"    with microversion \u003e\u003d 3.31"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"d515a849_45b2ab6b","line":6,"range":{"start_line":5,"start_character":0,"end_line":6,"end_character":29},"updated":"2021-03-24 15:12:34.000000000","message":"this is misleading because no one can show a volume by name in the REST API, it\u0027s done client-side by filtering the list-volume response, right?","commit_id":"449784e86ff0b10335f2b4807c9a09f8a4aa4256"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"32eb637bc836e88b967e55019e869ce21cbb4da8","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1917574 \u003chttps://bugs.launchpad.net/cinder/+bug/1917574\u003e`_:"},{"line_number":5,"context_line":"    Fixed issue where non-admin users could not show a volume by name"},{"line_number":6,"context_line":"    with microversion \u003e\u003d 3.31"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"7dc25242_9e86f94c","line":6,"range":{"start_line":5,"start_character":0,"end_line":6,"end_character":29},"in_reply_to":"d515a849_45b2ab6b","updated":"2021-03-29 07:25:26.000000000","message":"Correct, i will reword it.","commit_id":"449784e86ff0b10335f2b4807c9a09f8a4aa4256"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7d4c23fb46f6d8a1e5f331b48b11ac70ed338909","unresolved":true,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1917574 \u003chttps://bugs.launchpad.net/cinder/+bug/1917574\u003e`_:"},{"line_number":5,"context_line":"    Fixed issue when cinderclient requests to show volume by name for"},{"line_number":6,"context_line":"    non-admin users."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"790c6517_0519b1c2","line":6,"range":{"start_line":6,"start_character":19,"end_line":6,"end_character":20},"updated":"2021-03-30 13:01:56.000000000","message":"would result in the volume not being found for microversions 3.31 or later.","commit_id":"fc41aaadd6aa5f9f9a30c18d4198ec43dbd05b19"},{"author":{"_account_id":29122,"name":"Raghavendra Tilay","email":"raghavendra-uddhav.tilay@hpe.com","username":"raghavendrat"},"change_message_id":"c307275ee44ec5b4f1335b5b5ee5a0440bd5237f","unresolved":true,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1917574 \u003chttps://bugs.launchpad.net/cinder/+bug/1917574\u003e`_:"},{"line_number":5,"context_line":"    Fixed issue when cinderclient requests to show volume by name for"},{"line_number":6,"context_line":"    non-admin users would results in the volume not being found for"},{"line_number":7,"context_line":"    microversions 3.31 or later."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"db02af94_bddd9c26","line":6,"range":{"start_line":6,"start_character":20,"end_line":6,"end_character":34},"updated":"2021-04-01 09:32:41.000000000","message":"nit: would result ?","commit_id":"b6608bd5b50c74c79eaac0c8a298419b6362633e"}]}
