)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Reynaldo \u003crey.bontje80@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-03-21 20:57:45 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modify the create/fetch method of the base resource to"},{"line_number":8,"context_line":"support different request/response keys."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: I9d928a55539c17ab54d983165afc7912cd0926f8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"b102850b_d81f5ba7","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":40},"updated":"2023-03-25 01:01:54.000000000","message":"Use a succinct commit message title here, perhaps:\n\n Allow key overrides in create and fetch methods\n\nYou can explain the motivation in the commit message as Artem seeks. \nThe main goal here is to prevent the _prepare_request and _translate_response methods to be overridden in subresources in a hacky manner to support resource APIs where there\u0027s changes in the request/response key.","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"5e3cd12c4532f815f11029cf0af0b454b69829ee","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Reynaldo \u003crey.bontje80@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-03-21 20:57:45 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modify the create/fetch method of the base resource to"},{"line_number":8,"context_line":"support different request/response keys."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: I9d928a55539c17ab54d983165afc7912cd0926f8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"2952280e_d03820f5","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":40},"in_reply_to":"b102850b_d81f5ba7","updated":"2023-03-27 16:42:16.000000000","message":"Thanks for the recommendation. I\u0027ve modified the commit message and will get to working on your other recommendations.","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"6cd4311c9b6a1b31a30df67746a09eb1f42cb51c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3089e4eb_3b0af3ff","updated":"2023-03-21 19:30:19.000000000","message":"Reason for this change:\n\nThere are some hacks all over the place that achieves this same result. With consistency as a goal, changing this will mean less hacks are needed to override the request/response key. See https://review.opendev.org/c/openstack/openstacksdk/+/783582/7..8 for an example of why this is a desirable change.","commit_id":"06637df89aeedefa3da3f144ccc1c092b4024315"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e19d02551a31bc0e9f339657fe7d6f80a6fbccc8","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c37030d4_5599e688","in_reply_to":"3089e4eb_3b0af3ff","updated":"2023-03-21 20:17:39.000000000","message":"For more detail, the pattern of overriding _prepare_request, _prepare_request_body, and/or _translate_response is used in at least 15 other places (see https://pastebin.com/TtT9UmKw for detail). As the SDK grows, the need to override these will grow as well, so it\u0027s better to make these more flexible in order to prevent the need to override these in too many places. For now, this patch only addresses the create/fetch methods.","commit_id":"06637df89aeedefa3da3f144ccc1c092b4024315"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e7215e6a_cae51675","updated":"2023-03-25 01:01:54.000000000","message":"Hey Rey, \n\nThanks for working on this. As Artem commented, this change is missing context for reviewers to see what you\u0027re changing :) It\u0027s better to eplain the reasoning in the commit message or with inline comments. \n\nWe should also try to have a unit test or two in the test_resource.py file for your changes. Here\u0027s an example test that checks the behavior of prepend_key:\n\nhttps://github.com/openstack/openstacksdk/blob/1dfbe9673a7cdc58499e752948ab7203ec3b1fce/openstack/tests/unit/test_resource.py#L1098-L1116","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"f3c15d92093c66294ec8dfac0f2dc5d268af346f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4ec2bf3c_33df6b63","updated":"2023-03-24 09:52:05.000000000","message":"I see lot of changes in the code with 0 changes in tests. I also do not really get neither from implementation, nor from change description, purpose of it.","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0398b4fb_86712dd1","updated":"2023-03-29 17:05:15.000000000","message":"Thanks for the reviews. I also added tests for overridden keys.","commit_id":"002de173022fae9f41eba3d468d758a57b12cd30"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"61972347ae5dc6aaf8e267f8b0f48cb4c83bb2ad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"c021e049_11c05d50","updated":"2023-04-04 07:23:38.000000000","message":"Sorry, I apparently has been posting review while having previous PS version and test file was simply not present in the changes. Thanks, I see it now.\n","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"6c4bc3a4932e59d85100d5e301b7214649659551","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"03312ef2_968cd7c2","updated":"2023-03-31 08:09:10.000000000","message":"Thanks, now I know why this is needed and in general it is ok to have it here. But since you are touching one of the crucial generalization parts it is absolutely mandatory to have unittest coverage for that (not in the inheriting classes where this functionality is being used, but rather directly in the tests of the base class)","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d6c5c2b09d23ef4d6df517ec553d958a82fd909f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"742460f5_c6a4ae19","updated":"2023-03-29 20:12:20.000000000","message":"This looks great, thank you for this enhancement Reynaldo! \nI see how this change can be used via https://review.opendev.org/c/openstack/openstacksdk/+/783582/ and that seems like a nice readable and maintainable pattern.. \n","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"63c30a12bce0bd38c8145f6221e3c6c0d2f9fc7d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"046883c7_3460d199","in_reply_to":"03312ef2_968cd7c2","updated":"2023-04-04 01:11:14.000000000","message":"Please review the changes I made to the `openstack/tests/unit/test_resource.py` to see the tests I wrote for the changes I made. If the coverage isn\u0027t sufficient, then I can add more tests (if you have any ideas for more tests, I\u0027d appreciate it), although I think I covered all the changes I made.","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2aa34fc9a22c924a52f73875194ff4c1f4e38832","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"d061b4c8_c2d200c9","updated":"2023-04-11 22:58:36.000000000","message":"Thank you, waiting on CI to +2","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"2cc04408_07d09d2d","updated":"2023-04-19 22:41:27.000000000","message":"Am okay doing a different patch for the other methods where we could add these override keys behavior.. Thanks Rey and Stephen","commit_id":"aab02350650be4e49b2fca36d69df66da6feab40"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"5bf7a8bcb30d4ea984b0713de80bc3182cc955b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"5385bcd2_a55ffa59","updated":"2023-04-18 23:31:52.000000000","message":"Checking over cause of failure from CI for Share Network Subnets patch that relies on this patch. Might be a side-effect.\n\nhttps://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_e31/783582/17/check/openstacksdk-functional-devstack-manila/e31c840/testr_results.html","commit_id":"aab02350650be4e49b2fca36d69df66da6feab40"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"afd69914711cccfd0d5289666e9964d99dd83012","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"c6d97312_4c214575","in_reply_to":"5385bcd2_a55ffa59","updated":"2023-04-19 00:20:27.000000000","message":"Nope, not a side-effect, per se. I just used the wrong kwarg argument for resource_request_key in that patch I linked, which was what caused the CI to fail.","commit_id":"aab02350650be4e49b2fca36d69df66da6feab40"}],"openstack/resource.py":[{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"6cd4311c9b6a1b31a30df67746a09eb1f42cb51c","unresolved":true,"context_lines":[{"line_number":1181,"context_line":"                    self._body.dirty"},{"line_number":1182,"context_line":"                )"},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"            if prepend_key and self.resource_key is not None:"},{"line_number":1185,"context_line":"                if request_key is not None:"},{"line_number":1186,"context_line":"                    body \u003d {request_key: body}"},{"line_number":1187,"context_line":"                else:"},{"line_number":1188,"context_line":"                    body \u003d {self.resource_key: body}"},{"line_number":1189,"context_line":"        return body"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    def _prepare_request("}],"source_content_type":"text/x-python","patch_set":1,"id":"594e66ab_0ecfdd7f","line":1188,"range":{"start_line":1184,"start_character":0,"end_line":1188,"end_character":52},"updated":"2023-03-21 19:30:19.000000000","message":"Change `if prepend_key and self.resource_key...` to `if ... and request_key ... elif ... self.resource_key`","commit_id":"06637df89aeedefa3da3f144ccc1c092b4024315"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e19d02551a31bc0e9f339657fe7d6f80a6fbccc8","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"                    self._body.dirty"},{"line_number":1182,"context_line":"                )"},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"            if prepend_key and self.resource_key is not None:"},{"line_number":1185,"context_line":"                if request_key is not None:"},{"line_number":1186,"context_line":"                    body \u003d {request_key: body}"},{"line_number":1187,"context_line":"                else:"},{"line_number":1188,"context_line":"                    body \u003d {self.resource_key: body}"},{"line_number":1189,"context_line":"        return body"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    def _prepare_request("}],"source_content_type":"text/x-python","patch_set":1,"id":"2a58e1bb_072770da","line":1188,"range":{"start_line":1184,"start_character":0,"end_line":1188,"end_character":52},"in_reply_to":"594e66ab_0ecfdd7f","updated":"2023-03-21 20:17:39.000000000","message":"Done","commit_id":"06637df89aeedefa3da3f144ccc1c092b4024315"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1214,"context_line":"        \"\"\""},{"line_number":1215,"context_line":"        if requires_id is None:"},{"line_number":1216,"context_line":"            requires_id \u003d self.requires_id"},{"line_number":1217,"context_line":"        if request_key is not None:"},{"line_number":1218,"context_line":"            body \u003d self._prepare_request_body(patch, prepend_key, request_key)"},{"line_number":1219,"context_line":"        else:"},{"line_number":1220,"context_line":"            body \u003d self._prepare_request_body(patch, prepend_key)"},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"        # TODO(mordred) Ensure headers have string values better than this"},{"line_number":1223,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"a1428c81_707e400b","line":1220,"range":{"start_line":1217,"start_character":0,"end_line":1220,"end_character":65},"updated":"2023-03-25 01:01:54.000000000","message":"since you have logic in the _prepare_request_body to discard a null request_key, you can keep this simple:\n\n body \u003d self._prepare_request_body(patch, prepend_key, request_key)","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"        \"\"\""},{"line_number":1215,"context_line":"        if requires_id is None:"},{"line_number":1216,"context_line":"            requires_id \u003d self.requires_id"},{"line_number":1217,"context_line":"        if request_key is not None:"},{"line_number":1218,"context_line":"            body \u003d self._prepare_request_body(patch, prepend_key, request_key)"},{"line_number":1219,"context_line":"        else:"},{"line_number":1220,"context_line":"            body \u003d self._prepare_request_body(patch, prepend_key)"},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"        # TODO(mordred) Ensure headers have string values better than this"},{"line_number":1223,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"392218b5_b858b811","line":1220,"range":{"start_line":1217,"start_character":0,"end_line":1220,"end_character":65},"in_reply_to":"a1428c81_707e400b","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1442,"context_line":"        :param str base_path: Base part of the URI for creating resources, if"},{"line_number":1443,"context_line":"            different from :data:`~openstack.resource.Resource.base_path`."},{"line_number":1444,"context_line":"        :param str request_key: Overrides the usage of self.resource_key"},{"line_number":1445,"context_line":"            when prepending a key to the request body."},{"line_number":1446,"context_line":"        :param str response_key: Overrides the usage of self.resource_key"},{"line_number":1447,"context_line":"            when processing response bodies."},{"line_number":1448,"context_line":"        :param str microversion: API version to override the negotiated one."}],"source_content_type":"text/x-python","patch_set":4,"id":"2ec42280_60f4a537","line":1445,"range":{"start_line":1445,"start_character":53,"end_line":1445,"end_character":54},"updated":"2023-03-25 01:01:54.000000000","message":"add, Ignored if prepend_key is set to False","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"        :param str base_path: Base part of the URI for creating resources, if"},{"line_number":1443,"context_line":"            different from :data:`~openstack.resource.Resource.base_path`."},{"line_number":1444,"context_line":"        :param str request_key: Overrides the usage of self.resource_key"},{"line_number":1445,"context_line":"            when prepending a key to the request body."},{"line_number":1446,"context_line":"        :param str response_key: Overrides the usage of self.resource_key"},{"line_number":1447,"context_line":"            when processing response bodies."},{"line_number":1448,"context_line":"        :param str microversion: API version to override the negotiated one."}],"source_content_type":"text/x-python","patch_set":4,"id":"951a0092_824fbfa9","line":1445,"range":{"start_line":1445,"start_character":53,"end_line":1445,"end_character":54},"in_reply_to":"2ec42280_60f4a537","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1444,"context_line":"        :param str request_key: Overrides the usage of self.resource_key"},{"line_number":1445,"context_line":"            when prepending a key to the request body."},{"line_number":1446,"context_line":"        :param str response_key: Overrides the usage of self.resource_key"},{"line_number":1447,"context_line":"            when processing response bodies."},{"line_number":1448,"context_line":"        :param str microversion: API version to override the negotiated one."},{"line_number":1449,"context_line":"        :param dict params: Additional params to pass."},{"line_number":1450,"context_line":"        :return: This :class:`Resource` instance."}],"source_content_type":"text/x-python","patch_set":4,"id":"f72e9335_d8f5a770","line":1447,"range":{"start_line":1447,"start_character":42,"end_line":1447,"end_character":44},"updated":"2023-03-25 01:01:54.000000000","message":"add, Ignored if prepend_key is set to False","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"        :param str request_key: Overrides the usage of self.resource_key"},{"line_number":1445,"context_line":"            when prepending a key to the request body."},{"line_number":1446,"context_line":"        :param str response_key: Overrides the usage of self.resource_key"},{"line_number":1447,"context_line":"            when processing response bodies."},{"line_number":1448,"context_line":"        :param str microversion: API version to override the negotiated one."},{"line_number":1449,"context_line":"        :param dict params: Additional params to pass."},{"line_number":1450,"context_line":"        :return: This :class:`Resource` instance."}],"source_content_type":"text/x-python","patch_set":4,"id":"7f4028b6_ac490f6a","line":1447,"range":{"start_line":1447,"start_character":42,"end_line":1447,"end_character":44},"in_reply_to":"f72e9335_d8f5a770","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1467,"context_line":"            self._body._dirty.discard(\"id\")"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        if self.create_method \u003d\u003d \u0027PUT\u0027:"},{"line_number":1470,"context_line":"            if request_key is not None:"},{"line_number":1471,"context_line":"                request \u003d self._prepare_request("},{"line_number":1472,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1473,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1474,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1475,"context_line":"                    request_key\u003drequest_key,"},{"line_number":1476,"context_line":"                )"},{"line_number":1477,"context_line":"            else:"},{"line_number":1478,"context_line":"                request \u003d self._prepare_request("},{"line_number":1479,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1480,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1481,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1482,"context_line":"                )"},{"line_number":1483,"context_line":"            response \u003d session.put("},{"line_number":1484,"context_line":"                request.url,"},{"line_number":1485,"context_line":"                json\u003drequest.body,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da50fd1c_071254d2","line":1482,"range":{"start_line":1470,"start_character":12,"end_line":1482,"end_character":17},"updated":"2023-03-25 01:01:54.000000000","message":"the condition isn\u0027t required, and makes this less readable\n\nis the problem that there are overrides of _prepare_request [1] in many resources?\nif yes, we should modify their signatures to either add request_key, or a catchall **kwargs. \n\nAlternatively, we can use selective inclusion like this:\n\n \n   if self.create_exclude_id_from_body:\n            self._body._dirty.discard(\"id\")\n   prepare_request_kwargs \u003d {\n       \u0027requires_id\u0027: requires_id,\n       \u0027prepend_key\u0027: prepend_key,\n       \u0027base_path\u0027: base_path,\n   }\n   if request_key:\n      prepare_request_kwargs.update({\u0027request_key\u0027: request_key})\n#\n   request \u003d self._prepare_request(**prepare_request_kwargs)\n#\n   if self.create_method \u003d\u003d \u0027PUT\u0027:\n      response \u003d session.put(\n                request.url,\n                json\u003drequest.body,\n                headers\u003drequest.headers,\n                microversion\u003dmicroversion,\n                params\u003dparams,\n      )\n   elif self.create_method \u003d\u003d \u0027POST\u0027:\n      response \u003d session.post(\n                request.url,\n                json\u003drequest.body,\n                headers\u003drequest.headers,\n                microversion\u003dmicroversion,\n                params\u003dparams,\n      )\n    else:\n       ...\n      \n\n\n[1] https://codesearch.opendev.org/?q\u003ddef%20_prepare_request\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003dopenstack/openstacksdk","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"            self._body._dirty.discard(\"id\")"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        if self.create_method \u003d\u003d \u0027PUT\u0027:"},{"line_number":1470,"context_line":"            if request_key is not None:"},{"line_number":1471,"context_line":"                request \u003d self._prepare_request("},{"line_number":1472,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1473,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1474,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1475,"context_line":"                    request_key\u003drequest_key,"},{"line_number":1476,"context_line":"                )"},{"line_number":1477,"context_line":"            else:"},{"line_number":1478,"context_line":"                request \u003d self._prepare_request("},{"line_number":1479,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1480,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1481,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1482,"context_line":"                )"},{"line_number":1483,"context_line":"            response \u003d session.put("},{"line_number":1484,"context_line":"                request.url,"},{"line_number":1485,"context_line":"                json\u003drequest.body,"}],"source_content_type":"text/x-python","patch_set":4,"id":"f16ae37d_c222dfd3","line":1482,"range":{"start_line":1470,"start_character":12,"end_line":1482,"end_character":17},"in_reply_to":"da50fd1c_071254d2","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1488,"context_line":"                params\u003dparams,"},{"line_number":1489,"context_line":"            )"},{"line_number":1490,"context_line":"        elif self.create_method \u003d\u003d \u0027POST\u0027:"},{"line_number":1491,"context_line":"            if request_key is not None:"},{"line_number":1492,"context_line":"                request \u003d self._prepare_request("},{"line_number":1493,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1494,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1495,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1496,"context_line":"                    request_key\u003drequest_key,"},{"line_number":1497,"context_line":"                )"},{"line_number":1498,"context_line":"            else:"},{"line_number":1499,"context_line":"                request \u003d self._prepare_request("},{"line_number":1500,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1501,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1502,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1503,"context_line":"                )"},{"line_number":1504,"context_line":"            response \u003d session.post("},{"line_number":1505,"context_line":"                request.url,"},{"line_number":1506,"context_line":"                json\u003drequest.body,"}],"source_content_type":"text/x-python","patch_set":4,"id":"d945b8a8_83062dd6","line":1503,"range":{"start_line":1491,"start_character":12,"end_line":1503,"end_character":17},"updated":"2023-03-25 01:01:54.000000000","message":"same comment as above","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"                params\u003dparams,"},{"line_number":1489,"context_line":"            )"},{"line_number":1490,"context_line":"        elif self.create_method \u003d\u003d \u0027POST\u0027:"},{"line_number":1491,"context_line":"            if request_key is not None:"},{"line_number":1492,"context_line":"                request \u003d self._prepare_request("},{"line_number":1493,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1494,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1495,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1496,"context_line":"                    request_key\u003drequest_key,"},{"line_number":1497,"context_line":"                )"},{"line_number":1498,"context_line":"            else:"},{"line_number":1499,"context_line":"                request \u003d self._prepare_request("},{"line_number":1500,"context_line":"                    requires_id\u003drequires_id,"},{"line_number":1501,"context_line":"                    prepend_key\u003dprepend_key,"},{"line_number":1502,"context_line":"                    base_path\u003dbase_path,"},{"line_number":1503,"context_line":"                )"},{"line_number":1504,"context_line":"            response \u003d session.post("},{"line_number":1505,"context_line":"                request.url,"},{"line_number":1506,"context_line":"                json\u003drequest.body,"}],"source_content_type":"text/x-python","patch_set":4,"id":"007f3a0b_ef0f21eb","line":1503,"range":{"start_line":1491,"start_character":12,"end_line":1503,"end_character":17},"in_reply_to":"d945b8a8_83062dd6","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1519,"context_line":"            else self.create_returns_body"},{"line_number":1520,"context_line":"        )"},{"line_number":1521,"context_line":"        self.microversion \u003d microversion"},{"line_number":1522,"context_line":"        if response_key is not None:"},{"line_number":1523,"context_line":"            self._translate_response("},{"line_number":1524,"context_line":"                response,"},{"line_number":1525,"context_line":"                has_body\u003dhas_body,"},{"line_number":1526,"context_line":"                response_key\u003dresponse_key)"},{"line_number":1527,"context_line":"        else:"},{"line_number":1528,"context_line":"            self._translate_response(response, has_body\u003dhas_body)"},{"line_number":1529,"context_line":"        # direct comparision to False since we need to rule out None"},{"line_number":1530,"context_line":"        if self.has_body and self.create_returns_body is False:"},{"line_number":1531,"context_line":"            # fetch the body if it\u0027s required but not returned by create"}],"source_content_type":"text/x-python","patch_set":4,"id":"f9a0ee66_20c3cb8c","line":1528,"range":{"start_line":1522,"start_character":0,"end_line":1528,"end_character":65},"updated":"2023-03-25 01:01:54.000000000","message":"same, except this seems to have very few overrides: https://codesearch.opendev.org/?q\u003ddef%20_translate_response\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003dopenstack/openstacksdk","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1519,"context_line":"            else self.create_returns_body"},{"line_number":1520,"context_line":"        )"},{"line_number":1521,"context_line":"        self.microversion \u003d microversion"},{"line_number":1522,"context_line":"        if response_key is not None:"},{"line_number":1523,"context_line":"            self._translate_response("},{"line_number":1524,"context_line":"                response,"},{"line_number":1525,"context_line":"                has_body\u003dhas_body,"},{"line_number":1526,"context_line":"                response_key\u003dresponse_key)"},{"line_number":1527,"context_line":"        else:"},{"line_number":1528,"context_line":"            self._translate_response(response, has_body\u003dhas_body)"},{"line_number":1529,"context_line":"        # direct comparision to False since we need to rule out None"},{"line_number":1530,"context_line":"        if self.has_body and self.create_returns_body is False:"},{"line_number":1531,"context_line":"            # fetch the body if it\u0027s required but not returned by create"}],"source_content_type":"text/x-python","patch_set":4,"id":"a4e55a56_474d360e","line":1528,"range":{"start_line":1522,"start_character":0,"end_line":1528,"end_character":65},"in_reply_to":"f9a0ee66_20c3cb8c","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1529,"context_line":"        # direct comparision to False since we need to rule out None"},{"line_number":1530,"context_line":"        if self.has_body and self.create_returns_body is False:"},{"line_number":1531,"context_line":"            # fetch the body if it\u0027s required but not returned by create"},{"line_number":1532,"context_line":"            if response_key is not None:"},{"line_number":1533,"context_line":"                return self.fetch(session, response_key\u003dresponse_key)"},{"line_number":1534,"context_line":"            else:"},{"line_number":1535,"context_line":"                return self.fetch(session)"},{"line_number":1536,"context_line":"        return self"},{"line_number":1537,"context_line":""},{"line_number":1538,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"fcc856df_63a125e5","line":1535,"range":{"start_line":1532,"start_character":13,"end_line":1535,"end_character":42},"updated":"2023-03-25 01:01:54.000000000","message":"same here.. \n\nno need to pass this selectively... if you\u0027d like to: \n\n  kwargs \u003d {\u0027response_key\u0027: response_key} if response_key else {}\n  return self.fetch(session, **kwargs)","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"        # direct comparision to False since we need to rule out None"},{"line_number":1530,"context_line":"        if self.has_body and self.create_returns_body is False:"},{"line_number":1531,"context_line":"            # fetch the body if it\u0027s required but not returned by create"},{"line_number":1532,"context_line":"            if response_key is not None:"},{"line_number":1533,"context_line":"                return self.fetch(session, response_key\u003dresponse_key)"},{"line_number":1534,"context_line":"            else:"},{"line_number":1535,"context_line":"                return self.fetch(session)"},{"line_number":1536,"context_line":"        return self"},{"line_number":1537,"context_line":""},{"line_number":1538,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"ce18c01b_686c16ae","line":1535,"range":{"start_line":1532,"start_character":13,"end_line":1535,"end_character":42},"in_reply_to":"fcc856df_63a125e5","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e90d204b92291215cad79c0b44dbe2a99728e5db","unresolved":true,"context_lines":[{"line_number":1695,"context_line":"            kwargs[\u0027error_message\u0027] \u003d error_message"},{"line_number":1696,"context_line":""},{"line_number":1697,"context_line":"        self.microversion \u003d microversion"},{"line_number":1698,"context_line":"        if response_key is not None:"},{"line_number":1699,"context_line":"            self._translate_response("},{"line_number":1700,"context_line":"                response,"},{"line_number":1701,"context_line":"                response_key\u003dresponse_key,"},{"line_number":1702,"context_line":"                **kwargs)"},{"line_number":1703,"context_line":"        else:"},{"line_number":1704,"context_line":"            self._translate_response(response, **kwargs)"},{"line_number":1705,"context_line":"        return self"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"    def head(self, session, base_path\u003dNone, *, microversion\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"a961353c_f3aebf8a","line":1704,"range":{"start_line":1698,"start_character":0,"end_line":1704,"end_character":56},"updated":"2023-03-25 01:01:54.000000000","message":"same comment as above","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"338781de4c0c56477d21444e9c0fb56fab57f4e0","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"            kwargs[\u0027error_message\u0027] \u003d error_message"},{"line_number":1696,"context_line":""},{"line_number":1697,"context_line":"        self.microversion \u003d microversion"},{"line_number":1698,"context_line":"        if response_key is not None:"},{"line_number":1699,"context_line":"            self._translate_response("},{"line_number":1700,"context_line":"                response,"},{"line_number":1701,"context_line":"                response_key\u003dresponse_key,"},{"line_number":1702,"context_line":"                **kwargs)"},{"line_number":1703,"context_line":"        else:"},{"line_number":1704,"context_line":"            self._translate_response(response, **kwargs)"},{"line_number":1705,"context_line":"        return self"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"    def head(self, session, base_path\u003dNone, *, microversion\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df741664_c5d40a00","line":1704,"range":{"start_line":1698,"start_character":0,"end_line":1704,"end_character":56},"in_reply_to":"a961353c_f3aebf8a","updated":"2023-03-29 17:05:15.000000000","message":"Done","commit_id":"519fcc3426931aeffa184b382530ee7efd4080a0"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"61972347ae5dc6aaf8e267f8b0f48cb4c83bb2ad","unresolved":true,"context_lines":[{"line_number":1272,"context_line":"        if has_body:"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                body \u003d response.json()"},{"line_number":1275,"context_line":"                if response_key is not None and response_key in body:"},{"line_number":1276,"context_line":"                    body \u003d body[response_key]"},{"line_number":1277,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1278,"context_line":"                    body \u003d body[self.resource_key]"}],"source_content_type":"text/x-python","patch_set":9,"id":"4c6f400a_e2d70d4e","line":1275,"updated":"2023-04-04 07:23:38.000000000","message":"this is the place where one thing becomes visible what I was feeling about it. Currently we have resource_key and resources_key. While the name is not too much self explaining it is still giving more hints compared to response_key and request_key. What if you name them request_resource_key and response_resource_key correspondingly? Or maybe even better: resource_request_key, resource_response_key","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"45a791054226172274b2757124179a0d89458a45","unresolved":true,"context_lines":[{"line_number":1272,"context_line":"        if has_body:"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                body \u003d response.json()"},{"line_number":1275,"context_line":"                if response_key is not None and response_key in body:"},{"line_number":1276,"context_line":"                    body \u003d body[response_key]"},{"line_number":1277,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1278,"context_line":"                    body \u003d body[self.resource_key]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bb8a088c_4483cbce","line":1275,"in_reply_to":"4c6f400a_e2d70d4e","updated":"2023-04-04 14:14:31.000000000","message":"I think that makes a lot of sense. I\u0027ll change request_key and response_key to resource_request_key and resource_response_key. Also, when I tried to change *all* the methods that implement the usage of self.resource_key and self.resources_key, it got a little confusing where request_key was supposed to be plural or not, so I think that resource_response_key and eventually resources_response_key would make it more clear.","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"01975f1a0a9d224f61f2ab917419de653a8fd7d7","unresolved":false,"context_lines":[{"line_number":1272,"context_line":"        if has_body:"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                body \u003d response.json()"},{"line_number":1275,"context_line":"                if response_key is not None and response_key in body:"},{"line_number":1276,"context_line":"                    body \u003d body[response_key]"},{"line_number":1277,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1278,"context_line":"                    body \u003d body[self.resource_key]"}],"source_content_type":"text/x-python","patch_set":9,"id":"e870e5af_5f2cf28c","line":1275,"in_reply_to":"bb8a088c_4483cbce","updated":"2023-04-11 17:27:32.000000000","message":"Done","commit_id":"2bd2d82260a0b889d44608e89b4790dc1cf84d72"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e08bcff065d498ce94d132845945f55bc7362b40","unresolved":true,"context_lines":[{"line_number":1277,"context_line":"        if has_body:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                body \u003d response.json()"},{"line_number":1280,"context_line":"                if resource_response_key is not None:"},{"line_number":1281,"context_line":"                    if resource_response_key in body:"},{"line_number":1282,"context_line":"                        body \u003d body[resource_response_key]"},{"line_number":1283,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1284,"context_line":"                    body \u003d body[self.resource_key]"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"                # Do not allow keys called \"self\" through. Glance chose"},{"line_number":1287,"context_line":"                # to name a key \"self\", so we need to pop it out because"},{"line_number":1288,"context_line":"                # we can\u0027t send it through cls.existing and into the"}],"source_content_type":"text/x-python","patch_set":10,"id":"3945d9f3_fc21acf9","line":1285,"range":{"start_line":1280,"start_character":0,"end_line":1285,"end_character":0},"updated":"2023-04-04 23:37:23.000000000","message":"Side effect of line length. I tried to just use two if\u0027s to the same effect as the previous changes. I realized after uploading my changes that this is not the same as using an \"and\" since the elif statement won\u0027t be evaluated if the inner if-statement evaluates to false. So, I\u0027m going to revert my changes within this one function, because the _translate_response method is not as visible as the create and fetch methods. Darn line length limit.","commit_id":"65ff13167f2e26495028f56ca5ca17756de3c272"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"25e824dc347ddec01a5f102be3d120edef9d8cda","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"        if has_body:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                body \u003d response.json()"},{"line_number":1280,"context_line":"                if resource_response_key is not None:"},{"line_number":1281,"context_line":"                    if resource_response_key in body:"},{"line_number":1282,"context_line":"                        body \u003d body[resource_response_key]"},{"line_number":1283,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1284,"context_line":"                    body \u003d body[self.resource_key]"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"                # Do not allow keys called \"self\" through. Glance chose"},{"line_number":1287,"context_line":"                # to name a key \"self\", so we need to pop it out because"},{"line_number":1288,"context_line":"                # we can\u0027t send it through cls.existing and into the"}],"source_content_type":"text/x-python","patch_set":10,"id":"4c23d527_306ad2cf","line":1285,"range":{"start_line":1280,"start_character":0,"end_line":1285,"end_character":0},"in_reply_to":"3945d9f3_fc21acf9","updated":"2023-04-04 23:38:20.000000000","message":"Changed it back.","commit_id":"65ff13167f2e26495028f56ca5ca17756de3c272"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d26c209d6b9ad22bf8604ea583bba27f63e18d19","unresolved":true,"context_lines":[{"line_number":1259,"context_line":"        response,"},{"line_number":1260,"context_line":"        has_body\u003dNone,"},{"line_number":1261,"context_line":"        error_message\u003dNone,"},{"line_number":1262,"context_line":"        response_key\u003dNone"},{"line_number":1263,"context_line":"    ):"},{"line_number":1264,"context_line":"        \"\"\"Given a KSA response, inflate this instance with its data"},{"line_number":1265,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"c5489915_b4e82fb5","line":1262,"range":{"start_line":1262,"start_character":8,"end_line":1262,"end_character":20},"updated":"2023-04-11 22:26:26.000000000","message":"\"resource_response_key\" to be consistent","commit_id":"9b6f5887cd10580db1d2dbf31e5959906e6324aa"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"8ff7b34d05c2e76fcad88c35a2a784bd0971273d","unresolved":false,"context_lines":[{"line_number":1259,"context_line":"        response,"},{"line_number":1260,"context_line":"        has_body\u003dNone,"},{"line_number":1261,"context_line":"        error_message\u003dNone,"},{"line_number":1262,"context_line":"        response_key\u003dNone"},{"line_number":1263,"context_line":"    ):"},{"line_number":1264,"context_line":"        \"\"\"Given a KSA response, inflate this instance with its data"},{"line_number":1265,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"8a3644dc_45432c1f","line":1262,"range":{"start_line":1262,"start_character":8,"end_line":1262,"end_character":20},"in_reply_to":"c5489915_b4e82fb5","updated":"2023-04-11 22:56:39.000000000","message":"Done","commit_id":"9b6f5887cd10580db1d2dbf31e5959906e6324aa"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d26c209d6b9ad22bf8604ea583bba27f63e18d19","unresolved":true,"context_lines":[{"line_number":1277,"context_line":"        if has_body:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                body \u003d response.json()"},{"line_number":1280,"context_line":"                if response_key is not None and response_key in body:"},{"line_number":1281,"context_line":"                    body \u003d body[response_key]"},{"line_number":1282,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1283,"context_line":"                    body \u003d body[self.resource_key]"},{"line_number":1284,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"be3e0bef_0b9966e8","line":1281,"range":{"start_line":1280,"start_character":16,"end_line":1281,"end_character":45},"updated":"2023-04-11 22:26:26.000000000","message":"as we chatted, to work around the line wrapping issues, use parentheses:\n\n\n    if (resource_response_key\n          and resource_response_key in body):","commit_id":"9b6f5887cd10580db1d2dbf31e5959906e6324aa"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"8ff7b34d05c2e76fcad88c35a2a784bd0971273d","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"        if has_body:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                body \u003d response.json()"},{"line_number":1280,"context_line":"                if response_key is not None and response_key in body:"},{"line_number":1281,"context_line":"                    body \u003d body[response_key]"},{"line_number":1282,"context_line":"                elif self.resource_key and self.resource_key in body:"},{"line_number":1283,"context_line":"                    body \u003d body[self.resource_key]"},{"line_number":1284,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"2a2e1fa0_db062e62","line":1281,"range":{"start_line":1280,"start_character":16,"end_line":1281,"end_character":45},"in_reply_to":"be3e0bef_0b9966e8","updated":"2023-04-11 22:56:39.000000000","message":"`if resource_response_key and resource_response_key in body:` worked","commit_id":"9b6f5887cd10580db1d2dbf31e5959906e6324aa"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1157,"context_line":"        self,"},{"line_number":1158,"context_line":"        patch,"},{"line_number":1159,"context_line":"        prepend_key,"},{"line_number":1160,"context_line":"        resource_request_key\u003dNone"},{"line_number":1161,"context_line":"    ):"},{"line_number":1162,"context_line":"        if patch:"},{"line_number":1163,"context_line":"            if not self._store_unknown_attrs_as_properties:"}],"source_content_type":"text/x-python","patch_set":12,"id":"69490715_de1b5cea","line":1160,"updated":"2023-04-12 11:08:49.000000000","message":"Can you make this a kwarg-only argument?\n\n    def _prepare_request_body(\n        self,\n        patch,\n        prepend_key,\n        *,\n        resource_request_key\u003dNone,\n    ):\n\nI wouldn\u0027t expect anyone to ever call this positionally.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1157,"context_line":"        self,"},{"line_number":1158,"context_line":"        patch,"},{"line_number":1159,"context_line":"        prepend_key,"},{"line_number":1160,"context_line":"        resource_request_key\u003dNone"},{"line_number":1161,"context_line":"    ):"},{"line_number":1162,"context_line":"        if patch:"},{"line_number":1163,"context_line":"            if not self._store_unknown_attrs_as_properties:"}],"source_content_type":"text/x-python","patch_set":12,"id":"caa8c6b9_cac92b8b","line":1160,"in_reply_to":"69490715_de1b5cea","updated":"2023-04-12 14:45:18.000000000","message":"I will make that change. That makes sense to do it like that.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1157,"context_line":"        self,"},{"line_number":1158,"context_line":"        patch,"},{"line_number":1159,"context_line":"        prepend_key,"},{"line_number":1160,"context_line":"        resource_request_key\u003dNone"},{"line_number":1161,"context_line":"    ):"},{"line_number":1162,"context_line":"        if patch:"},{"line_number":1163,"context_line":"            if not self._store_unknown_attrs_as_properties:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5ac0e458_2f927968","line":1160,"in_reply_to":"caa8c6b9_cac92b8b","updated":"2023-04-19 22:41:27.000000000","message":"Done","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1200,"context_line":"        patch\u003dFalse,"},{"line_number":1201,"context_line":"        base_path\u003dNone,"},{"line_number":1202,"context_line":"        params\u003dNone,"},{"line_number":1203,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1204,"context_line":"        **kwargs,"},{"line_number":1205,"context_line":"    ):"},{"line_number":1206,"context_line":"        \"\"\"Prepare a request to be sent to the server"}],"source_content_type":"text/x-python","patch_set":12,"id":"f0545677_83b44135","line":1203,"updated":"2023-04-12 11:08:49.000000000","message":"Ditto","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"        patch\u003dFalse,"},{"line_number":1201,"context_line":"        base_path\u003dNone,"},{"line_number":1202,"context_line":"        params\u003dNone,"},{"line_number":1203,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1204,"context_line":"        **kwargs,"},{"line_number":1205,"context_line":"    ):"},{"line_number":1206,"context_line":"        \"\"\"Prepare a request to be sent to the server"}],"source_content_type":"text/x-python","patch_set":12,"id":"6c9d13f6_332c6458","line":1203,"in_reply_to":"454f86da_16792c13","updated":"2023-04-19 22:41:27.000000000","message":"Done","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1200,"context_line":"        patch\u003dFalse,"},{"line_number":1201,"context_line":"        base_path\u003dNone,"},{"line_number":1202,"context_line":"        params\u003dNone,"},{"line_number":1203,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1204,"context_line":"        **kwargs,"},{"line_number":1205,"context_line":"    ):"},{"line_number":1206,"context_line":"        \"\"\"Prepare a request to be sent to the server"}],"source_content_type":"text/x-python","patch_set":12,"id":"454f86da_16792c13","line":1203,"in_reply_to":"f0545677_83b44135","updated":"2023-04-12 14:45:18.000000000","message":"Ack","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1227,"context_line":"        }"},{"line_number":1228,"context_line":"        if resource_request_key is not None:"},{"line_number":1229,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1230,"context_line":"        body \u003d self._prepare_request_body(**request_kwargs)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"        # TODO(mordred) Ensure headers have string values better than this"},{"line_number":1233,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"74859591_2e89ac75","line":1230,"updated":"2023-04-12 11:08:49.000000000","message":"Do we need to do this? Couldn\u0027t we always pass \u0027resource_request_key\u0027 straight through to the \u0027_prepare_request_body\u0027 method?\n\n    body \u003d _prepare_request_body(\n        patch,\n        prepend_key,\n        resource_request_key\u003dresource_request_key,\n    )","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"        }"},{"line_number":1228,"context_line":"        if resource_request_key is not None:"},{"line_number":1229,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1230,"context_line":"        body \u003d self._prepare_request_body(**request_kwargs)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"        # TODO(mordred) Ensure headers have string values better than this"},{"line_number":1233,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"5afa2dad_dfea1474","line":1230,"in_reply_to":"6602ece4_8b95b36c","updated":"2023-04-19 22:41:27.000000000","message":"overrides: https://codesearch.opendev.org/?q\u003ddef%20_prepare_request_body\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003dresource.py\u0026repos\u003dopenstack/openstacksdk \n\nThe code here seems pretty readable to me; if its confusing, we can go add the kwarg to all these instances ^","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1227,"context_line":"        }"},{"line_number":1228,"context_line":"        if resource_request_key is not None:"},{"line_number":1229,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1230,"context_line":"        body \u003d self._prepare_request_body(**request_kwargs)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"        # TODO(mordred) Ensure headers have string values better than this"},{"line_number":1233,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"6602ece4_8b95b36c","line":1230,"in_reply_to":"74859591_2e89ac75","updated":"2023-04-12 14:45:18.000000000","message":"It\u0027s done like this because of the classes that override the _prepare_request_body method. They wouldn\u0027t have the resource_request_key parameter, which causes problems. My solution to this was to keep the same behavior so long as resource_request_key isn\u0027t set.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1259,"context_line":"        response,"},{"line_number":1260,"context_line":"        has_body\u003dNone,"},{"line_number":1261,"context_line":"        error_message\u003dNone,"},{"line_number":1262,"context_line":"        resource_response_key\u003dNone"},{"line_number":1263,"context_line":"    ):"},{"line_number":1264,"context_line":"        \"\"\"Given a KSA response, inflate this instance with its data"},{"line_number":1265,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"f0fba0cf_c5932161","line":1262,"updated":"2023-04-12 11:08:49.000000000","message":"nit: can this be a kwarg-only argument? Also, trailing comma please","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1259,"context_line":"        response,"},{"line_number":1260,"context_line":"        has_body\u003dNone,"},{"line_number":1261,"context_line":"        error_message\u003dNone,"},{"line_number":1262,"context_line":"        resource_response_key\u003dNone"},{"line_number":1263,"context_line":"    ):"},{"line_number":1264,"context_line":"        \"\"\"Given a KSA response, inflate this instance with its data"},{"line_number":1265,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"980e39e4_27795bac","line":1262,"in_reply_to":"a8a6ea66_ead77559","updated":"2023-04-19 22:41:27.000000000","message":"Done","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1259,"context_line":"        response,"},{"line_number":1260,"context_line":"        has_body\u003dNone,"},{"line_number":1261,"context_line":"        error_message\u003dNone,"},{"line_number":1262,"context_line":"        resource_response_key\u003dNone"},{"line_number":1263,"context_line":"    ):"},{"line_number":1264,"context_line":"        \"\"\"Given a KSA response, inflate this instance with its data"},{"line_number":1265,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"a8a6ea66_ead77559","line":1262,"in_reply_to":"f0fba0cf_c5932161","updated":"2023-04-12 14:45:18.000000000","message":"Ack","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1437,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1438,"context_line":"        base_path\u003dNone,"},{"line_number":1439,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1440,"context_line":"        resource_response_key\u003dNone,"},{"line_number":1441,"context_line":"        *,"},{"line_number":1442,"context_line":"        microversion\u003dNone,"},{"line_number":1443,"context_line":"        **params"}],"source_content_type":"text/x-python","patch_set":12,"id":"bafd652f_53861799","line":1440,"updated":"2023-04-12 11:08:49.000000000","message":"This should be kwarg-only, so after the asterisk","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1438,"context_line":"        base_path\u003dNone,"},{"line_number":1439,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1440,"context_line":"        resource_response_key\u003dNone,"},{"line_number":1441,"context_line":"        *,"},{"line_number":1442,"context_line":"        microversion\u003dNone,"},{"line_number":1443,"context_line":"        **params"}],"source_content_type":"text/x-python","patch_set":12,"id":"887069ad_d71aa553","line":1440,"in_reply_to":"6999f1c6_ad861234","updated":"2023-04-19 22:41:27.000000000","message":"Done","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1437,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1438,"context_line":"        base_path\u003dNone,"},{"line_number":1439,"context_line":"        resource_request_key\u003dNone,"},{"line_number":1440,"context_line":"        resource_response_key\u003dNone,"},{"line_number":1441,"context_line":"        *,"},{"line_number":1442,"context_line":"        microversion\u003dNone,"},{"line_number":1443,"context_line":"        **params"}],"source_content_type":"text/x-python","patch_set":12,"id":"6999f1c6_ad861234","line":1440,"in_reply_to":"bafd652f_53861799","updated":"2023-04-12 14:45:18.000000000","message":"Ack","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1482,"context_line":"            \"base_path\": base_path,"},{"line_number":1483,"context_line":"        }"},{"line_number":1484,"context_line":"        if resource_request_key is not None:"},{"line_number":1485,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        if self.create_exclude_id_from_body:"},{"line_number":1488,"context_line":"            self._body._dirty.discard(\"id\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"3acad4a9_79db12b4","line":1485,"updated":"2023-04-12 11:08:49.000000000","message":"As above, why do we need this logic? We ignore this value if it\u0027s None (the default). Can\u0027t we just always pass it through?","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1482,"context_line":"            \"base_path\": base_path,"},{"line_number":1483,"context_line":"        }"},{"line_number":1484,"context_line":"        if resource_request_key is not None:"},{"line_number":1485,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        if self.create_exclude_id_from_body:"},{"line_number":1488,"context_line":"            self._body._dirty.discard(\"id\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"6a1a476d_3c77ae66","line":1485,"in_reply_to":"3acad4a9_79db12b4","updated":"2023-04-12 14:45:18.000000000","message":"\u003e It\u0027s done like this because of the classes that override the _prepare_request method. They wouldn\u0027t have the resource_request_key parameter, which causes problems. My solution to this was to keep the same behavior so long as resource_request_key isn\u0027t set.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"af28c6b166e30551bc39485b6f8fa36fdbf19335","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"            \"base_path\": base_path,"},{"line_number":1483,"context_line":"        }"},{"line_number":1484,"context_line":"        if resource_request_key is not None:"},{"line_number":1485,"context_line":"            request_kwargs[\u0027resource_request_key\u0027] \u003d resource_request_key"},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        if self.create_exclude_id_from_body:"},{"line_number":1488,"context_line":"            self._body._dirty.discard(\"id\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"2b693587_0c4c95c1","line":1485,"in_reply_to":"6a1a476d_3c77ae66","updated":"2023-04-19 22:41:27.000000000","message":"overrides: https://codesearch.opendev.org/?q\u003ddef%20_translate_response\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003dresource.py\u0026repos\u003dopenstack/openstacksdk \n\nsame comment as above; am okay leaving this like this.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1541,"context_line":"        data,"},{"line_number":1542,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1543,"context_line":"        base_path\u003dNone,"},{"line_number":1544,"context_line":"        *,"},{"line_number":1545,"context_line":"        microversion\u003dNone,"},{"line_number":1546,"context_line":"        **params,"},{"line_number":1547,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9e18d55d_8e079063","line":1544,"updated":"2023-04-12 11:08:49.000000000","message":"Don\u0027t you need those parameters here also?","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"f7a8c03c7e39fab2837313f6ea76a34a5e66c810","unresolved":true,"context_lines":[{"line_number":1541,"context_line":"        data,"},{"line_number":1542,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1543,"context_line":"        base_path\u003dNone,"},{"line_number":1544,"context_line":"        *,"},{"line_number":1545,"context_line":"        microversion\u003dNone,"},{"line_number":1546,"context_line":"        **params,"},{"line_number":1547,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"f7f3004b_3a4b2400","line":1544,"in_reply_to":"9dcf2b30_da9dda84","updated":"2023-04-18 18:54:05.000000000","message":"Also, the other methods don\u0027t require this behavior as much as the create/fetch methods, so I don\u0027t think it\u0027s especially important that we add this behavior to everywhere `prepend_key` is used. Most of the other methods work just fine just using the `self.resource_key` and `self.resources_key`.\n\nHowever, this patch can also serve as a reference if it becomes imperative that we add this behavior to those methods.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"e0263c7c42dd1a26ca4abc425eb01cbae088b0a4","unresolved":true,"context_lines":[{"line_number":1541,"context_line":"        data,"},{"line_number":1542,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1543,"context_line":"        base_path\u003dNone,"},{"line_number":1544,"context_line":"        *,"},{"line_number":1545,"context_line":"        microversion\u003dNone,"},{"line_number":1546,"context_line":"        **params,"},{"line_number":1547,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9dcf2b30_da9dda84","line":1544,"in_reply_to":"9e18d55d_8e079063","updated":"2023-04-12 14:45:18.000000000","message":"For this patch, I figured I\u0027d keep the changes to create and fetch, in particular, given that most of the need for overriding the envelope keys comes from the create and fetch methods. Originally, I did it for everywhere where prepend_key was used, but the changes were hard to reconcile with the unit tests, it isn\u0027t often that method other than fetch/create need to override the envelope key, and I figure we can continue patching these changes in after we get create/fetch changes merged. \n\nBasically, I\u0027m just limiting the scope of my changes in order to make it more manageable to add this behavior.","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24ff044f0543e8976e9063d80320ef761e239c59","unresolved":false,"context_lines":[{"line_number":1541,"context_line":"        data,"},{"line_number":1542,"context_line":"        prepend_key\u003dTrue,"},{"line_number":1543,"context_line":"        base_path\u003dNone,"},{"line_number":1544,"context_line":"        *,"},{"line_number":1545,"context_line":"        microversion\u003dNone,"},{"line_number":1546,"context_line":"        **params,"},{"line_number":1547,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"974a4417_4e43bdfc","line":1544,"in_reply_to":"f7f3004b_3a4b2400","updated":"2023-04-21 16:36:45.000000000","message":"Okay, YAGNI is reasonable","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1743,"context_line":"        retry_on_conflict\u003dNone,"},{"line_number":1744,"context_line":"        base_path\u003dNone,"},{"line_number":1745,"context_line":"        *,"},{"line_number":1746,"context_line":"        microversion\u003dNone,"},{"line_number":1747,"context_line":"        **kwargs,"},{"line_number":1748,"context_line":"    ):"},{"line_number":1749,"context_line":"        \"\"\"Commit the state of the instance to the remote resource."}],"source_content_type":"text/x-python","patch_set":12,"id":"c59b5918_dbdda876","line":1746,"updated":"2023-04-12 11:08:49.000000000","message":"Shouldn\u0027t we include the parameters here?","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24ff044f0543e8976e9063d80320ef761e239c59","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"        retry_on_conflict\u003dNone,"},{"line_number":1744,"context_line":"        base_path\u003dNone,"},{"line_number":1745,"context_line":"        *,"},{"line_number":1746,"context_line":"        microversion\u003dNone,"},{"line_number":1747,"context_line":"        **kwargs,"},{"line_number":1748,"context_line":"    ):"},{"line_number":1749,"context_line":"        \"\"\"Commit the state of the instance to the remote resource."}],"source_content_type":"text/x-python","patch_set":12,"id":"ef87468d_49a65a94","line":1746,"in_reply_to":"c59b5918_dbdda876","updated":"2023-04-21 16:36:45.000000000","message":"YAGNI","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1873,"context_line":"        has_body\u003dTrue,"},{"line_number":1874,"context_line":"        retry_on_conflict\u003dNone,"},{"line_number":1875,"context_line":"        base_path\u003dNone,"},{"line_number":1876,"context_line":"        *,"},{"line_number":1877,"context_line":"        microversion\u003dNone,"},{"line_number":1878,"context_line":"    ):"},{"line_number":1879,"context_line":"        \"\"\"Patch the remote resource."}],"source_content_type":"text/x-python","patch_set":12,"id":"65d67293_a3a30bb5","line":1876,"updated":"2023-04-12 11:08:49.000000000","message":"And here?","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24ff044f0543e8976e9063d80320ef761e239c59","unresolved":false,"context_lines":[{"line_number":1873,"context_line":"        has_body\u003dTrue,"},{"line_number":1874,"context_line":"        retry_on_conflict\u003dNone,"},{"line_number":1875,"context_line":"        base_path\u003dNone,"},{"line_number":1876,"context_line":"        *,"},{"line_number":1877,"context_line":"        microversion\u003dNone,"},{"line_number":1878,"context_line":"    ):"},{"line_number":1879,"context_line":"        \"\"\"Patch the remote resource."}],"source_content_type":"text/x-python","patch_set":12,"id":"b3046a25_bdb66ad0","line":1876,"in_reply_to":"65d67293_a3a30bb5","updated":"2023-04-21 16:36:45.000000000","message":"YAGNI","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":1977,"context_line":"        base_path\u003dNone,"},{"line_number":1978,"context_line":"        allow_unknown_params\u003dFalse,"},{"line_number":1979,"context_line":"        *,"},{"line_number":1980,"context_line":"        microversion\u003dNone,"},{"line_number":1981,"context_line":"        **params,"},{"line_number":1982,"context_line":"    ):"},{"line_number":1983,"context_line":"        \"\"\"This method is a generator which yields resource objects."}],"source_content_type":"text/x-python","patch_set":12,"id":"e2af513a_b7449d18","line":1980,"updated":"2023-04-12 11:08:49.000000000","message":"And here (only \u0027resource_response_key\u0027, as with fetch)","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24ff044f0543e8976e9063d80320ef761e239c59","unresolved":false,"context_lines":[{"line_number":1977,"context_line":"        base_path\u003dNone,"},{"line_number":1978,"context_line":"        allow_unknown_params\u003dFalse,"},{"line_number":1979,"context_line":"        *,"},{"line_number":1980,"context_line":"        microversion\u003dNone,"},{"line_number":1981,"context_line":"        **params,"},{"line_number":1982,"context_line":"    ):"},{"line_number":1983,"context_line":"        \"\"\"This method is a generator which yields resource objects."}],"source_content_type":"text/x-python","patch_set":12,"id":"9f80ffca_b3931220","line":1980,"in_reply_to":"e2af513a_b7449d18","updated":"2023-04-21 16:36:45.000000000","message":"Moar YAGNI","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"96a3b69bbec8efa201a79f3abd3194077cdc9187","unresolved":true,"context_lines":[{"line_number":2239,"context_line":"        ignore_missing\u003dTrue,"},{"line_number":2240,"context_line":"        list_base_path\u003dNone,"},{"line_number":2241,"context_line":"        *,"},{"line_number":2242,"context_line":"        microversion\u003dNone,"},{"line_number":2243,"context_line":"        all_projects\u003dNone,"},{"line_number":2244,"context_line":"        **params,"},{"line_number":2245,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"a7f69f36_3a387330","line":2242,"updated":"2023-04-12 11:08:49.000000000","message":"Here too...","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24ff044f0543e8976e9063d80320ef761e239c59","unresolved":false,"context_lines":[{"line_number":2239,"context_line":"        ignore_missing\u003dTrue,"},{"line_number":2240,"context_line":"        list_base_path\u003dNone,"},{"line_number":2241,"context_line":"        *,"},{"line_number":2242,"context_line":"        microversion\u003dNone,"},{"line_number":2243,"context_line":"        all_projects\u003dNone,"},{"line_number":2244,"context_line":"        **params,"},{"line_number":2245,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":12,"id":"118d30e5_57d3dd02","line":2242,"in_reply_to":"a7f69f36_3a387330","updated":"2023-04-21 16:36:45.000000000","message":"even moar YAGNI","commit_id":"f1ba60cccc6db0f21e0acf4972493d93bb16ae97"}]}
