def ReadVolumeInfo(self, volume_name): req = msg.ReadVolume_Request() req.fullpath = '/'+volume_name ret = self.stub.callMethod('ReadVolume', req) volume = msg.Volume() volume.ParseFromString(ret.volume) return msg2obj(volume)
def GetChunkServers(self, count=None): arg = msg.GetChunkServers_Request() if count: arg.randomCount = count ret = self.stub.callMethod('GetChunkServers', arg) serverlist=[msg2obj(x) for x in ret.random] return serverlist