sushy/releasenotes/notes/refactor-taskmonitor-update-volume-ba99380188395852.yaml
Aija Jauntēva 7a9a2b6020 Refactor TaskMonitor and update Volume methods
Refactor TaskMonitor-s:
  - deprecate ``resources.task_monitor.TaskMonitor``
  - move TaskMonitor from ``resources.taskservice.taskmonitor``
    to ``taskmonitor``
  - add necessary methods from deprecated TaskMonitor to the
    moved one

Update Volume methods to use remaining TaskMonitor.

Add static helper method to TaskMonitor to initiate TaskMonitor
instance from response.
Replace TaskMonitor in connector with the remaining TaskMonitor.

Add method get_task_monitor to Sushy class. Deprecate
UpdateService.get_task_monitor.

Uppercase Location header in connector. While headers are case
insensitive, in unit tests where headers are mocked they are
case sensitive.

Change-Id: Idd4158d87d27b6358c6d7a2a7183427a494ee384
2021-02-12 07:25:15 -05:00

39 lines
1.5 KiB
YAML

---
features:
- |
Adds new method ``get_task_monitor`` to retrieve TaskMonitor instance by
task monitor URI.
deprecations:
- |
Existing two ``TaskMonitor``-s are deprecated and replaced with one
``taskmonitor.TaskMonitor``.
For ``resources.task_monitor.TaskMonitor`` users changes include:
* ``in_progress`` is replaced with method ``check_is_processing``
* ``location_header`` is replaced with method ``task_monitor_uri``
* there is no replacement for ``set_retry_after``,
``taskmonitor.TaskMonitor`` sets this internally from Retry-After
header
For ``resources.taskservice.taskmonitor.TaskMonitor`` users changes
include:
* ``check_is_processing``, ``sleep_for`` and static ``get_task_monitor``
added.
* in ``__init__`` parameter ``field_data`` is deprecated, use ``response``
* in ``__init__`` parameter ``task_monitor`` is renamed to
``task_monitor_uri``
* ``task_monitor`` is deprecated, use ``task_monitor_uri``
* ``retry_after`` is deprecated, use ``sleep_for``
Methods ``create_volume``, ``delete_volume``, ``initialize_volume`` in
volume module are deprecated and replaced with ones named ``create``,
``delete`` and ``initialize``. New methods for asynchronous operations
return ``taskmonitor.TaskMonitor`` instead of
deprecated ``resources.task_monitor.TaskMonitor``.
Method ``resources.updateservice.UpdateService.get_task_monitor`` is
deprecated, use ``Sushy.get_task_monitor`` instead.