# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174411805 0
# Node ID 9f9d04ce1eaf37d5925cfd5fb434fe0e10bfb786
# Parent 25bb1e7d236b94976ca4f460d0ef4bb40ae7c04a
Make xm debug-keys talk XenAPI; Add send_debug_keys to host
Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 8 +++++++-
tools/python/xen/xm/main.py | 10 +++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff -r 25bb1e7d236b -r 9f9d04ce1eaf tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Tue Mar 20 17:26:05 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py Tue Mar 20 17:30:05 2007 +0000
@@ -665,7 +665,8 @@ class XendAPI(object):
('add_to_other_config', None),
('remove_from_other_config', None),
('dmesg', 'String'),
- ('get_log', 'String')]
+ ('get_log', 'String'),
+ ('send_debug_keys', None)]
host_funcs = [('get_by_name_label', 'Set(host)')]
@@ -751,6 +752,11 @@ class XendAPI(object):
log_file = open(XendLogging.getLogFilename())
log_buffer = log_file.read()
return xen_api_success(log_buffer)
+
+ def host_send_debug_keys(self, _, host_ref, keys):
+ node = XendNode.instance()
+ node.send_debug_keys(keys)
+ return xen_api_success_void()
def host_get_record(self, session, host_ref):
node = XendNode.instance()
diff -r 25bb1e7d236b -r 9f9d04ce1eaf tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Tue Mar 20 17:26:05 2007 +0000
+++ b/tools/python/xen/xm/main.py Tue Mar 20 17:30:05 2007 +0000
@@ -1549,7 +1549,15 @@ def xm_trigger(args):
def xm_debug_keys(args):
arg_check(args, "debug-keys", 1)
- server.xend.node.send_debug_keys(str(args[0]))
+
+ keys = str(args[0])
+
+ if serverType == SERVER_XEN_API:
+ server.xenapi.host.send_debug_keys(
+ server.xenapi.session.get_this_host(),
+ keys)
+ else:
+ server.xend.node.send_debug_keys(keys)
def xm_top(args):
arg_check(args, "top", 0)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|