]> xenbits.xensource.com Git - xen.git/commitdiff
Added docs and bindings for VM.{send_trigger,send_sysrq}.
authorEwan Mellor <ewan@xensource.com>
Tue, 10 Apr 2007 16:29:16 +0000 (17:29 +0100)
committerEwan Mellor <ewan@xensource.com>
Tue, 10 Apr 2007 16:29:16 +0000 (17:29 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_vm.h
tools/libxen/src/xen_vm.c

index b2784e234cc0a78f9f0559f9b694a37a79e6372e..d152bcc46951128f7d10eb9c8873b78ef618368e 100644 (file)
@@ -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:} 
index 4b338088df18764542e42d0926ecf1abde2b8768..0f5c440c16dd31f3178fa122caa65de948f740f6 100644 (file)
@@ -837,6 +837,23 @@ extern bool
 xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu);
 
 
+/**
+ * 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.
  */
index c0ac17c9d5b6e8976a385a595cd7c422a716cb23..5f5aa72b9ae37a75de6c951e2a8cf37514d915a3 100644 (file)
@@ -1609,6 +1609,38 @@ xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu)
 }
 
 
+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)
 {