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 docs and bindings for VM.{send_trig

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Added docs and bindings for VM.{send_trigger, send_sysrq}.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Apr 2007 14:00:53 -0700
Delivery-date: Tue, 10 Apr 2007 14:00:57 -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 1176222556 -3600
# Node ID e8caf7802f3feede444dcf33a4cc1629dd359249
# Parent  dbeabe1d225c59b688e30d6871cf901796220c41
Added docs and bindings for VM.{send_trigger,send_sysrq}.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex |   75 ++++++++++++++++++++++++++++++++++++++
 tools/libxen/include/xen_vm.h     |   17 ++++++++
 tools/libxen/src/xen_vm.c         |   32 ++++++++++++++++
 3 files changed, 124 insertions(+)

diff -r dbeabe1d225c -r e8caf7802f3f docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Tue Apr 10 17:26:45 2007 +0100
+++ b/docs/xen-api/xenapi-datamodel.tex Tue Apr 10 17:29:16 2007 +0100
@@ -1558,6 +1558,81 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~send\_sysrq}
+
+{\bf Overview:} 
+Send the given key as a sysrq to this VM.  The key is specified as a single
+character (a String of length 1).  This can only be called when the
+specified VM is in the Running state.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void send_sysrq (session_id s, VM ref vm, string 
key)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & vm & The VM \\ \hline 
+
+{\tt string } & key & The key to send \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+
+\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
+
+\vspace{0.6cm}
+\subsubsection{RPC name:~send\_trigger}
+
+{\bf Overview:} 
+Send the named trigger to this VM.  This can only be called when the
+specified VM is in the Running state.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void send_trigger (session_id s, VM ref vm, string 
trigger)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & vm & The VM \\ \hline 
+
+{\tt string } & trigger & The trigger to send \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+
+\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
+
+\vspace{0.6cm}
 \subsubsection{RPC name:~get\_all}
 
 {\bf Overview:} 
diff -r dbeabe1d225c -r e8caf7802f3f tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h     Tue Apr 10 17:26:45 2007 +0100
+++ b/tools/libxen/include/xen_vm.h     Tue Apr 10 17:29:16 2007 +0100
@@ -838,6 +838,23 @@ xen_vm_set_vcpus_number_live(xen_session
 
 
 /**
+ * Send the given key as a sysrq to this VM.  The key is specified as a
+ * single character (a String of length 1).  This can only be called when the
+ * specified VM is in the Running state.
+ */
+extern bool
+xen_vm_send_sysrq(xen_session *session, xen_vm vm, char *key);
+
+
+/**
+ * Send the named trigger to this VM.  This can only be called when the
+ * specified VM is in the Running state.
+ */
+extern bool
+xen_vm_send_trigger(xen_session *session, xen_vm vm, char *trigger);
+
+
+/**
  * Return a list of all the VMs known to the system.
  */
 extern bool
diff -r dbeabe1d225c -r e8caf7802f3f tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Tue Apr 10 17:26:45 2007 +0100
+++ b/tools/libxen/src/xen_vm.c Tue Apr 10 17:29:16 2007 +0100
@@ -1610,6 +1610,38 @@ xen_vm_set_vcpus_number_live(xen_session
 
 
 bool
+xen_vm_send_sysrq(xen_session *session, xen_vm vm, char *key)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &abstract_type_string,
+              .u.string_val = key }
+        };
+
+    xen_call_(session, "VM.send_sysrq", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
+xen_vm_send_trigger(xen_session *session, xen_vm vm, char *trigger)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &abstract_type_string,
+              .u.string_val = trigger }
+        };
+
+    xen_call_(session, "VM.send_trigger", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vm_get_all(xen_session *session, struct xen_vm_set **result)
 {
 

_______________________________________________
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 docs and bindings for VM.{send_trigger, send_sysrq}., Xen patchbot-unstable <=