ia64/xen-unstable

changeset 1746:2b564fc2af6f

bitkeeper revision 1.1065 (40f2aec3dYgiVPACkpEwvEqCM-8iFg)

Change dmesg path.
author mwilli2@equilibrium.research.intel-research.net
date Mon Jul 12 15:31:15 2004 +0000 (2004-07-12)
parents cda0735bdc4c
children cd887a8fa08a
files tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDmesg.py tools/python/xen/xend/server/SrvNode.py tools/python/xen/xend/server/SrvRoot.py
line diff
     1.1 --- a/tools/python/xen/xend/XendClient.py	Mon Jul 12 12:58:48 2004 +0000
     1.2 +++ b/tools/python/xen/xend/XendClient.py	Mon Jul 12 15:31:15 2004 +0000
     1.3 @@ -90,7 +90,7 @@ def eventurl(location, root, id=''):
     1.4      return urljoin(location, root, 'event/', id)
     1.5  
     1.6  def dmesgurl(location, root, id=''):
     1.7 -    return urljoin(location, root, 'dmesg/', id)
     1.8 +    return urljoin(location, root, 'node/dmesg/', id)
     1.9  
    1.10  def xend_request(url, method, data=None):
    1.11      """Make a request to xend.
     2.1 --- a/tools/python/xen/xend/XendDmesg.py	Mon Jul 12 12:58:48 2004 +0000
     2.2 +++ b/tools/python/xen/xend/XendDmesg.py	Mon Jul 12 15:31:15 2004 +0000
     2.3 @@ -1,6 +1,6 @@
     2.4  # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
     2.5  
     2.6 -"""Get dmesg output for this node.  Very basic right now!
     2.7 +"""Get dmesg output for this node.
     2.8  """
     2.9  
    2.10  import os
     3.1 --- a/tools/python/xen/xend/server/SrvNode.py	Mon Jul 12 12:58:48 2004 +0000
     3.2 +++ b/tools/python/xen/xend/server/SrvNode.py	Mon Jul 12 15:31:15 2004 +0000
     3.3 @@ -13,6 +13,7 @@ class SrvNode(SrvDir):
     3.4      def __init__(self):
     3.5          SrvDir.__init__(self)
     3.6          self.xn = XendNode.instance()
     3.7 +        self.add('dmesg', 'SrvDmesg')
     3.8  
     3.9      def op_shutdown(self, op, req):
    3.10          val = self.xn.shutdown()
    3.11 @@ -48,11 +49,15 @@ class SrvNode(SrvDir):
    3.12              req.setHeader("Content-Type", sxp.mime_type)
    3.13              sxp.show(['node'] + self.info(), out=req)
    3.14          else:
    3.15 +            url = req.prePathURL()
    3.16 +            if not url.endswith('/'):
    3.17 +                url += '/'
    3.18              req.write('<html><head></head><body>')
    3.19              self.print_path(req)
    3.20              req.write('<ul>')
    3.21              for d in self.info():
    3.22                  req.write('<li> %10s: %s' % (d[0], str(d[1])))
    3.23 +            req.write('<li><a href="' +url + 'dmesg">Xen dmesg output</a>')
    3.24              req.write('</ul>')
    3.25              req.write('</body></html>')
    3.26          return ''
     4.1 --- a/tools/python/xen/xend/server/SrvRoot.py	Mon Jul 12 12:58:48 2004 +0000
     4.2 +++ b/tools/python/xen/xend/server/SrvRoot.py	Mon Jul 12 15:31:15 2004 +0000
     4.3 @@ -15,7 +15,6 @@ class SrvRoot(SrvDir):
     4.4      subdirs = [
     4.5          ('node',    'SrvNode'       ),
     4.6          ('domain',  'SrvDomainDir'  ),
     4.7 -        ('dmesg',   'SrvDmesg'      ),
     4.8          ('console', 'SrvConsoleDir' ),
     4.9          ('event',   'SrvEventDir'   ),
    4.10          ('device',  'SrvDeviceDir'  ),