def WriteVolumeInfo(self, volume): path = volume.parameters[0] req = msg.WriteVolume_Request() msgvolume = msg.Volume() obj2msg(volume, msgvolume) req.volume = msgvolume.SerializeToString() req.fullpath = '/'+path ret = self.stub.callMethod('WriteVolume', req)
def AssembleChunk(self, volume): stub = self.getStub() req = msg.AssembleVolume_Request() obj2msg(volume, req.volume) target = stub.callMethod('AssembleVolume', req) return target