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] xend: implement VM_hard_reboot of XenAPI.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: implement VM_hard_reboot of XenAPI.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 05 Jun 2008 05:40:08 -0700
Delivery-date: Thu, 05 Jun 2008 05:40:12 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1212482021 -3600
# Node ID 420db89188caafa5ee453407dce010a901abc2b8
# Parent  5c38568d90df668ce91649bbe2bf2105b27a949b
xend: implement VM_hard_reboot of XenAPI.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |    6 ++++--
 tools/python/xen/xm/main.py      |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff -r 5c38568d90df -r 420db89188ca tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue Jun 03 09:32:50 2008 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Tue Jun 03 09:33:41 2008 +0100
@@ -1707,11 +1707,13 @@ class XendAPI(object):
                                      "domain_delete", vm_ref)
     
     def VM_hard_reboot(self, session, vm_ref):
-        return xen_api_error(XEND_ERROR_UNSUPPORTED)
+        return XendTask.log_progress(0, 100, do_vm_func,
+                                     "domain_reset", vm_ref)
     
     def VM_hard_shutdown(self, session, vm_ref):
         return XendTask.log_progress(0, 100, do_vm_func,
-                                     "domain_destroy", vm_ref)    
+                                     "domain_destroy", vm_ref)
+    
     def VM_pause(self, session, vm_ref):
         return XendTask.log_progress(0, 100, do_vm_func,
                                      "domain_pause", vm_ref)
diff -r 5c38568d90df -r 420db89188ca tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Jun 03 09:32:50 2008 +0100
+++ b/tools/python/xen/xm/main.py       Tue Jun 03 09:33:41 2008 +0100
@@ -1257,8 +1257,10 @@ def xm_reset(args):
     arg_check(args, "reset", 1)
     dom = args[0]
 
-    # TODO: XenAPI
-    server.xend.domain.reset(dom)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.hard_reboot(get_single_vm(dom))
+    else:
+        server.xend.domain.reset(dom)
 
 def xm_pause(args):
     arg_check(args, "pause", 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] xend: implement VM_hard_reboot of XenAPI., Xen patchbot-unstable <=