)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"8340a6bea65c2949912d21ba762a36a27f892316","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Vadym Markov \u003cvmarkov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-11-14 15:51:28 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make \"find resource\" case sensitive by default"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By default, only user, project and role are handled as case-insensitive"},{"line_number":10,"context_line":"resources. Due to this, we have discrepancy between openstacksdk and CLI"},{"line_number":11,"context_line":"results. Proposed patch fixes it"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Story: 2009851"},{"line_number":14,"context_line":"Task: 44474"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"12a7ba24_0062e37e","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":32},"updated":"2023-10-06 11:17:25.000000000","message":"How about re-wording a bit\n\n```\nMake Keystone resources search case-insensitive\n\nmost of Keystone resources are in fact case-insensitive [0],\nbut find resource in SDK treats everything as case-sensitive.\nAs a result, there\u0027s a discrepancy between API and SDK.\n\nThis patch adds a class attribute \u0027case_sensitive_search\" to\nResource class (defaults to True) and overrides it to False\nfor relevant Keystone resources.\n```","commit_id":"9dd068298d4a960812b51696eec97e7e5bc03e6e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":27838,"name":"Vadym Markov","email":"vmarkov@mirantis.com","username":"vmarkov"},"change_message_id":"5f36bd1c76ddfb44ffa26d831cb0b942d6938492","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bf42a986_8d8c500d","updated":"2022-02-17 12:12:14.000000000","message":"recheck","commit_id":"e73c88f8594d444bf9bac6f5d07805c9b3baca45"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"b23a444d57be1b4f5beec0e4fb72cb216ef679c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5ceb8384_0e5a7704","updated":"2022-11-18 17:00:16.000000000","message":"I do not really get the point. Your description tells \"make find case sensitive by default\" - it is right now case sensitive. Your implementation tries to add support for case-insensitive search. For that I would rather go and add parameter into the find method and not introduce a whole new class property.\nIn order to fix discrepancy between sdk and cli I would go to cli and switch it to use sdk for identity ops (this is anyway a big TODO)","commit_id":"9dd068298d4a960812b51696eec97e7e5bc03e6e"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"8340a6bea65c2949912d21ba762a36a27f892316","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"54916808_d5fb3107","in_reply_to":"5ceb8384_0e5a7704","updated":"2023-10-06 11:17:25.000000000","message":"@Artem,\n\nI agree that the commit message could\u0027ve been clearer.\n\nOn the other hand,\nadding new parameter to the find method is just shifting responsibility to the user, who now has to know that specifically some keystone resource names are generally and usually case insensitive.\n\nThe real problem is not discrepancy with CLI, but discrepancy with API.\n\nE.g. if I want to create a role \"Member\", but I do have a role \"member\" already, I first check that the role exists and:\n- in API, I search for \"Member\" and get \"member\" in return, and I understand I do not have to create anything.\n\n```\n$ curl https://keystone.it.just.works/v3/roles?name\u003dMember\n{\n    \"roles\": [\n        {\n            \"description\": null,\n            \"domain_id\": null,\n            \"id\": \"0ffa2b4bd50b40c2b9bce0f4afed66dd\",\n            \"links\": {\n                \"self\": \"https://keystone.it.just.works/v3/roles/0ffa2b4bd50b40c2b9bce0f4afed66dd\"\n            },\n            \"name\": \"member\",\n            \"options\": {\n                \"immutable\": true\n            }\n        }\n    ]\n}\n\n```\n\n- with SDK, I search for \"Member\", I get nothing in return, I try to create role \"Member\" and get an error\n\n```\nIn [1]: import openstack; cloud \u003d openstack.connect()\n\nIn [2]: role \u003d cloud.identity.find_role(\"Member\", ignore_missing\u003dTrue)\n\nIn [3]: if not role:\n   ...:     cloud.identity.create_role(name\u003d\"Member\")\nConflictException: ConflictException: 409: Client Error for url: https://keystone.it.just.works/v3/roles, Conflict occurred attempting to store role - Duplicate entry found with name Member.\n```","commit_id":"9dd068298d4a960812b51696eec97e7e5bc03e6e"}],"openstack/resource.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7afb663b1d14c62335fb470f1919a27e8c1ecdcb","unresolved":false,"context_lines":[{"line_number":1951,"context_line":"                match \u003d name_or_id in [name_value, id_value]"},{"line_number":1952,"context_line":"            else:"},{"line_number":1953,"context_line":"                match \u003d name_or_id.lower() in map(lambda x: x.lower(),"},{"line_number":1954,"context_line":"                                                  [name_value, id_value])"},{"line_number":1955,"context_line":""},{"line_number":1956,"context_line":"            if match:"},{"line_number":1957,"context_line":"                # Only allow one resource to be found. If we already"}],"source_content_type":"text/x-python","patch_set":2,"id":"d77c5637_1254157a","line":1954,"updated":"2022-03-03 10:58:09.000000000","message":"nit: I\u0027d just use [name_value.lower(), id_value.lower()]","commit_id":"e73c88f8594d444bf9bac6f5d07805c9b3baca45"}],"openstack/tests/unit/test_resource.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7afb663b1d14c62335fb470f1919a27e8c1ecdcb","unresolved":false,"context_lines":[{"line_number":2948,"context_line":"        match \u003d mock.Mock(spec\u003dCaseSensitiveResource)"},{"line_number":2949,"context_line":"        match.name \u003d the_name"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":"        result \u003d CaseSensitiveResource._get_one_match(the_name.lower(),"},{"line_number":2952,"context_line":"                                                      [match])"},{"line_number":2953,"context_line":""},{"line_number":2954,"context_line":"        self.assertIs(result, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"49180daa_77ee7c52","line":2951,"updated":"2022-03-03 10:58:09.000000000","message":"Let\u0027s also test that the non-lower-cased name actually does match.","commit_id":"e73c88f8594d444bf9bac6f5d07805c9b3baca45"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7afb663b1d14c62335fb470f1919a27e8c1ecdcb","unresolved":false,"context_lines":[{"line_number":2951,"context_line":"        result \u003d CaseSensitiveResource._get_one_match(the_name.lower(),"},{"line_number":2952,"context_line":"                                                      [match])"},{"line_number":2953,"context_line":""},{"line_number":2954,"context_line":"        self.assertIs(result, None)"},{"line_number":2955,"context_line":""},{"line_number":2956,"context_line":""},{"line_number":2957,"context_line":"class TestWaitForStatus(base.TestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"163c6955_1da2dfd2","line":2954,"updated":"2022-03-03 10:58:09.000000000","message":"nit: assertIsNone","commit_id":"e73c88f8594d444bf9bac6f5d07805c9b3baca45"}]}
