def __createRasMsg(self,action,user_id,mac,ip): ras_msg=RasMsg(None,None,self) ras_msg["user_id"],ras_msg["mac"],ras_msg["remote_ip"]=user_id,mac,ip ras_msg["unique_id"]="mac" ras_msg["persistent_lan"]=True ras_msg.setAction(action) return ras_msg
def _callWithRasMsg(self, method, request, reply): """ call "method" with ras_msg as argument ras_msg is created by "request" , "reply" """ ras_msg = RasMsg(request, reply, self) apply(method, [ras_msg]) if ras_msg.getAction(): return (ras_msg, ras_msg.send())
def _callWithRasMsg(self,method,request,reply): """ call "method" with ras_msg as argument ras_msg is created by "request" , "reply" """ ras_msg=RasMsg(request,reply,self) apply(method,[ras_msg]) if ras_msg.getAction(): return (ras_msg,ras_msg.send())
def __createRasMsg(self, action, user_id, mac, ip): ras_msg = RasMsg(None, None, self) ras_msg["user_id"], ras_msg["mac"], ras_msg[ "remote_ip"] = user_id, mac, ip ras_msg["mac_ip"] = "%s_%s" % (mac, ip) ras_msg["unique_id"] = "mac_ip" ras_msg["persistent_lan"] = True ras_msg["start_accounting"] = True ras_msg["ip_assignment"] = False ras_msg.setAction(action) return ras_msg
def __createForceLogoutRasMsg(self, user_obj, instance): instance_info = user_obj.getInstanceInfo(instance) ras_msg = RasMsg( None, None, ras_main.getLoader().getRasByID(instance_info["ras_id"])) return ras_msg