)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"663c6ba35cdd596cd580c0da97674be537d6fd3e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"512fb289_6ed44c82","updated":"2025-04-16 18:49:50.000000000","message":"recheck","commit_id":"8f66f4f06e1986ace1ddca03492cfc293b635f4c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"c755ee39783c11cd9913dd06d75a5892833278ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"56e142d9_d8fc116b","updated":"2025-05-13 17:16:35.000000000","message":"this lgtm, tests are executed and they look reasonable enough to me","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"87b719b6e436e1e856aac04f96868a268133c4cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"44331e54_a8543027","updated":"2025-05-31 17:04:46.000000000","message":"Awesome, thanks for your work, that is really good and it would be nice to get this module in!","commit_id":"556208fc3cf6641e362b30efe9bd82f70a4e73ff"}],"ci/roles/volume_manage/tasks/main.yml":[{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"3631baf4ab7f15eebed50ca2cf4cad3664651e0c","unresolved":true,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"d80db5fc_e7ee4650","line":29,"updated":"2025-05-13 17:17:47.000000000","message":"the only thing would be nice to see in the test, is check of idempotence. That running the thing second time does not result in changes.","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"c4bbca7956da660a47654363fce892d12dec6856","unresolved":true,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"5bc0c35a_470731cf","line":29,"in_reply_to":"0ee951d1_33c783a7","updated":"2025-05-26 14:21:06.000000000","message":"Does the updated patch cover what you need? If not, I will add `ignore_errors: true` into the documentation.","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"94d4cbd5c0dfaa484f03264ca6f7592faca74af0","unresolved":true,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"fcded269_3f1c3675","line":29,"in_reply_to":"5bc0c35a_470731cf","updated":"2025-05-28 14:21:03.000000000","message":"I _think_ it covers. But maybe you can add a test here as well to check it out?\n\nLike, add one more time the same task\n\n```\n- name: Unmanage volume\n  openstack.cloud.volume_manage:\n     cloud: \"{{ cloud }}\"\n     state: absent\n     name: \"{{ vol.volume.id }}\"\n  register: unmanage_idempotency\n \n- name: Manage volume\n  openstack.cloud.volume_manage:\n     cloud: \"{{ cloud }}\"\n     state: present\n     source_name: volume-{{ vol.volume.id }}\n     host: \"{{ vol.volume.host }}\"\n     name: \"{{ managed_volume }}\"\n  register: vol_idempotency\n\n- assert:\n    that:\n      - unmanage_idempotency is not changed\n\n- assert:\n    that:\n      - vol_idempotency is not changed\n```\n\nAs I guess this is what ultimately expected?","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"def16db42fa42f9a219113ad71be1b73a5186515","unresolved":true,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"0ee951d1_33c783a7","line":29,"in_reply_to":"5c871abd_e8ce3855","updated":"2025-05-19 16:01:24.000000000","message":"It does not mean that the module will not error out or report a `changed` status despite it did nothing.\n\nSo I am not arguing about real-life effect, but that module will behave as expected if it does nothing and volume is already there or not present.\n\nOr your suggestion would be to `ignore_errors: true` whenever you wanna use the module? Then, I think, it should be documented...","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"2260ce769f401687ff1887f1a955717afa03acde","unresolved":true,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"5c871abd_e8ce3855","line":29,"in_reply_to":"d80db5fc_e7ee4650","updated":"2025-05-13 17:25:52.000000000","message":"The whole point of the module is to take an existing volume and import it into cinder control at which point it is no longer a manageable volume, so inherently no change can happen if the manage is run again.\nFor the unmanage, the same occurs. Once the volume is unmanaged, it is effectively removed from the cinder DB, so you couldn\u0027t unmanage it again anyway.\nDepending on the cinder backend driver being utilised, the volume is also renamed as well during both the manage and unmanage operations, so the original names used no longer actually exist on the backend for manage/unmanage to even find as volumes.\nBased on the above this module is, by definition, idempotent.","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"d6640c4ada799def880100c28b8a378f71adb70e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"     host: \"{{ vol.volume.host }}\""},{"line_number":27,"context_line":"     name: \"{{ managed_volume }}\""},{"line_number":28,"context_line":"  register: vol"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- assert:"},{"line_number":31,"context_line":"    that:"},{"line_number":32,"context_line":"      - vol.volume.name \u003d\u003d \"{{ managed_volume }}\""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bf552aca_63966681","line":29,"in_reply_to":"fcded269_3f1c3675","updated":"2025-05-30 14:36:01.000000000","message":"Done","commit_id":"2f5d900116302fd0a5cdcc0162a8315ac5484876"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"5d55afc748275d4d8abc05c41d062f83198d52e1","unresolved":true,"context_lines":[{"line_number":30,"context_line":"- pause:"},{"line_number":31,"context_line":"    seconds: 10"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"- name: Unmanage volume again"},{"line_number":34,"context_line":"  openstack.cloud.volume_manage:"},{"line_number":35,"context_line":"     cloud: \"{{ cloud }}\""},{"line_number":36,"context_line":"     state: absent"},{"line_number":37,"context_line":"     name: \"{{ vol.volume.id }}\""},{"line_number":38,"context_line":"  register: unmanage_idempotency"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- name: Manage volume again"},{"line_number":41,"context_line":"  openstack.cloud.volume_manage:"}],"source_content_type":"text/x-yaml","patch_set":27,"id":"a51e7bd7_d6b553b1","line":38,"range":{"start_line":33,"start_character":0,"end_line":38,"end_character":32},"updated":"2025-05-31 07:21:17.000000000","message":"For this test to make sense, it should be moved to L20","commit_id":"8c2d1ff9e5535bcc92ccb907c5e10bc6aa369271"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"d2d3ba19681fc84ebd808b005d8e96194a5718e3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"- pause:"},{"line_number":31,"context_line":"    seconds: 10"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"- name: Unmanage volume again"},{"line_number":34,"context_line":"  openstack.cloud.volume_manage:"},{"line_number":35,"context_line":"     cloud: \"{{ cloud }}\""},{"line_number":36,"context_line":"     state: absent"},{"line_number":37,"context_line":"     name: \"{{ vol.volume.id }}\""},{"line_number":38,"context_line":"  register: unmanage_idempotency"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- name: Manage volume again"},{"line_number":41,"context_line":"  openstack.cloud.volume_manage:"}],"source_content_type":"text/x-yaml","patch_set":27,"id":"59045e1a_9b78c180","line":38,"range":{"start_line":33,"start_character":0,"end_line":38,"end_character":32},"in_reply_to":"a51e7bd7_d6b553b1","updated":"2025-05-31 15:45:49.000000000","message":"Done","commit_id":"8c2d1ff9e5535bcc92ccb907c5e10bc6aa369271"}],"plugins/modules/volume_manage.py":[{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"21cef601e89e5d2b28d4995753d9b411f1659cbe","unresolved":true,"context_lines":[{"line_number":8,"context_line":"---"},{"line_number":9,"context_line":"module: volume_manage"},{"line_number":10,"context_line":"short_description: Manage/Unmanage Volumes"},{"line_number":11,"context_line":"author: Simon Dodsley (@sdodsley)"},{"line_number":12,"context_line":"description:"},{"line_number":13,"context_line":"  - Manage or Unmanage Volume in OpenStack."},{"line_number":14,"context_line":"options:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ec2a2d54_f4559c1b","line":11,"updated":"2025-04-22 08:47:11.000000000","message":"We have (maybe unwritten) rule that author should be set to \"OpenStack Ansible SIG\" - see other modules.","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"c19c2ad6eb2f67ca1dd9c79045f43ea2d17abe83","unresolved":false,"context_lines":[{"line_number":8,"context_line":"---"},{"line_number":9,"context_line":"module: volume_manage"},{"line_number":10,"context_line":"short_description: Manage/Unmanage Volumes"},{"line_number":11,"context_line":"author: Simon Dodsley (@sdodsley)"},{"line_number":12,"context_line":"description:"},{"line_number":13,"context_line":"  - Manage or Unmanage Volume in OpenStack."},{"line_number":14,"context_line":"options:"}],"source_content_type":"text/x-python","patch_set":14,"id":"d1b7e5be_8af5f38a","line":11,"in_reply_to":"ec2a2d54_f4559c1b","updated":"2025-04-22 11:58:19.000000000","message":"Done","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"21cef601e89e5d2b28d4995753d9b411f1659cbe","unresolved":true,"context_lines":[{"line_number":203,"context_line":"        bootable\u003ddict(default\u003d\"false\", type\u003d\"bool\"),"},{"line_number":204,"context_line":"        volume_type\u003ddict(type\u003d\"str\"),"},{"line_number":205,"context_line":"        name\u003ddict(required\u003dTrue, type\u003d\"str\"),"},{"line_number":206,"context_line":"        id_type\u003ddict("},{"line_number":207,"context_line":"            default\u003d\"source-name\", choices\u003d[\"source-name\", \"source-id\"], type\u003d\"str\""},{"line_number":208,"context_line":"        ),"},{"line_number":209,"context_line":"        state\u003ddict(default\u003d\"present\", choices\u003d[\"absent\", \"present\"], type\u003d\"str\"),"}],"source_content_type":"text/x-python","patch_set":14,"id":"faa57f10_5c778a50","line":206,"updated":"2025-04-22 08:47:11.000000000","message":"parameter is not present in the documentation above. I am very worried that linters are not complaining about that","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"c19c2ad6eb2f67ca1dd9c79045f43ea2d17abe83","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        bootable\u003ddict(default\u003d\"false\", type\u003d\"bool\"),"},{"line_number":204,"context_line":"        volume_type\u003ddict(type\u003d\"str\"),"},{"line_number":205,"context_line":"        name\u003ddict(required\u003dTrue, type\u003d\"str\"),"},{"line_number":206,"context_line":"        id_type\u003ddict("},{"line_number":207,"context_line":"            default\u003d\"source-name\", choices\u003d[\"source-name\", \"source-id\"], type\u003d\"str\""},{"line_number":208,"context_line":"        ),"},{"line_number":209,"context_line":"        state\u003ddict(default\u003d\"present\", choices\u003d[\"absent\", \"present\"], type\u003d\"str\"),"}],"source_content_type":"text/x-python","patch_set":14,"id":"f64f2447_14b43e01","line":206,"in_reply_to":"faa57f10_5c778a50","updated":"2025-04-22 11:58:19.000000000","message":"It is there - line 60","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"21cef601e89e5d2b28d4995753d9b411f1659cbe","unresolved":true,"context_lines":[{"line_number":223,"context_line":"            self.exit_json(changed\u003dTrue, volume\u003dvolume.to_dict(computed\u003dFalse))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        else:"},{"line_number":226,"context_line":"            volume \u003d self.conn.block_storage.find_volume(name)"},{"line_number":227,"context_line":"            if volume:"},{"line_number":228,"context_line":"                self._unmanage()"},{"line_number":229,"context_line":"                self.exit_json(changed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6dbbf3_e1abe767","line":226,"updated":"2025-04-22 08:47:11.000000000","message":"it is a bit weird to call `find` in the unmanage case but not in the manage. If there is a reasonable explanation for that please add comments","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"556ae58c41a12b8aab011237bf4908500fd69d31","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            self.exit_json(changed\u003dTrue, volume\u003dvolume.to_dict(computed\u003dFalse))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        else:"},{"line_number":226,"context_line":"            volume \u003d self.conn.block_storage.find_volume(name)"},{"line_number":227,"context_line":"            if volume:"},{"line_number":228,"context_line":"                self._unmanage()"},{"line_number":229,"context_line":"                self.exit_json(changed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"86461156_18a3a4f3","line":226,"in_reply_to":"193d123b_1958a3fb","updated":"2025-04-24 14:05:24.000000000","message":"Done","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"c19c2ad6eb2f67ca1dd9c79045f43ea2d17abe83","unresolved":true,"context_lines":[{"line_number":223,"context_line":"            self.exit_json(changed\u003dTrue, volume\u003dvolume.to_dict(computed\u003dFalse))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        else:"},{"line_number":226,"context_line":"            volume \u003d self.conn.block_storage.find_volume(name)"},{"line_number":227,"context_line":"            if volume:"},{"line_number":228,"context_line":"                self._unmanage()"},{"line_number":229,"context_line":"                self.exit_json(changed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"193d123b_1958a3fb","line":226,"in_reply_to":"fa6dbbf3_e1abe767","updated":"2025-04-22 11:58:19.000000000","message":"The volume manage process is about pulling a volume into cinder control from an existing backend volume not known by cinder, therefore `find_volume` would never work in the `manage` function, as that references the cinder DB where the volume does not currently exist.","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"21cef601e89e5d2b28d4995753d9b411f1659cbe","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        }"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        id_type \u003d self.params.get(\"id_type\")"},{"line_number":249,"context_line":"        if id_type in [\"source-name\", \"source-id\"]:"},{"line_number":250,"context_line":"            kwargs[\"ref\"] \u003d {id_type: self.params[\"source\"]}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        volume \u003d self.conn.block_storage.manage_volume(**kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"146fed7a_49debe0d","line":249,"updated":"2025-04-22 08:47:11.000000000","message":"honestly speaking this interface for me is more confusing than it is supposed to be. I would rather simply follow the cinder way and just have 2 params: source_id and source_name. This is not a very useful abstraction","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"c19c2ad6eb2f67ca1dd9c79045f43ea2d17abe83","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        }"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        id_type \u003d self.params.get(\"id_type\")"},{"line_number":249,"context_line":"        if id_type in [\"source-name\", \"source-id\"]:"},{"line_number":250,"context_line":"            kwargs[\"ref\"] \u003d {id_type: self.params[\"source\"]}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        volume \u003d self.conn.block_storage.manage_volume(**kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa5e0c9d_51d7c388","line":249,"in_reply_to":"146fed7a_49debe0d","updated":"2025-04-22 11:58:19.000000000","message":"These two parameters are mutually exclusive, so you can only provide one in the `ref`, but you need to tell the SDK manage call which one you are using.","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"cf555f32a31aba4e7221e78b74e40538326d67ec","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        }"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        id_type \u003d self.params.get(\"id_type\")"},{"line_number":249,"context_line":"        if id_type in [\"source-name\", \"source-id\"]:"},{"line_number":250,"context_line":"            kwargs[\"ref\"] \u003d {id_type: self.params[\"source\"]}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        volume \u003d self.conn.block_storage.manage_volume(**kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"81e1eda8_8397791e","line":249,"in_reply_to":"1ca9cc2d_a9b5e87e","updated":"2025-04-24 19:00:11.000000000","message":"OK - I have amended the module to reflect source-name or source-id or both","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"a7bccca7f1e6b2b6396fc50c49400884fe22fd57","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        }"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        id_type \u003d self.params.get(\"id_type\")"},{"line_number":249,"context_line":"        if id_type in [\"source-name\", \"source-id\"]:"},{"line_number":250,"context_line":"            kwargs[\"ref\"] \u003d {id_type: self.params[\"source\"]}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        volume \u003d self.conn.block_storage.manage_volume(**kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"a41e1711_3d062421","line":249,"in_reply_to":"81e1eda8_8397791e","updated":"2025-05-05 14:53:26.000000000","message":"Done","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"556ae58c41a12b8aab011237bf4908500fd69d31","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        }"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        id_type \u003d self.params.get(\"id_type\")"},{"line_number":249,"context_line":"        if id_type in [\"source-name\", \"source-id\"]:"},{"line_number":250,"context_line":"            kwargs[\"ref\"] \u003d {id_type: self.params[\"source\"]}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        volume \u003d self.conn.block_storage.manage_volume(**kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ca9cc2d_a9b5e87e","line":249,"in_reply_to":"fa5e0c9d_51d7c388","updated":"2025-04-24 14:05:24.000000000","message":"I do not see that those are mutually exclusive generally. Neither documentation says that (and in example you see both), nor the API jsonschema is specifying that only one of those can be specified, nor the code actually shows that. What I see is that code typically does `if \"source-name\" in ref ... elif \"source-id\" in ref ...` and in some parts is actually itself filling both, so you can specify both. SDK is just passing the ref as received to the api, so I do not see any problem with SDK here.\nThis interface is actually forcing you to always specify 2 parameters to the module where in reality you would really need to pass just one (while being explicit). I see from the code that there might be also other parameters in the ref (https://opendev.org/openstack/cinder/src/branch/master/cinder/volume/drivers/infortrend/raidcmd_cli/common_cli.py#L2600) which may at some point be required to also have this on ansible side. So having explicit module parameters source_name, source_id are giving the most clarity and flexibility","commit_id":"02d3ee9e74a077b325c1cbe45fe3174a8e274596"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"2f3c3fd83a5f62c3386a2352b47f6b78eaf893e6","unresolved":true,"context_lines":[{"line_number":240,"context_line":"            if self.params.get(key) is not None"},{"line_number":241,"context_line":"        }"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        if self.params[\"source_name\"] and not self.params[\"source_id\"]:"},{"line_number":244,"context_line":"            kwargs[\"ref\"] \u003d {"},{"line_number":245,"context_line":"                \"source-name\": self.params[\"source_name\"],"},{"line_number":246,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":17,"id":"afcdf2a4_bc6b5a2d","line":243,"updated":"2025-05-05 07:36:32.000000000","message":"why do you do it so complex? Why not just:\n```\nif self.params[\"source_name\"]:\n    kwargs[\"ref\"][\"source-name\"] \u003d self.params[\"source_name\"]\nif self.params[\"source_id\"]:\n    kwargs[\"ref\"][\"source-id\"] \u003d self.params[\"source_id\"]\n```","commit_id":"4f81ef47e3b5b46ef12c2734e855868b5ea300b1"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"a7bccca7f1e6b2b6396fc50c49400884fe22fd57","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            if self.params.get(key) is not None"},{"line_number":241,"context_line":"        }"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        if self.params[\"source_name\"] and not self.params[\"source_id\"]:"},{"line_number":244,"context_line":"            kwargs[\"ref\"] \u003d {"},{"line_number":245,"context_line":"                \"source-name\": self.params[\"source_name\"],"},{"line_number":246,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f47ecd8_1f57b686","line":243,"in_reply_to":"afcdf2a4_bc6b5a2d","updated":"2025-05-05 14:53:26.000000000","message":"Done","commit_id":"4f81ef47e3b5b46ef12c2734e855868b5ea300b1"}]}
