Change in vdsm[master]: sdm: add SDM.create_volume API stub
nsoffer at redhat.com
nsoffer at redhat.com
Tue Jan 5 22:33:29 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: sdm: add SDM.create_volume API stub
......................................................................
Patch Set 10: Code-Review-1
(4 comments)
https://gerrit.ovirt.org/#/c/50220/10/client/vdsClient.py
File client/vdsClient.py:
Line 1969: res = self.s.unregisterSecrets(args)
Line 1970: return res['status']['code'], res['status']['message']
Line 1971:
Line 1972: def sdm_create_volume(self, args):
Line 1973: validateArgTypes(args, [str, parse_json_obj])
This must convert integer values to strings, otherwise you cannot create a volume with size bigger than int32_t.
I would do this here:
vol_info = args[1]
vol_info['vol_size'] = str(vol_info['vol_size'])
if 'initial_size' in vol_info:
vol_info['initial_size'] = str(vol_info['initial_size'])
Line 1974: res = self.s.sdm_create_volume(*args)
Line 1975: if res['status']['code']:
Line 1976: return res['status']['code'], res['status']['message']
Line 1977:
https://gerrit.ovirt.org/#/c/50220/10/vdsm/API.py
File vdsm/API.py:
Line 1753:
Line 1754: class SDM(APIBase):
Line 1755: ctorArgs = []
Line 1756:
Line 1757: def __init__(self):
Not needed
Line 1758: APIBase.__init__(self)
Line 1759:
Line 1760: def create_volume(self, job_id, vol_info):
https://gerrit.ovirt.org/#/c/50220/10/vdsm/rpc/bindingxmlrpc.py
File vdsm/rpc/bindingxmlrpc.py:
Line 1027:
Line 1028: def storageServerConnectionRefsStatuses(self):
Line 1029: return API.ConnectionRefs().statuses()
Line 1030:
Line 1031: def sdm_create_volume(self, job_id, vol_info):
This must convert integer values in vol_info from string to integer.
Line 1032: sdm = API.SDM()
Line 1033: return sdm.create_volume(job_id, vol_info)
Line 1034:
Line 1035: def getGlobalMethods(self):
https://gerrit.ovirt.org/#/c/50220/10/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:
Line 3681: return {'domains': self.domainMonitor.getHostStatus(domains)}
Line 3682:
Line 3683: @public
Line 3684: def sdm_create_volume(self, job_id, vol_info):
Line 3685: raise se.GeneralException("Not implemented").response()
You are raising a dict, remove the .response()
--
To view, visit https://gerrit.ovirt.org/50220
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1ff2656f2dd427812e557e6587429759a9c0a845
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list