WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Added a new Xen-API call VM.send_sysrq, a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Added a new Xen-API call VM.send_sysrq, and use that to implement xm sysrq
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Mar 2007 21:50:17 -0700
Delivery-date: Thu, 15 Mar 2007 21:49:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1173995974 0
# Node ID edccebeea4a3e75fb5b536c294c821cbd5435c08
# Parent  1c94d9fcb7efcf2899363f9486aa2657123fc85d
Added a new Xen-API call VM.send_sysrq, and use that to implement xm sysrq
through Xen-API.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |    7 +++++++
 tools/python/xen/xm/main.py      |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff -r 1c94d9fcb7ef -r edccebeea4a3 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Thu Mar 15 21:44:20 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Thu Mar 15 21:59:34 2007 +0000
@@ -1070,6 +1070,7 @@ class XendAPI(object):
                   ('hard_reboot', None),
                   ('suspend', None),
                   ('resume', None),
+                  ('send_sysrq', None),
                   ('add_to_HVM_boot_params', None),
                   ('remove_from_HVM_boot_params', None),
                   ('add_to_VCPUs_params', None),
@@ -1513,6 +1514,12 @@ class XendAPI(object):
         return XendTask.log_progress(0, 100, do_vm_func,
                                      "domain_unpause", vm_ref)
 
+    def VM_send_sysrq(self, _, vm_ref, req):
+        xendom = XendDomain.instance()
+        xeninfo = xendom.get_vm_by_uuid(vm_ref)
+        xeninfo.send_sysrq(req)
+        return xen_api_success_void()
+
     # Xen API: Class VM_metrics
     # ----------------------------------------------------------------
 
diff -r 1c94d9fcb7ef -r edccebeea4a3 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Mar 15 21:44:20 2007 +0000
+++ b/tools/python/xen/xm/main.py       Thu Mar 15 21:59:34 2007 +0000
@@ -1466,7 +1466,10 @@ def xm_sysrq(args):
     arg_check(args, "sysrq", 2)
     dom = args[0]
     req = args[1]
-    server.xend.domain.send_sysrq(dom, req)    
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.send_sysrq(get_single_vm(dom), req)
+    else:
+        server.xend.domain.send_sysrq(dom, req)
 
 def xm_trigger(args):
     vcpu = 0

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Added a new Xen-API call VM.send_sysrq, and use that to implement xm sysrq, Xen patchbot-unstable <=