)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"4f18032721279ccf5f5543c9f2b5d51c665d6eb1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"287500f5_549989cd","updated":"2022-04-19 10:16:05.000000000","message":"Going back in history it looks like setting the \u0027owner\u0027 actually never worked. Not in the initial commit [1], not in Ansible 2.9 [2] and not today, although it has been documented from the beginning.\n\nOpenStack Image API defines parameter \u0027owner\u0027 as:\n\n\"An identifier for the owner of the image, usually the project (also called the “tenant”) ID. The value might be null (JSON null data type).\" [3].\n\nWith DevStack\u0027s current Horizon Dashboard I cannot see how one could change this value. OpenStack Client has an \u0027--project\u0027 parameter which allows to change the \u0027owner_id\u0027 (in master [4]) or \u0027owner\u0027 (in stable/train [5]) to a project. I would prefer to use the same approach as the OpenStack Client: Drop the owner parameter in our cloud.openstack.image module and add a \u0027project\u0027 parameter instead.\n\nKeeping the \u0027owner\u0027 parameter would be a deviation from our usual approach because it accepts no name, only an id.\n\nWhat do you think?\n\n[1] https://github.com/ansible/ansible/commit/a4e4dbd863b531774b782fdc38fc75e2549ef3f7\n[2] https://github.com/ansible/ansible/blame/stable-2.9/lib/ansible/modules/cloud/openstack/os_image.py\n[3] https://docs.openstack.org/api-ref/image/v2/index.html?expanded\u003dshow-image-detail\n[4] https://opendev.org/openstack/python-openstackclient/src/commit/dabaec5a7b1b9786a8f91eebef738bf755faf059/openstackclient/image/v2/image.py#L398\n[5] https://opendev.org/openstack/python-openstackclient/src/commit/de0be9db05ac2fe955b014b05f2e03411e684494/openstackclient/image/v2/image.py#L316\n","commit_id":"6dadeea11a6620152756f79474293af1d4bdeb24"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"a83a84dfb9a8e11241c77dc818a032073fe02480","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2ae20f06_e6609bbd","updated":"2022-04-14 11:47:37.000000000","message":"Should the input to the `owner` field be validated here? I believe the value is supposed to be a project ID, but it seems that glance allows arbitrary strings. `python-openstackclient` tries to find the project ID for a given owner name or ID. What is `ansible-collections-openstack`\u0027s position on this?","commit_id":"6dadeea11a6620152756f79474293af1d4bdeb24"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"8fd493c6875e771bbef851507d0d027c07dd312b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"32e19d11_de17cf07","in_reply_to":"287500f5_549989cd","updated":"2022-04-28 15:21:31.000000000","message":"It seems that OpenStack Client made a deliberate choice to use `--project` instead of `--owner` ([1]). Unfortunately there is no indication on why this was done.\nIf the usual behaviour is to accept names and IDs then adding a `project` parameter and resolving both is probably the best way forward. This would imply to add a `project-domain` parameter as well in order to resolve project names in other domains.\n\n\n\n[1]\nhttps://opendev.org/openstack/python-openstackclient/commit/cf2de9af79cedd51ca080f5a6521997c05647418","commit_id":"6dadeea11a6620152756f79474293af1d4bdeb24"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2776d079c34c478bd2891821f1744d2cf7a5ea09","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"47901ccf_afd39076","in_reply_to":"32e19d11_de17cf07","updated":"2022-05-02 12:51:58.000000000","message":"Thanks for the clarification! Maybe you want to add this to the commit message so that later editors know why you changed from owner to project?","commit_id":"6dadeea11a6620152756f79474293af1d4bdeb24"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"48e5a19f51561df12499fabb93f071cbfbabab2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"154fec73_e20e7469","in_reply_to":"47901ccf_afd39076","updated":"2022-05-03 12:07:55.000000000","message":"Updated the commit message to include a reference to this commit","commit_id":"6dadeea11a6620152756f79474293af1d4bdeb24"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2776d079c34c478bd2891821f1744d2cf7a5ea09","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"44849e26_bb8580b8","updated":"2022-05-02 12:51:58.000000000","message":"Thank you for your update 😊 \n\nSome tests would be cool!","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"48e5a19f51561df12499fabb93f071cbfbabab2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a46e87e8_e6396559","in_reply_to":"44849e26_bb8580b8","updated":"2022-05-03 12:07:55.000000000","message":"I have added two tests. One for an image with an owner from a project name and another one for an image with an owner from project and domain name. Let me know if this is too little/much.","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"}],"plugins/modules/image.py":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2776d079c34c478bd2891821f1744d2cf7a5ea09","unresolved":true,"context_lines":[{"line_number":50,"context_line":"       - The domain the project owning the image belongs to"},{"line_number":51,"context_line":"       - May be used to identify a unique project when providing a name to the project argument and multiple projects with such name exist"},{"line_number":52,"context_line":"     type: str"},{"line_number":53,"context_line":"   owner:"},{"line_number":54,"context_line":"     description:"},{"line_number":55,"context_line":"        - The owner of the image"},{"line_number":56,"context_line":"        - This option is deprecated and replaced by C(project) and C(project_domain)"}],"source_content_type":"text/x-python","patch_set":2,"id":"261adb96_ec4ca039","line":53,"updated":"2022-05-02 12:51:58.000000000","message":"Drop the owner option and make it an alias for project. It never worked before so no need to keep it as a separate option.","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"48e5a19f51561df12499fabb93f071cbfbabab2c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"       - The domain the project owning the image belongs to"},{"line_number":51,"context_line":"       - May be used to identify a unique project when providing a name to the project argument and multiple projects with such name exist"},{"line_number":52,"context_line":"     type: str"},{"line_number":53,"context_line":"   owner:"},{"line_number":54,"context_line":"     description:"},{"line_number":55,"context_line":"        - The owner of the image"},{"line_number":56,"context_line":"        - This option is deprecated and replaced by C(project) and C(project_domain)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7d94fc33_327f79c1","line":53,"in_reply_to":"261adb96_ec4ca039","updated":"2022-05-03 12:07:55.000000000","message":"Done","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2776d079c34c478bd2891821f1744d2cf7a5ea09","unresolved":true,"context_lines":[{"line_number":221,"context_line":"                    project_domain \u003d {\u0027id\u0027: None}"},{"line_number":222,"context_line":"                    if self.params[\u0027project_domain\u0027]:"},{"line_number":223,"context_line":"                        project_domain \u003d self.conn.get_domain(name_or_id\u003dself.params[\u0027project_domain\u0027])"},{"line_number":224,"context_line":"                        if project_domain[\u0027id\u0027] is None:"},{"line_number":225,"context_line":"                            self.fail(msg\u003d\u0027Project domain %s could not be found\u0027 % self.params[\u0027project_domain\u0027])"},{"line_number":226,"context_line":"                    project \u003d self.conn.get_project(name_or_id\u003dself.params[\u0027project\u0027], domain_id\u003dproject_domain[\u0027id\u0027])"},{"line_number":227,"context_line":"                    if project is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1008f752_a662033f","line":224,"updated":"2022-05-02 12:51:58.000000000","message":"Please add check for \u0027not project_domain\u0027.","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"48e5a19f51561df12499fabb93f071cbfbabab2c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                    project_domain \u003d {\u0027id\u0027: None}"},{"line_number":222,"context_line":"                    if self.params[\u0027project_domain\u0027]:"},{"line_number":223,"context_line":"                        project_domain \u003d self.conn.get_domain(name_or_id\u003dself.params[\u0027project_domain\u0027])"},{"line_number":224,"context_line":"                        if project_domain[\u0027id\u0027] is None:"},{"line_number":225,"context_line":"                            self.fail(msg\u003d\u0027Project domain %s could not be found\u0027 % self.params[\u0027project_domain\u0027])"},{"line_number":226,"context_line":"                    project \u003d self.conn.get_project(name_or_id\u003dself.params[\u0027project\u0027], domain_id\u003dproject_domain[\u0027id\u0027])"},{"line_number":227,"context_line":"                    if project is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"07a5f4c4_a11fe308","line":224,"in_reply_to":"1008f752_a662033f","updated":"2022-05-03 12:07:55.000000000","message":"Thanks for catching this","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2776d079c34c478bd2891821f1744d2cf7a5ea09","unresolved":true,"context_lines":[{"line_number":250,"context_line":"                image\u003dimage,"},{"line_number":251,"context_line":"                kernel\u003dself.params[\u0027kernel\u0027],"},{"line_number":252,"context_line":"                ramdisk\u003dself.params[\u0027ramdisk\u0027],"},{"line_number":253,"context_line":"                is_protected\u003dself.params[\u0027is_protected\u0027],"},{"line_number":254,"context_line":"                **self.params[\u0027properties\u0027])"},{"line_number":255,"context_line":"            if self.params[\u0027tags\u0027]:"},{"line_number":256,"context_line":"                self.conn.image.update_image(image.id, tags\u003dself.params[\u0027tags\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5220d0e4_bdcbfbd8","line":253,"updated":"2022-05-02 12:51:58.000000000","message":"Please submit your patch against stable/1.0.0 branch, then you can drop the unrelated is_protected change. For adoption to sdk 1.0.0 on master branch we probably have to apply more changes anyway. So for now, we have happy with just a single fix for the project/owner issue. This has the additional benefit that you will see your fix in collection release sooner, because we dont know yet when the new collection for sdk 1.0.0 will be released.","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"5429396a61b02dde1aa5829eefac21b742190eda","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                image\u003dimage,"},{"line_number":251,"context_line":"                kernel\u003dself.params[\u0027kernel\u0027],"},{"line_number":252,"context_line":"                ramdisk\u003dself.params[\u0027ramdisk\u0027],"},{"line_number":253,"context_line":"                is_protected\u003dself.params[\u0027is_protected\u0027],"},{"line_number":254,"context_line":"                **self.params[\u0027properties\u0027])"},{"line_number":255,"context_line":"            if self.params[\u0027tags\u0027]:"},{"line_number":256,"context_line":"                self.conn.image.update_image(image.id, tags\u003dself.params[\u0027tags\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"a42c95bd_a206cc9c","line":253,"in_reply_to":"5220d0e4_bdcbfbd8","updated":"2022-05-03 14:05:35.000000000","message":"Cherry-picked to stable/1.0.0:\nhttps://review.opendev.org/c/openstack/ansible-collections-openstack/+/840297","commit_id":"ad4e45223b39dadfa13f58af9310c2b980ab5519"}]}
