Files
ansible-collections-openstack/plugins/modules
Simon Dodsley 1f0ced6952 Add volume_retype module
Introduce openstack.cloud.volume_retype, a new module that wraps
the Cinder os-retype block storage action (POST /volumes/{id}/action)
to change the type of an existing volume.

The module supports both migration policies exposed by the Cinder API:
- 'never'     – changes volume type metadata only; requires source and
                target types to share the same storage backend.
- 'on-demand' – triggers a full data migration to the backend
                associated with the new volume type.

The module is idempotent: if the volume already carries the requested
type no API call is made and changed=false is returned. It also
honours Ansible check mode, resolving the volume and target type to
verify feasibility without mutating any state.

A wait/timeout mechanism is included. For on-demand retypes the module
polls migration_status until 'success' or 'error'. For never retypes
it polls volume status until 'available'.

The equivalent CLI command is:
  openstack volume set --type <type> --retype-policy <policy> <vol>

This closes a gap in the collection: openstack.cloud.volume handles
create/delete/update but does not expose the retype action.

Integration tests are provided covering: basic retype, idempotency,
check mode, lookup by UUID, and error handling for missing volume
and missing volume type.

Change-Id: I32b2b6303366a19baa1e3f1473b09650f6daee66
Signed-off-by: Simon Dodsley <simon@purestorage.com>
2026-05-20 11:45:30 -04:00
..
2024-11-03 12:15:11 +00:00
2025-12-10 12:59:52 -05:00
2025-01-09 13:45:19 +00:00
2025-04-22 16:30:58 +03:00
2023-01-26 09:34:30 +01:00
2023-01-26 09:34:30 +01:00
2025-01-14 10:34:50 +01:00
2025-05-31 09:46:52 -04:00
2026-05-20 11:45:30 -04:00
2026-01-07 11:49:47 +00:00