]>
git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - www/rpc.py
4 import simplejson
as json
6 from rpc_functions
import *
8 form
= cgi
.FieldStorage()
9 method
= form
.getfirst("method")
10 id = form
.getfirst("id")
13 param_string
= form
.getfirst("params")
15 params
= json
.loads(param_string
)
17 methods
= { "cluster_get_info" : cluster_get_info
,
18 "uriel_send_info" : uriel_send_info
, }
20 if method
and methods
.has_key(method
):
21 print json
.dumps({ "version": "1.1",
23 "result" : methods
[method
](params
),
25 sort_keys
=True, indent
=4)