ia64/xen-unstable

changeset 14489:9f9d04ce1eaf

Make xm debug-keys talk XenAPI; Add send_debug_keys to host

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Mar 20 17:30:05 2007 +0000 (2007-03-20)
parents 25bb1e7d236b
children ee06d8b5712f
files tools/python/xen/xend/XendAPI.py tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Tue Mar 20 17:26:05 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Tue Mar 20 17:30:05 2007 +0000
     1.3 @@ -665,7 +665,8 @@ class XendAPI(object):
     1.4                      ('add_to_other_config', None),
     1.5                      ('remove_from_other_config', None),
     1.6                      ('dmesg', 'String'),
     1.7 -                    ('get_log', 'String')]
     1.8 +                    ('get_log', 'String'),
     1.9 +                    ('send_debug_keys', None)]
    1.10      
    1.11      host_funcs = [('get_by_name_label', 'Set(host)')]
    1.12  
    1.13 @@ -752,6 +753,11 @@ class XendAPI(object):
    1.14          log_buffer = log_file.read()
    1.15          return xen_api_success(log_buffer)
    1.16  
    1.17 +    def host_send_debug_keys(self, _, host_ref, keys):
    1.18 +        node = XendNode.instance()
    1.19 +        node.send_debug_keys(keys)
    1.20 +        return xen_api_success_void()
    1.21 +
    1.22      def host_get_record(self, session, host_ref):
    1.23          node = XendNode.instance()
    1.24          dom = XendDomain.instance()
     2.1 --- a/tools/python/xen/xm/main.py	Tue Mar 20 17:26:05 2007 +0000
     2.2 +++ b/tools/python/xen/xm/main.py	Tue Mar 20 17:30:05 2007 +0000
     2.3 @@ -1549,7 +1549,15 @@ def xm_trigger(args):
     2.4  
     2.5  def xm_debug_keys(args):
     2.6      arg_check(args, "debug-keys", 1)
     2.7 -    server.xend.node.send_debug_keys(str(args[0]))
     2.8 +
     2.9 +    keys = str(args[0])
    2.10 +    
    2.11 +    if serverType == SERVER_XEN_API:
    2.12 +        server.xenapi.host.send_debug_keys(
    2.13 +            server.xenapi.session.get_this_host(),
    2.14 +            keys)
    2.15 +    else:
    2.16 +        server.xend.node.send_debug_keys(keys)
    2.17  
    2.18  def xm_top(args):
    2.19      arg_check(args, "top", 0)