Change in vdsm[master]: API: Add api for getting host jobs info

nsoffer at redhat.com nsoffer at redhat.com
Mon Nov 30 19:56:01 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: API: Add api for getting host jobs info
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

Adam, can you check the comments?

https://gerrit.ovirt.org/#/c/49451/1/client/vdsClient.py
File client/vdsClient.py:

Line 1946:         return status['status']['code'], status['status']['message']
Line 1947: 
Line 1948:     def getHostJobs(self, args):
Line 1949:         if len(args) > 1:
Line 1950:             raise ValueError('Wrong number of arguments')
We have standard way to do this.
Line 1951:         status = self.s.getHostJobs(*args)
Line 1952:         if status['status']['code'] == 0:
Line 1953:             pp.pprint(status['jobs'])
Line 1954:         return status['status']['code'], status['status']['message']


https://gerrit.ovirt.org/#/c/49451/1/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 4173: # Since: 4.17.3
Line 4174: ##
Line 4175: {'command': {'class': 'Host', 'name': 'getJobs'},
Line 4176:  'data': {'*type_filter': 'HostJobType'},
Line 4177:  'returns': 'HostJobInfoMap'}
Infra prefer monitoring single job. I think we should have a flexible api allowing getting single or many jobs, all all jobs.

So the interface should probably be something like:

    getJobs(jobb_type="any", job_ids=[])

To get single job:

    getJobs(job_ids=["xxxyyy"])

To get all storage jobs:

    getJobs(job_type="storage")

Using both job_type and job_ids is possible but does not make sense.
Line 4178: 
Line 4179: ##
Line 4180: # @Host.abortV2VJob:
Line 4181: #


-- 
To view, visit https://gerrit.ovirt.org/49451
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I957938ea9ca55d2499d09dfed39821c85e3e9d48
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list