Share migration Newton improvements
At Austin 2016 summit there were several improvements to
Share migration feature discussed. This patch implements
these changes.
Changes are:
- Added 'Writable' API parameter: user chooses whether share must
remain writable during migration.
- Added 'Preserve Metadata' API parameter: user chooses whether
share must preserve all file metadata on migration.
- Added 'Non-disruptive' API parameter: user chooses whether
migration of share must be performed non-disruptively.
- Removed existing 'Notify', thus removing 1-phase migration
possibility.
- Renamed existing 'Force Host Copy' parameter to 'Force
Host-assisted Migration'.
- Renamed all 'migration_info' and 'migration_get_info' entries to
'connection_info' and 'connection_get_info'.
- Updated driver interfaces with the new API parameters, drivers
must respect them.
- Changed share/api => scheduler RPCAPI back to asynchronous.
- Added optional SHA-256 validation to perform additional check if
bytes were corrupted during copying.
- Added mount options configuration to Data Service so CIFS shares
can be mounted.
- Driver may override _get_access_mapping if supports a different
access_type/protocol combination than what is defined by default.
- Added CIFS share protocol support and 'user' access type
support to Data Service.
- Reset Task State API now allows task_state to be unset using
'None' value.
- Added possibility to change share-network when migrating a share.
- Bumped microversion to 2.22.
- Removed support of all previous versions of Share Migration APIs.
APIImpact
DocImpact
Implements: blueprint newton-migration-improvements
Change-Id: Ief49a46c86ed3c22d3b31021aff86a9ce0ecbe3b
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 82135bf..6d0eb25 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -401,13 +401,19 @@
return share
@classmethod
- def migrate_share(cls, share_id, dest_host, client=None, notify=True,
- wait_for_status='migration_success', **kwargs):
+ def migrate_share(
+ cls, share_id, dest_host, wait_for_status, client=None,
+ force_host_assisted_migration=False, new_share_network_id=None,
+ **kwargs):
client = client or cls.shares_v2_client
- client.migrate_share(share_id, dest_host, notify, **kwargs)
+ client.migrate_share(
+ share_id, dest_host,
+ force_host_assisted_migration=force_host_assisted_migration,
+ new_share_network_id=new_share_network_id,
+ writable=False, preserve_metadata=False, nondisruptive=False,
+ **kwargs)
share = client.wait_for_migration_status(
- share_id, dest_host, wait_for_status,
- version=kwargs.get('version'))
+ share_id, dest_host, wait_for_status, **kwargs)
return share
@classmethod
@@ -415,8 +421,7 @@
client = client or cls.shares_v2_client
client.migration_complete(share_id, **kwargs)
share = client.wait_for_migration_status(
- share_id, dest_host, 'migration_success',
- version=kwargs.get('version'))
+ share_id, dest_host, 'migration_success', **kwargs)
return share
@classmethod