mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 01:04:28 +00:00
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>
105 lines
2.1 KiB
YAML
105 lines
2.1 KiB
YAML
requires_ansible: ">=2.8"
|
|
action_groups:
|
|
openstack:
|
|
- address_scope
|
|
- application_credential
|
|
- auth
|
|
- baremetal_deploy_template
|
|
- baremetal_inspect
|
|
- baremetal_node
|
|
- baremetal_node_action
|
|
- baremetal_node_info
|
|
- baremetal_port
|
|
- baremetal_port_group
|
|
- baremetal_port_info
|
|
- catalog_service
|
|
- catalog_service_info
|
|
- coe_cluster
|
|
- coe_cluster_template
|
|
- compute_flavor
|
|
- compute_flavor_access
|
|
- compute_flavor_info
|
|
- compute_service_info
|
|
- config
|
|
- dns_zone
|
|
- dns_zone_info
|
|
- endpoint
|
|
- federation_idp
|
|
- federation_idp_info
|
|
- federation_mapping
|
|
- federation_mapping_info
|
|
- floating_ip
|
|
- floating_ip_info
|
|
- group_assignment
|
|
- host_aggregate
|
|
- host_aggregate_info
|
|
- identity_domain
|
|
- identity_domain_info
|
|
- identity_group
|
|
- identity_group_info
|
|
- identity_role
|
|
- identity_role_info
|
|
- identity_user
|
|
- identity_user_info
|
|
- image
|
|
- image_info
|
|
- keypair
|
|
- keypair_info
|
|
- keystone_federation_protocol
|
|
- keystone_federation_protocol_info
|
|
- lb_health_monitor
|
|
- lb_listener
|
|
- lb_member
|
|
- lb_pool
|
|
- loadbalancer
|
|
- network
|
|
- network_segment
|
|
- networks_info
|
|
- neutron_rbac_policies_info
|
|
- neutron_rbac_policy
|
|
- object
|
|
- object_container
|
|
- object_containers_info
|
|
- port
|
|
- port_forwarding
|
|
- port_forwarding_info
|
|
- port_info
|
|
- project
|
|
- project_info
|
|
- quota
|
|
- recordset
|
|
- resource
|
|
- resources
|
|
- role_assignment
|
|
- router
|
|
- routers_info
|
|
- security_group
|
|
- security_group_info
|
|
- security_group_rule
|
|
- security_group_rule_info
|
|
- server
|
|
- server_action
|
|
- server_group
|
|
- server_info
|
|
- server_metadata
|
|
- server_volume
|
|
- share_type
|
|
- share_type_info
|
|
- stack
|
|
- stack_info
|
|
- subnet
|
|
- subnet_pool
|
|
- subnets_info
|
|
- trunk
|
|
- volume
|
|
- volume_manage
|
|
- volume_backup
|
|
- volume_backup_info
|
|
- volume_info
|
|
- volume_service_info
|
|
- volume_snapshot
|
|
- volume_snapshot_info
|
|
- volume_type_access
|
|
- volume_image_metadata
|
|
- volume_retype
|