)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"692d9ea102dee05123f741915706e9ee105c3414","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d1271554_0d79b250","updated":"2023-05-17 09:08:29.000000000","message":"FYI you can avoid the pep8 issues by installing pre-commit.\n\n    sudo dnf install pipx  # or sudo apt install pipx\n    pipx install pre-commit\n    cd python-openstackclient  # or wherever the repo is\n    pre-commit install\n    pre-commit run -a  # to fix up this change, you shouldn\u0027t need to do it normally","commit_id":"2702a9c17131a445ae5140ffe229a54e292bc621"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d80d1118f53e91acbd339d4ffca198c88b8560db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7c23c4c6_d2070b1b","updated":"2023-05-31 16:45:28.000000000","message":"Just pointing out my earlier comment about avoiding issues here by installing pre-commit","commit_id":"263491c7480647c51f587b07cf12419616d5097f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5004173bcc44068a05dad5fc2397406c7ec752a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"25e81007_a26a18ae","updated":"2023-06-06 17:24:48.000000000","message":"Need to test this but this looks pretty good","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"83dd24b2_8d30646f","updated":"2023-06-07 17:21:31.000000000","message":"Went through this is more detail. Couple of things still to work out. This is looking very good though","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"52e1a6552690f704ebdd11eac6baaea883e77f0b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9f098824_5d4d1c9b","updated":"2023-06-07 17:42:58.000000000","message":"You probably want a release note too. You can create one using `reno`.\n\n```\nreno new \u003cname-of-file\u003e\n```\n\nhere, `\u003cname-of-file\u003e` could be, say, `add-image-metadef-resource-type-list`.\n\nPS: You can install `reno` using `pipx install reno` or your package manager (e.g. `sudo apt-get install reno` or `sudo dnf install reno`)","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c610864d06ceed738a0d5018a233a85f0594a1c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"ef83ab4e_1bb9abcd","updated":"2023-07-06 17:06:48.000000000","message":"Added some missing docs","commit_id":"f1cbc82396cfff6bed5890c8e03843a93df6e0d7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7b75806ce859839d86bff976a9a96c224b1a3517","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"4f4dea08_d550da6f","updated":"2023-07-06 16:22:58.000000000","message":"Fixed the small style issues. This looks good to me now. Nice work!","commit_id":"f1cbc82396cfff6bed5890c8e03843a93df6e0d7"}],"openstackclient/image/v2/metadef_resource_types.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24f5772135943efa85db782c3a1690154999a2c6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def take_action(self, parsed_args):"},{"line_number":28,"context_line":"        image_client \u003d self.app.client_manager.image"},{"line_number":29,"context_line":"        kwargs \u003d {}"},{"line_number":30,"context_line":"        data \u003d list(image_client.metadef_resource_types(**kwargs))"},{"line_number":31,"context_line":"        columns \u003d [\u0027resource types\u0027]"},{"line_number":32,"context_line":"        column_headers \u003d columns"},{"line_number":33,"context_line":"        return("}],"source_content_type":"text/x-python","patch_set":1,"id":"467aac69_4925aa48","line":30,"updated":"2023-05-17 16:31:57.000000000","message":"nit: You shouldn\u0027t need to wrap this in list(). This will return a generator by default, which the tuple comprehension below will handle just fine.","commit_id":"2702a9c17131a445ae5140ffe229a54e292bc621"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"24f5772135943efa85db782c3a1690154999a2c6","unresolved":true,"context_lines":[{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class CreateMetadefResourceType(command.ShowOne):"},{"line_number":46,"context_line":"    _description \u003d _(\"Create metadef resource type\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"01648e6d_246bfde5","line":45,"updated":"2023-05-17 16:31:57.000000000","message":"As discussed earlier, you can drop this here since the API doesn\u0027t allow you to create a metadef resource type. You can keep the code as it\u0027ll be handy when implementing the \u0027metadata resource type association create\u0027 command later.","commit_id":"2702a9c17131a445ae5140ffe229a54e292bc621"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b14783705f050d14c789462937d6a78e75c1d745","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class CreateMetadefResourceType(command.ShowOne):"},{"line_number":46,"context_line":"    _description \u003d _(\"Create metadef resource type\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"a4c271ef_83bca145","line":45,"in_reply_to":"01648e6d_246bfde5","updated":"2023-05-31 16:43:04.000000000","message":"Done","commit_id":"2702a9c17131a445ae5140ffe229a54e292bc621"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d80d1118f53e91acbd339d4ffca198c88b8560db","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#   a copy of the License at"}],"source_content_type":"text/x-python","patch_set":4,"id":"0337b432_46fd3747","line":2,"updated":"2023-05-31 16:45:28.000000000","message":"Assuming you don\u0027t work for the now-defunct Nebula Cloud, you can drop these first two lines","commit_id":"263491c7480647c51f587b07cf12419616d5097f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5004173bcc44068a05dad5fc2397406c7ec752a0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#   a copy of the License at"}],"source_content_type":"text/x-python","patch_set":4,"id":"d8fb5f33_3099ffe3","line":2,"in_reply_to":"0337b432_46fd3747","updated":"2023-06-06 17:24:48.000000000","message":"Done","commit_id":"263491c7480647c51f587b07cf12419616d5097f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":25,"context_line":"        image_client \u003d self.app.client_manager.image"},{"line_number":26,"context_line":"        kwargs \u003d {}"},{"line_number":27,"context_line":"        data \u003d image_client.metadef_resource_types(**kwargs)"},{"line_number":28,"context_line":"        columns \u003d [\u0027name\u0027]"},{"line_number":29,"context_line":"        column_headers \u003d columns"},{"line_number":30,"context_line":"        return ("},{"line_number":31,"context_line":"            column_headers,"}],"source_content_type":"text/x-python","patch_set":5,"id":"4c2d0831_3b2d00c5","line":28,"range":{"start_line":28,"start_character":20,"end_line":28,"end_character":24},"updated":"2023-06-07 17:21:31.000000000","message":"nit: Normally we make these title case (human-readable), e.g.\n\n```\ncolumns \u003d [\u0027Name\u0027]\n```","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        image_client \u003d self.app.client_manager.image"},{"line_number":26,"context_line":"        kwargs \u003d {}"},{"line_number":27,"context_line":"        data \u003d image_client.metadef_resource_types(**kwargs)"},{"line_number":28,"context_line":"        columns \u003d [\u0027name\u0027]"},{"line_number":29,"context_line":"        column_headers \u003d columns"},{"line_number":30,"context_line":"        return ("},{"line_number":31,"context_line":"            column_headers,"}],"source_content_type":"text/x-python","patch_set":5,"id":"87e0c88f_02e0e826","line":28,"range":{"start_line":28,"start_character":20,"end_line":28,"end_character":24},"in_reply_to":"4c2d0831_3b2d00c5","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"}],"openstackclient/tests/unit/image/v2/fakes.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#   a copy of the License at"}],"source_content_type":"text/x-python","patch_set":5,"id":"ca3529b1_2600e4e8","side":"PARENT","line":2,"updated":"2023-06-07 17:21:31.000000000","message":"Ah, no, you don\u0027t want to remove these from existing file. You just don\u0027t need to add it to _new_ files.","commit_id":"a2f877f70c460769337fab5fd2d65cca0ba9091c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#   a copy of the License at"}],"source_content_type":"text/x-python","patch_set":5,"id":"1de428ef_31929903","side":"PARENT","line":2,"in_reply_to":"ca3529b1_2600e4e8","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"a2f877f70c460769337fab5fd2d65cca0ba9091c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":295,"context_line":"    \"\"\"Create a fake MetadefResourceType member."},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    :param attrs: A dictionary with all attributes of"},{"line_number":298,"context_line":"    metadef_resource_type member"},{"line_number":299,"context_line":"    :type attrs: dict"},{"line_number":300,"context_line":"    :return: a fake MetadefResourceType object"},{"line_number":301,"context_line":"    :rtype: list of `metadef_resource_type.MetadefResourceType`"}],"source_content_type":"text/x-python","patch_set":5,"id":"69198c33_4f45bfa4","line":298,"updated":"2023-06-07 17:21:31.000000000","message":"nit: can you indent this by 4 spaces, so that it\u0027s visually obvious that this is a run-on line?","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    \"\"\"Create a fake MetadefResourceType member."},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    :param attrs: A dictionary with all attributes of"},{"line_number":298,"context_line":"    metadef_resource_type member"},{"line_number":299,"context_line":"    :type attrs: dict"},{"line_number":300,"context_line":"    :return: a fake MetadefResourceType object"},{"line_number":301,"context_line":"    :rtype: list of `metadef_resource_type.MetadefResourceType`"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a56c1ab_c62ffea1","line":298,"in_reply_to":"69198c33_4f45bfa4","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":298,"context_line":"    metadef_resource_type member"},{"line_number":299,"context_line":"    :type attrs: dict"},{"line_number":300,"context_line":"    :return: a fake MetadefResourceType object"},{"line_number":301,"context_line":"    :rtype: list of `metadef_resource_type.MetadefResourceType`"},{"line_number":302,"context_line":"    \"\"\""},{"line_number":303,"context_line":"    attrs \u003d attrs or {}"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"25cc5515_54a18a2c","line":301,"updated":"2023-06-07 17:21:31.000000000","message":"Is this a list?","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":298,"context_line":"    metadef_resource_type member"},{"line_number":299,"context_line":"    :type attrs: dict"},{"line_number":300,"context_line":"    :return: a fake MetadefResourceType object"},{"line_number":301,"context_line":"    :rtype: list of `metadef_resource_type.MetadefResourceType`"},{"line_number":302,"context_line":"    \"\"\""},{"line_number":303,"context_line":"    attrs \u003d attrs or {}"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"f3e11bdd_51969ee1","line":301,"in_reply_to":"25cc5515_54a18a2c","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":302,"context_line":"    \"\"\""},{"line_number":303,"context_line":"    attrs \u003d attrs or {}"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    resource_type \u003d {"},{"line_number":306,"context_line":"        \u0027name\u0027: \u0027OS::Compute::Quota\u0027,"},{"line_number":307,"context_line":"        \u0027properties_target\u0027: \u0027image\u0027,"},{"line_number":308,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f7e4554_71eb6d85","line":305,"updated":"2023-06-07 17:21:31.000000000","message":"nit: we generally call these `foo_info` where `foo` is the name of resource we\u0027re creating, so this would be `metadef_resource_type_info`.","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    \"\"\""},{"line_number":303,"context_line":"    attrs \u003d attrs or {}"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    resource_type \u003d {"},{"line_number":306,"context_line":"        \u0027name\u0027: \u0027OS::Compute::Quota\u0027,"},{"line_number":307,"context_line":"        \u0027properties_target\u0027: \u0027image\u0027,"},{"line_number":308,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":5,"id":"4dd39d1f_1664666f","line":305,"in_reply_to":"3f7e4554_71eb6d85","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"}],"openstackclient/tests/unit/image/v2/test_metadef_resource_types.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"effb5419_0f4997fd","line":1,"updated":"2023-06-07 17:21:31.000000000","message":"I think this is what you _meant_ to remove? 😉","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#   Copyright 2013 Nebula Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#   Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#   not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"a3a63c4f_b252b917","line":1,"in_reply_to":"effb5419_0f4997fd","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":27,"context_line":"        self.project_mock \u003d self.app.client_manager.identity.projects"},{"line_number":28,"context_line":"        self.project_mock.reset_mock()"},{"line_number":29,"context_line":"        self.domain_mock \u003d self.app.client_manager.identity.domains"},{"line_number":30,"context_line":"        self.domain_mock.reset_mock()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class TestMetadefResourceTypeList(TestMetadefResourceTypes):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7fc195de_8e1bb9a6","line":30,"updated":"2023-06-07 17:21:31.000000000","message":"Do you need these (hint: Where are they called? What happens if you removed them?)","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        self.project_mock \u003d self.app.client_manager.identity.projects"},{"line_number":28,"context_line":"        self.project_mock.reset_mock()"},{"line_number":29,"context_line":"        self.domain_mock \u003d self.app.client_manager.identity.domains"},{"line_number":30,"context_line":"        self.domain_mock.reset_mock()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class TestMetadefResourceTypeList(TestMetadefResourceTypes):"}],"source_content_type":"text/x-python","patch_set":5,"id":"d1f014b2_efd9f437","line":30,"in_reply_to":"7fc195de_8e1bb9a6","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class TestMetadefResourceTypeList(TestMetadefResourceTypes):"},{"line_number":34,"context_line":"    _resource_type \u003d [resource_type_fakes.create_one_resource_type()]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    columns \u003d [\u0027name\u0027]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"686fafc4_f5a01c23","line":34,"updated":"2023-06-07 17:21:31.000000000","message":"Two things:\n\n1. This stores a list of resource types, so the variable should really be pluralised\n2. It would be better if we had multiple resources. Perhaps you could you add an additional `create_resource_types` method to the `fakes` module so that you don\u0027t need to do that manually?","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class TestMetadefResourceTypeList(TestMetadefResourceTypes):"},{"line_number":34,"context_line":"    _resource_type \u003d [resource_type_fakes.create_one_resource_type()]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    columns \u003d [\u0027name\u0027]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"99012487_35989475","line":34,"in_reply_to":"686fafc4_f5a01c23","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        self.client.metadef_resource_types.side_effect \u003d ["},{"line_number":44,"context_line":"            self._resource_type,"},{"line_number":45,"context_line":"            [],"},{"line_number":46,"context_line":"        ]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Get the command object to test"},{"line_number":49,"context_line":"        self.client.metadef_resource_types.return_value \u003d iter("}],"source_content_type":"text/x-python","patch_set":5,"id":"ecd5e64e_68c25466","line":46,"updated":"2023-06-07 17:21:31.000000000","message":"You don\u0027t need both `side_effect` and `return_value` here. You would normally use `side_effect` where you expect a mocked _thing_ to be called multiple times, and you want a different result each time it\u0027s called. However, you should only be calling it once so you can simply use `return_value`.\n\nPS: As a general rule, be very careful mixing `return_type` and `side_effect` as they can cause all sorts of confusing behaviour. I think the former takes precedence which means the `side_effect` can get ignored.","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.client.metadef_resource_types.side_effect \u003d ["},{"line_number":44,"context_line":"            self._resource_type,"},{"line_number":45,"context_line":"            [],"},{"line_number":46,"context_line":"        ]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Get the command object to test"},{"line_number":49,"context_line":"        self.client.metadef_resource_types.return_value \u003d iter("}],"source_content_type":"text/x-python","patch_set":5,"id":"5dee2610_fa849bf2","line":46,"in_reply_to":"ecd5e64e_68c25466","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        self.cmd \u003d metadef_resource_types.ListMetadefResourceTypes("},{"line_number":53,"context_line":"            self.app, None"},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        self.datalist \u003d self._resource_type"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_resource_type_list_no_options(self):"},{"line_number":58,"context_line":"        arglist \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"c10d3ee5_0ad9e307","line":55,"updated":"2023-06-07 17:21:31.000000000","message":"The idea of the `datalist` variable, as it\u0027s used in other tests, is to store the expected \"data\" values for the command. Take your command here:\n\n```\n+---------------------+\n| name                |  # \u003c--- columns\n+---------------------+\n| OS::Glance::Image   |  # \u003c--- data\n| OS::Cinder::Volume  |  # \u003c-|\n| OS::Nova::Flavor    |  # \u003c-|\n| OS::Nova::Aggregate |  # \u003c-|\n| OS::Nova::Server    |  # \u003c-|\n| OS::Trove::Instance |  # \u003c--\n+---------------------+\n```\n\nThere\u0027s only one column here, so the columns should `[\u0027name\u0027]` as you\u0027ve done. However, data should contain what you\u0027d expect the data to be. This isn\u0027t the whole list of resources stored `self._resource_type` though, it\u0027s only select values of them. As such, `datalist` should look more like this:\n\n```\nself.datalist \u003d [\n    (\n        _resource_type[0].name,\n    ),\n]\n```\n\nYou\u0027ll need to change this if you want to add multiple resource types though (hint: list comprehensions are your friend).","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.cmd \u003d metadef_resource_types.ListMetadefResourceTypes("},{"line_number":53,"context_line":"            self.app, None"},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        self.datalist \u003d self._resource_type"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_resource_type_list_no_options(self):"},{"line_number":58,"context_line":"        arglist \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"1349115e_f9d046bc","line":55,"in_reply_to":"c10d3ee5_0ad9e307","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a764de0d46816715016972565fa0212c52b76b94","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        columns, data \u003d self.cmd.take_action(parsed_args)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.assertEqual(self.columns, columns)"},{"line_number":67,"context_line":"        self.assertEqual(getattr(self.datalist[0], \u0027name\u0027), next(data)[0])"}],"source_content_type":"text/x-python","patch_set":5,"id":"210d7547_01d534e6","line":67,"updated":"2023-06-07 17:21:31.000000000","message":"This is only comparing the first line of the output. It would be better to compare all lines. You might need to ensure they\u0027re the same type by wrapping them in e.g. `tuple` or `list`. Look at how we do this in other tests for inspiration.","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f6b40519272749507888fe68abe466ad2f0b72f3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        columns, data \u003d self.cmd.take_action(parsed_args)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.assertEqual(self.columns, columns)"},{"line_number":67,"context_line":"        self.assertEqual(getattr(self.datalist[0], \u0027name\u0027), next(data)[0])"}],"source_content_type":"text/x-python","patch_set":5,"id":"5da1f4ef_20cbb119","line":67,"in_reply_to":"210d7547_01d534e6","updated":"2023-07-06 16:17:32.000000000","message":"Done","commit_id":"2ff5eea0eee7bf536c963f63f5d4b82c03e251e9"}]}
