user gets notified interatively or by email in case of a CIS error
[living-lab-site.git] / cis / dummy_cis.py
1 #!/usr/bin/env python
2
3 import web
4 import sys
5
6 urls = (
7     '/(.*)', 'Hello'
8 )
9
10 LOAD = sys.argv[2]
11 print 'load is %s' % LOAD
12
13 app = web.application(urls, globals())
14
15 class Hello:
16     def GET(self, name):
17         if request == 'get_load':
18             resp = {"load": LOAD}
19             web.header('Content-Type', 'application/json')
20             return json.dumps(resp)
21     
22     def POST(self, request):
23         print web.data()
24
25         return request
26
27 if __name__ == "__main__":
28     app.run()