in src/tashi/rpycservices/rpycservices.py [0:0]
def _rpyc_getattr(self, name):
"""Returns the RPC corresponding to the function call"""
def makeCall(args):
args = cPickle.loads(args)
if self._conn._config['credentials'] != None:
try:
self.checkValidUser(makeCall._name, self._conn._config['credentials'], args)
except Exception, e:
e = cPickle.dumps(clean(e))
return e
try:
res = getattr(self.service, makeCall._name)(*args)
except Exception, e:
res = e
res = cPickle.dumps(clean(res))
return res
makeCall._name = name
if self._type == 'ClusterManagerService' and name in clusterManagerRPCs:
return makeCall
if self._type == 'NodeManagerService' and name in nodeManagerRPCs:
return makeCall
if self._type == 'AccountingService' and name in accountingRPCs:
return makeCall
raise AttributeError('RPC does not exist')