Change in vdsm[master]: [wip] jsonrpc: Vdsm changes

ybronhei at redhat.com ybronhei at redhat.com
Thu Jan 2 13:31:20 UTC 2014


Yaniv Bronhaim has posted comments on this change.

Change subject: [wip] jsonrpc: Vdsm changes
......................................................................


Patch Set 12: Code-Review-1

(11 comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-11-29 12:33:29 +0100
Line 4: Commit:     pkliczewski <piotr.kliczewski at gmail.com>
Line 5: CommitDate: 2013-12-20 15:27:33 +0100
Line 6: 
Line 7: [wip] jsonrpc: Vdsm changes
please say more . .how is getAllVmStats change relate to jsonrpc for example..? what changes did you intend to do in yajsonrpc?.
Line 8: 
Line 9: Here are engine changes: http://gerrit.ovirt.org/#/c/20926/
Line 10: 
Line 11: Next steps:


....................................................
File lib/yajsonrpc/__init__.py
Line 90: 
Line 91:         return cls.fromRawObject(obj)
Line 92: 
Line 93:     @staticmethod
Line 94:     def fromRawObject(obj):
I guess you meant to replace this definition with yours.. please add your changes here so we will be able to compare the changes
Line 95:         if obj.get("jsonrpc") != "2.0":
Line 96:             raise JsonRpcInvalidRequestError()
Line 97: 
Line 98:         method = obj.get("method")


Line 480:             ctx.requestDone(JsonRpcResponse(None,
Line 481:                                             JsonRpcInternalError(str(e)),
Line 482:                                             req.id))
Line 483:         else:
Line 484:             if res is None:
you can do 

res = True if res is None else res
Line 485:                 # method was successful but did not return any response
Line 486:                 res = True
Line 487: 
Line 488:             ctx.requestDone(JsonRpcResponse(res, None, req.id))


....................................................
File tests/.gitignore
Line 1: jsonrpc-tests.p12
Line 2: jsonrpc-tests.server.crt
Line 3: jsonrpc-tests.server.csr
Line 4: jsonrpc-tests.server.key
put it in the root's folder .gitignore as all the others


....................................................
File tests/jsonRpcTests.py
Line 176:             finally:
Line 177:                 client.close()
Line 178: 
Line 179:     @brokentest('we sometime see this fail with '
Line 180:                 '"error: [Errno 9] Bad file descriptor"')
still broken?
Line 181:     @permutations(CONNECTION_PERMUTATIONS)
Line 182:     def testMethodCallArgList(self, rt, ssl):
Line 183:         data = dummyTextGenerator(1024)
Line 184: 


....................................................
File tests/jsonRpcUtils.py
Line 75: 
Line 76: @contextmanager
Line 77: def constructReactor(tp, ssl=False):
Line 78:     with REACTOR_CONSTRUCTORS[tp]() as (reactorType, laddr):
Line 79:         sslctx = None
sslctx = DEAFAULT_SSL_CONTEXT if ssl else None
Line 80:         if ssl:
Line 81:             sslctx = DEAFAULT_SSL_CONTEXT
Line 82: 
Line 83:         serverReactor = reactorType(sslctx)


....................................................
File vdsm/API.py
Line 647:                 ip = '0'
Line 648:             self.log.info('network %s: using %s', network, ip)
Line 649:         return ip
Line 650: 
Line 651:     def snapshot(self, snapDrives, snapMemVolHandle=None):
related?
Line 652:         v = self._cif.vmContainer.get(self._UUID)
Line 653:         if not v:
Line 654:             return errCode['noVM']
Line 655:         memoryParams = {}


....................................................
File vdsm/gluster/vdsmapi-gluster-schema.json
Line 352: # Since: 4.10.3
Line 353: ##
Line 354: {'command': {'class': 'GlusterService', 'name': 'get'},
Line 355:  'data': {'serviceNames': ['str']},
Line 356:  'returns': 'GlusterServicesStatusInfo'}
please explain this change in the commit msg
Line 357: 
Line 358: ##
Line 359: # @GlusterService.action:
Line 360: #


Line 568: #
Line 569: # @brick: #optional Brick name
Line 570: #
Line 571: # @statusOption: #optional Provide one of possible values: 
Line 572: #                DETAIL, CLIENTS, MEM
whitespace
Line 573: #
Line 574: # Returns:
Line 575: # Gluster volume status
Line 576: #


Line 886: #
Line 887: # Since: 4.10.3
Line 888: ##
Line 889: {'command': {'class': 'GlusterVolume', 'name': 'removeBrickStatus'},
Line 890:  'data': {'volumeName': 'str', 'brickList': ['str'], '*replicaCount': 'int'},
I don't understand how this api change relates to json prc
Line 891:  'returns': 'RebalanceRemoveStatus'}
Line 892: 
Line 893: ##
Line 894: # @GlusterVolume.removeBrickCommit:


....................................................
File vdsm_api/vdsmapi-schema.json
Line 1046: #
Line 1047: # @MIXED:  The device consists of a mix of iSCSI and FibreChannel paths
Line 1048: #
Line 1049: # Since: 4.10.0
Line 1050: # As in engine :UNKNOWN(0), NFS(1), FCP(2), ISCSI(3), LOCALFS(4), POSIXFS(6), GLUSTERFS(7), GLANCE(8), ALL(-1)
keep the line limit .. is it pass the scheme parser?
Line 1051: ##
Line 1052: {'enum': 'BlockDeviceType', 'data': ['iSCSI', 'FCP', 'MIXED']}
Line 1053: 
Line 1054: ##


-- 
To view, visit http://gerrit.ovirt.org/19497
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If828355b7efe28fe6a2e784069425fefd2f3f25c
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list