Updates to the python module, from migs paraz
[freeradius.git] / src / modules / rlm_python / radiusd_test.py
1 #
2 # Python module test
3 # Miguel A.L. Paraz <mparaz@mparaz.com>
4
5 import radiusd
6
7 def instantiate(p):
8   print "*** instantiate ***"
9   print p
10
11 def authorize(p):
12   print "*** authorize ***"
13   print
14   radiusd.radlog(radiusd.L_INFO, '*** radlog call in authorize ***')
15   print
16   print p 
17   return radiusd.RLM_MODULE_OK
18
19 def preacct(p):
20   print "*** preacct ***"
21   print p 
22   return radiusd.RLM_MODULE_OK
23
24 def accounting(p):
25   print "*** accounting ***"
26   radiusd.radlog(radiusd.L_INFO, '*** radlog call in accounting (0) ***')
27   print
28   print p 
29   return radiusd.RLM_MODULE_OK
30
31
32 def detach():
33   print "*** goodbye from radiusd_test.py ***"
34   return radiusd.RLM_MODULE_OK
35