ia64/xen-unstable

changeset 14544:e3e7c59cdba1

Added C bindings and docs for recent addition VM.set_VCPUs_number_live.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sun Mar 25 22:17:30 2007 +0100 (2007-03-25)
parents b37006439a53
children af07c7b01893
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_vm.h tools/libxen/src/xen_vm.c
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Sun Mar 25 16:47:18 2007 +0100
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Sun Mar 25 22:17:30 2007 +0100
     1.3 @@ -1434,6 +1434,41 @@ void
     1.4  \noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
     1.5  
     1.6  \vspace{0.6cm}
     1.7 +\subsubsection{RPC name:~set\_VCPUs\_number\_live}
     1.8 +
     1.9 +{\bf Overview:} 
    1.10 +Set this VM's VCPUs/at\_startup value, and set the same value on the VM, if
    1.11 +running.
    1.12 +
    1.13 + \noindent {\bf Signature:} 
    1.14 +\begin{verbatim} void set_VCPUs_number_live (session_id s, VM ref self, int nvcpu)\end{verbatim}
    1.15 +
    1.16 +
    1.17 +\noindent{\bf Arguments:}
    1.18 +
    1.19 + 
    1.20 +\vspace{0.3cm}
    1.21 +\begin{tabular}{|c|c|p{7cm}|}
    1.22 + \hline
    1.23 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.24 +{\tt VM ref } & self & The VM \\ \hline 
    1.25 +
    1.26 +{\tt int } & nvcpu & The number of VCPUs \\ \hline 
    1.27 +
    1.28 +\end{tabular}
    1.29 +
    1.30 +\vspace{0.3cm}
    1.31 +
    1.32 + \noindent {\bf Return Type:} 
    1.33 +{\tt 
    1.34 +void
    1.35 +}
    1.36 +
    1.37 +
    1.38 +
    1.39 +\vspace{0.3cm}
    1.40 +\vspace{0.3cm}
    1.41 +\vspace{0.3cm}
    1.42  \subsubsection{RPC name:~get\_all}
    1.43  
    1.44  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_vm.h	Sun Mar 25 16:47:18 2007 +0100
     2.2 +++ b/tools/libxen/include/xen_vm.h	Sun Mar 25 22:17:30 2007 +0100
     2.3 @@ -830,6 +830,14 @@ xen_vm_resume(xen_session *session, xen_
     2.4  
     2.5  
     2.6  /**
     2.7 + * Set this VM's VCPUs/at_startup value, and set the same value on the
     2.8 + * VM, if running
     2.9 + */
    2.10 +extern bool
    2.11 +xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu);
    2.12 +
    2.13 +
    2.14 +/**
    2.15   * Return a list of all the VMs known to the system.
    2.16   */
    2.17  extern bool
     3.1 --- a/tools/libxen/src/xen_vm.c	Sun Mar 25 16:47:18 2007 +0100
     3.2 +++ b/tools/libxen/src/xen_vm.c	Sun Mar 25 22:17:30 2007 +0100
     3.3 @@ -1594,6 +1594,22 @@ xen_vm_resume(xen_session *session, xen_
     3.4  
     3.5  
     3.6  bool
     3.7 +xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu)
     3.8 +{
     3.9 +    abstract_value param_values[] =
    3.10 +        {
    3.11 +            { .type = &abstract_type_string,
    3.12 +              .u.string_val = self },
    3.13 +            { .type = &abstract_type_int,
    3.14 +              .u.int_val = nvcpu }
    3.15 +        };
    3.16 +
    3.17 +    xen_call_(session, "VM.set_VCPUs_number_live", param_values, 2, NULL, NULL);
    3.18 +    return session->ok;
    3.19 +}
    3.20 +
    3.21 +
    3.22 +bool
    3.23  xen_vm_get_all(xen_session *session, struct xen_vm_set **result)
    3.24  {
    3.25