Merge "add additional driver data to migration get progress view"
This commit is contained in:
commit
f855abd374
@ -1473,6 +1473,13 @@ migration_complete:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: object
|
type: object
|
||||||
|
migration_progress_details:
|
||||||
|
description: |
|
||||||
|
Additional driver specific details of the migration progress.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
min_version: 2.59
|
||||||
mount_snapshot_support:
|
mount_snapshot_support:
|
||||||
description: |
|
description: |
|
||||||
Boolean extra spec used for filtering of back ends
|
Boolean extra spec used for filtering of back ends
|
||||||
|
@ -189,6 +189,7 @@ Response parameters
|
|||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- details: migration_progress_details
|
||||||
- total_progress: total_progress
|
- total_progress: total_progress
|
||||||
- task_state: task_state
|
- task_state: task_state
|
||||||
|
|
||||||
|
@ -158,13 +158,14 @@ REST_API_VERSION_HISTORY = """
|
|||||||
'share_server_reset_task_state'
|
'share_server_reset_task_state'
|
||||||
* 2.58 - Added 'share_groups' and 'share_group_snapshots' to the limits
|
* 2.58 - Added 'share_groups' and 'share_group_snapshots' to the limits
|
||||||
view.
|
view.
|
||||||
|
* 2.59 - Add driver ``details`` field to migration get progress.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# The minimum and maximum versions of the API supported
|
# The minimum and maximum versions of the API supported
|
||||||
# The default api version request is defined to be the
|
# The default api version request is defined to be the
|
||||||
# minimum version of the API supported.
|
# minimum version of the API supported.
|
||||||
_MIN_API_VERSION = "2.0"
|
_MIN_API_VERSION = "2.0"
|
||||||
_MAX_API_VERSION = "2.58"
|
_MAX_API_VERSION = "2.59"
|
||||||
DEFAULT_API_VERSION = _MIN_API_VERSION
|
DEFAULT_API_VERSION = _MIN_API_VERSION
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,3 +318,8 @@ user documentation.
|
|||||||
2.58
|
2.58
|
||||||
----
|
----
|
||||||
Added 'share_groups' and 'share_group_snapshots' to the limits view.
|
Added 'share_groups' and 'share_group_snapshots' to the limits view.
|
||||||
|
|
||||||
|
2.59
|
||||||
|
----
|
||||||
|
Added 'details' field to migration get progress api, which optionally may hold
|
||||||
|
additional driver data related to the progress of share migration.
|
||||||
|
@ -20,13 +20,19 @@ class ViewBuilder(common.ViewBuilder):
|
|||||||
"""Model share migration view data response as a python dictionary."""
|
"""Model share migration view data response as a python dictionary."""
|
||||||
|
|
||||||
_collection_name = 'share_migration'
|
_collection_name = 'share_migration'
|
||||||
_detail_version_modifiers = []
|
_detail_version_modifiers = [
|
||||||
|
'add_progress_details',
|
||||||
|
]
|
||||||
|
|
||||||
def get_progress(self, request, share, progress):
|
def get_progress(self, request, share, progress):
|
||||||
"""View of share migration job progress."""
|
"""View of share migration job progress."""
|
||||||
result = {
|
result = {
|
||||||
'total_progress': progress['total_progress'],
|
'total_progress': progress.pop('total_progress'),
|
||||||
'task_state': share['task_state'],
|
'task_state': share['task_state'],
|
||||||
}
|
}
|
||||||
self.update_versioned_resource_dict(request, result, progress)
|
self.update_versioned_resource_dict(request, result, progress)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@common.ViewBuilder.versioned_method('2.59')
|
||||||
|
def add_progress_details(self, context, progress_dict, progress):
|
||||||
|
progress_dict['details'] = progress
|
||||||
|
@ -1160,7 +1160,7 @@ class ShareAPITest(test.TestCase):
|
|||||||
mock.Mock(return_value=share))
|
mock.Mock(return_value=share))
|
||||||
|
|
||||||
self.mock_object(share_api.API, 'migration_get_progress',
|
self.mock_object(share_api.API, 'migration_get_progress',
|
||||||
mock.Mock(return_value=expected))
|
mock.Mock(return_value=copy.deepcopy(expected)))
|
||||||
|
|
||||||
response = self.controller.migration_get_progress(req, share['id'],
|
response = self.controller.migration_get_progress(req, share['id'],
|
||||||
body)
|
body)
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Microversion 2.59 adds optional driver `details` to the response of
|
||||||
|
migration get progress.
|
Loading…
x
Reference in New Issue
Block a user