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-devel

[Xen-devel] [PATCH] Add dump entry point to Xend via HTTP

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Add dump entry point to Xend via HTTP
From: Daniel Veillard <veillard@xxxxxxxxxx>
Date: Tue, 21 Nov 2006 12:28:09 -0500
Delivery-date: Tue, 21 Nov 2006 09:28:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: veillard@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
  The legacy HTTP entry point for Xend remote access didn't hook the 
dump operation for a domain, this patch adds it,

Daniel

Signed-off-by: Daniel Veillard <veillard@xxxxxxxxxx>

--------------------------------------------------------------
diff -r c677f4e75608 tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Thu Nov 16 11:11:17 2006 +0000
+++ b/tools/python/xen/xend/server/SrvDomain.py Tue Nov 21 17:49:17 2006 +0100
@@ -81,6 +81,18 @@ class SrvDomain(SrvDir):
 
     def do_save(self, _, req):
         return self.xd.domain_save(self.dom.domid, req.args['file'][0])
+
+    def op_dump(self, op, req):
+        self.acceptCommand(req)
+        return req.threadRequest(self.do_dump, op, req)
+
+    def do_dump(self, _, req):
+        fn = FormFn(self.xd.domain_dump,
+                   [['dom',         'int'],
+                    ['file',        'str'],
+                    ['live',        'int'],
+                    ['crash',       'int']])
+        return fn(req.args, {'dom': self.dom.domid})
 
     def op_migrate(self, op, req):
         return req.threadRequest(self.do_migrate, op, req)
--------------------------------------------------------------

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

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

<Prev in Thread] Current Thread [Next in Thread>