Handle missing dst_pool parameter in zone_migration

Unlike Nova, Cinder does not support calling the 'os-migrate_volume'[1]
action without a host or a cluster. For volume migrations of type
'migrate' in watcher the dst_pool is required, but for other migrations
that migrate the volumes to different types is not needed. This
change checks if the dst_pool is defined and prevents some migrations
when it's misssing information.

Adds testing for creating audits with the Zone Migration status,
validating the schema changes.

[1] https://docs.openstack.org/api-ref/block-storage/v3/index.html#migrate-a-volume

Closes-Bug: 2108988

Change-Id: I305c58e47093c4a884e86f1d91fdc15ef2a1cfba
Signed-off-by: jgilaber <jgilaber@redhat.com>
This commit is contained in:
jgilaber
2025-05-16 13:46:57 +02:00
parent 6cb4e2fa83
commit fe56660c44
5 changed files with 198 additions and 47 deletions

View File

@@ -112,6 +112,9 @@ parameter type default required description
instances migrate.
``dst_node`` string None Optional Compute node to which
instances migrate.
If omitted, nova will
choose the destination
node automatically.
============= ======= ======== ========= ========================
The elements of storage_pools array are: