Dan Kenigsberg has submitted this change and it was merged.
Change subject: API: Provide a working getAllTasks API
......................................................................
API: Provide a working getAllTasks API
Changes since last iteration:
- Dropped 'tags' filtering from the API. Users can do client-side filtering as
they see fit.
The current APIs for retrieving all task information do not actually return all
task information. I would like to introduce a new API that corrects this and
other issues with the current API while preserving backwards compatibility with
ovirt-engine for as long as is necessary.
The current APIs:
getAllTasksInfo(spUUID=None, options = None):
- Returns a dictionary that maps a task UUID to a task verb.
- Despite having 'all' in the name, this API only returns tasks that have an
'spm' tag.
- This call returns only one piece of information for each task.
- The spUUID parameter is deprecated and ignored.
getAllTasksStatuses(spUUID=None, options = None):
- Returns a dictionary of task status information.
- Despite having 'all' in the name, this API only returns tasks that have an
'spm' tag.
- The spUUID parameter is deprecated and ignored.
I propose the following new API:
getAllTasks(options=None):
- Returns a dictionary of task information. The info from both of the above
functions would be merged into a single result set.
- The spUUID parameter is dropped. options is for future extension and is
currently not used.
This new API includes all functionality that is available in the old calls. In
the future, ovirt-engine could switch to this API and preserve the current
semantics by ignoring tasks where task['tag'] != 'spm'. Meanwhile, API
users
that really want all tasks (gluster and the REST API) can get what they need.
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
Change-Id: I43371d358dfdfcfcee14aca40ed06d63be7c0a44
---
M vdsm/API.py
M vdsm/BindingXMLRPC.py
M vdsm/storage/hsm.py
M vdsm/storage/task.py
M vdsm/storage/taskManager.py
M vdsm_api/vdsmapi-schema.json
M vdsm_cli/vdsClient.py
7 files changed, 106 insertions(+), 3 deletions(-)
Approvals:
Adam Litke: Verified
Dan Kenigsberg: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/3613
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I43371d358dfdfcfcee14aca40ed06d63be7c0a44
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Shireesh Anjal <sanjal(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server