]> xenbits.xensource.com Git - xen.git/commitdiff
Added C bindings and docs for recent addition VM.set_VCPUs_number_live.
authorEwan Mellor <ewan@xensource.com>
Sun, 25 Mar 2007 21:17:30 +0000 (22:17 +0100)
committerEwan Mellor <ewan@xensource.com>
Sun, 25 Mar 2007 21:17:30 +0000 (22:17 +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 e5d2c18400470c7ea982abb6d5aaeae9ee2a4c15..9d3a6dfde1500567e355ee44de9c084b9a10a18a 100644 (file)
@@ -1434,6 +1434,41 @@ void
 \noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
 
 \vspace{0.6cm}
+\subsubsection{RPC name:~set\_VCPUs\_number\_live}
+
+{\bf Overview:} 
+Set this VM's VCPUs/at\_startup value, and set the same value on the VM, if
+running.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_VCPUs_number_live (session_id s, VM ref self, int nvcpu)\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 } & self & The VM \\ \hline 
+
+{\tt int } & nvcpu & The number of VCPUs \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_all}
 
 {\bf Overview:} 
index ddce6a8d1dc24c712a1c2a6ab1e39420a21bacfc..4b338088df18764542e42d0926ecf1abde2b8768 100644 (file)
@@ -829,6 +829,14 @@ extern bool
 xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused);
 
 
+/**
+ * Set this VM's VCPUs/at_startup value, and set the same value on the
+ * VM, if running
+ */
+extern bool
+xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu);
+
+
 /**
  * Return a list of all the VMs known to the system.
  */
index f29d34f7eb72362d9659bcf7153b4e7a03d31c08..c0ac17c9d5b6e8976a385a595cd7c422a716cb23 100644 (file)
@@ -1593,6 +1593,22 @@ xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused)
 }
 
 
+bool
+xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = self },
+            { .type = &abstract_type_int,
+              .u.int_val = nvcpu }
+        };
+
+    xen_call_(session, "VM.set_VCPUs_number_live", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
 bool
 xen_vm_get_all(xen_session *session, struct xen_vm_set **result)
 {