debuggers.hg

view tools/python/xen/xend/server/SrvDmesg.py @ 4672:d781b9d08e80

bitkeeper revision 1.1327.2.4 (426918a34Af7gihN8mTkq-P3KrAZXg)

Remove twisted from save/migrate handling.
This needs to use threads, so add thread support for
http server requests.

Signed-off-by: Mike Wray <mike.wray@hp.com>
author mjw@wray-m-3.hpl.hp.com
date Fri Apr 22 15:30:43 2005 +0000 (2005-04-22)
parents 0a4b76b6b5a0
children 369e382b2f81
line source
1 # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
3 import os
5 from xen.xend import sxp
6 from xen.xend import XendDmesg
8 from SrvDir import SrvDir
10 class SrvDmesg(SrvDir):
11 """Xen Dmesg output.
12 """
14 def __init__(self):
15 SrvDir.__init__(self)
16 self.xd = XendDmesg.instance()
18 def render_POST(self, req):
19 self.perform(req)
21 def render_GET(self, req):
22 if self.use_sxp(req):
23 req.setHeader("Content-Type", "text/plain")
24 req.write(self.info())
25 else:
26 req.write('<html><head></head><body>')
27 self.print_path(req)
28 req.write('<pre>')
29 req.write(self.info())
30 req.write('</pre></body></html>')
32 def info(self):
33 return self.xd.info()
35 def op_clear(self, op, req):
36 self.xd.clear()
37 return 0