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] Make xm trigger talk XenAPI; add send_tri

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make xm trigger talk XenAPI; add send_trigger to VM class.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 13:30:22 -0700
Delivery-date: Tue, 20 Mar 2007 13:30:41 -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 1174411852 0
# Node ID ee06d8b5712f7fd35f572f3182da160f915d691b
# Parent  9f9d04ce1eaf37d5925cfd5fb434fe0e10bfb786
Make xm trigger talk XenAPI; add send_trigger to VM class.

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

diff -r 9f9d04ce1eaf -r ee06d8b5712f tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue Mar 20 17:30:05 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Tue Mar 20 17:30:52 2007 +0000
@@ -1087,7 +1087,8 @@ class XendAPI(object):
                   ('add_to_platform', None),
                   ('remove_from_platform', None),
                   ('add_to_other_config', None),
-                  ('remove_from_other_config', None)]
+                  ('remove_from_other_config', None),
+                  ('send_trigger', None)]
     
     VM_funcs  = [('create', 'VM'),
                  ('get_by_name_label', 'Set(VM)')]
@@ -1534,6 +1535,13 @@ class XendAPI(object):
         return xen_api_success_void()
 
 
+    def VM_send_trigger(self, _, vm_ref, trigger, vcpu):
+        xendom = XendDomain.instance()
+        xeninfo = xendom.get_vm_by_uuid(vm_ref)
+        xendom.domain_send_trigger(xeninfo.getDomid(), trigger, vcpu)
+        return xen_api_success_void()
+        
+
     # Xen API: Class VM_metrics
     # ----------------------------------------------------------------
 
diff -r 9f9d04ce1eaf -r ee06d8b5712f tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Mar 20 17:30:05 2007 +0000
+++ b/tools/python/xen/xm/main.py       Tue Mar 20 17:30:52 2007 +0000
@@ -1544,8 +1544,11 @@ def xm_trigger(args):
     trigger = args[1]
     if len(args) == 3:
         vcpu = int(args[2])
-    
-    server.xend.domain.send_trigger(dom, trigger, vcpu)
+        
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.send_trigger(get_single_vm(dom), trigger, vcpu)
+    else:
+        server.xend.domain.send_trigger(dom, trigger, vcpu)
 
 def xm_debug_keys(args):
     arg_check(args, "debug-keys", 1)

_______________________________________________
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] Make xm trigger talk XenAPI; add send_trigger to VM class., Xen patchbot-unstable <=