[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Add support for VM.destroy RPC in libxen.



# HG changeset patch
# User jfehlig@xxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 4e3ddf1288fb2c5a434947a0366490944c9ea399
# Parent  b86fe3d23f05f88e971a5d2ffd8aae0b60ece925
Add support for VM.destroy RPC in libxen.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
---
 tools/libxen/include/xen_vm.h |    8 ++++++++
 tools/libxen/src/xen_vm.c     |   14 ++++++++++++++
 2 files changed, 22 insertions(+)

diff -r b86fe3d23f05 -r 4e3ddf1288fb tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h     Wed Nov 08 13:22:08 2006 +0000
+++ b/tools/libxen/include/xen_vm.h     Tue Nov 07 18:14:16 2006 -0700
@@ -799,4 +799,12 @@ xen_vm_get_all(xen_session *session, str
 xen_vm_get_all(xen_session *session, struct xen_vm_set **result);
 
 
+/**
+ * Destroy the specified VM.  The VM is completely removed from the system.
+ * This function can only be called when the VM is in the Halted State.
+ */
+extern bool
+xen_vm_destroy(xen_session *session, xen_vm vm);
+
+
 #endif
diff -r b86fe3d23f05 -r 4e3ddf1288fb tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Wed Nov 08 13:22:08 2006 +0000
+++ b/tools/libxen/src/xen_vm.c Tue Nov 07 18:14:16 2006 -0700
@@ -1580,3 +1580,17 @@ xen_vm_get_uuid(xen_session *session, ch
     *result = session->ok ? xen_strdup_((char *)vm) : NULL;
     return session->ok;
 }
+
+
+bool
+xen_vm_destroy(xen_session *session, xen_vm vm)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm }
+        };
+
+    xen_call_(session, "VM.destroy", param_values, 1, NULL, NULL);
+    return session->ok;
+}

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.