예제 #1
0
파일: plan.py 프로젝트: moxwose/freeIBS
    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
예제 #2
0
 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())
예제 #3
0
파일: ras.py 프로젝트: moxwose/freeIBS
    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())
예제 #4
0
파일: plan.py 프로젝트: sankopay/IBSng
 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
예제 #5
0
 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