ia64/xen-unstable

changeset 14816:46a592e2b7ea

Add documentation and C bindings for VM.add_to_VCPUs_params_live,
VM.set_memory_dynamic_{min,max}_live.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Apr 11 22:24:30 2007 +0100 (2007-04-11)
parents f3f4f4ca6f61
children 27eaa7fe92d2
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	Wed Apr 11 21:55:05 2007 +0100
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Wed Apr 11 22:24:30 2007 +0100
     1.3 @@ -1558,6 +1558,111 @@ void
     1.4  \vspace{0.3cm}
     1.5  \vspace{0.3cm}
     1.6  \vspace{0.3cm}
     1.7 +\subsubsection{RPC name:~add\_to\_VCPUs\_params\_live}
     1.8 +
     1.9 +{\bf Overview:} 
    1.10 +Add the given key-value pair to VM.VCPUs\_params, and apply that value on
    1.11 +the running VM.
    1.12 +
    1.13 + \noindent {\bf Signature:} 
    1.14 +\begin{verbatim} void add_to_VCPUs_params_live (session_id s, VM ref self, string key, string value)\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 string } & key & The key \\ \hline 
    1.27 +
    1.28 +{\tt string } & value & The value \\ \hline 
    1.29 +
    1.30 +\end{tabular}
    1.31 +
    1.32 +\vspace{0.3cm}
    1.33 +
    1.34 + \noindent {\bf Return Type:} 
    1.35 +{\tt 
    1.36 +void
    1.37 +}
    1.38 +
    1.39 +
    1.40 +
    1.41 +\vspace{0.3cm}
    1.42 +\vspace{0.3cm}
    1.43 +\vspace{0.3cm}
    1.44 +\subsubsection{RPC name:~set\_memory\_dynamic\_max\_live}
    1.45 +
    1.46 +{\bf Overview:} 
    1.47 +Set memory\_dynamic\_max in database and on running VM.
    1.48 +
    1.49 + \noindent {\bf Signature:} 
    1.50 +\begin{verbatim} void set_memory_dynamic_max_live (session_id s, VM ref self, int max)\end{verbatim}
    1.51 +
    1.52 +
    1.53 +\noindent{\bf Arguments:}
    1.54 +
    1.55 + 
    1.56 +\vspace{0.3cm}
    1.57 +\begin{tabular}{|c|c|p{7cm}|}
    1.58 + \hline
    1.59 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.60 +{\tt VM ref } & self & The VM \\ \hline 
    1.61 +
    1.62 +{\tt int } & max & The memory\_dynamic\_max value \\ \hline 
    1.63 +
    1.64 +\end{tabular}
    1.65 +
    1.66 +\vspace{0.3cm}
    1.67 +
    1.68 + \noindent {\bf Return Type:} 
    1.69 +{\tt 
    1.70 +void
    1.71 +}
    1.72 +
    1.73 +
    1.74 +
    1.75 +\vspace{0.3cm}
    1.76 +\vspace{0.3cm}
    1.77 +\vspace{0.3cm}
    1.78 +\subsubsection{RPC name:~set\_memory\_dynamic\_min\_live}
    1.79 +
    1.80 +{\bf Overview:} 
    1.81 +Set memory\_dynamic\_min in database and on running VM.
    1.82 +
    1.83 + \noindent {\bf Signature:} 
    1.84 +\begin{verbatim} void set_memory_dynamic_min_live (session_id s, VM ref self, int min)\end{verbatim}
    1.85 +
    1.86 +
    1.87 +\noindent{\bf Arguments:}
    1.88 +
    1.89 + 
    1.90 +\vspace{0.3cm}
    1.91 +\begin{tabular}{|c|c|p{7cm}|}
    1.92 + \hline
    1.93 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.94 +{\tt VM ref } & self & The VM \\ \hline 
    1.95 +
    1.96 +{\tt int } & min & The memory\_dynamic\_min value \\ \hline 
    1.97 +
    1.98 +\end{tabular}
    1.99 +
   1.100 +\vspace{0.3cm}
   1.101 +
   1.102 + \noindent {\bf Return Type:} 
   1.103 +{\tt 
   1.104 +void
   1.105 +}
   1.106 +
   1.107 +
   1.108 +
   1.109 +\vspace{0.3cm}
   1.110 +\vspace{0.3cm}
   1.111 +\vspace{0.3cm}
   1.112  \subsubsection{RPC name:~send\_sysrq}
   1.113  
   1.114  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_vm.h	Wed Apr 11 21:55:05 2007 +0100
     2.2 +++ b/tools/libxen/include/xen_vm.h	Wed Apr 11 22:24:30 2007 +0100
     2.3 @@ -838,6 +838,28 @@ xen_vm_set_vcpus_number_live(xen_session
     2.4  
     2.5  
     2.6  /**
     2.7 + * Add the given key-value pair to VM.VCPUs_params, and apply that
     2.8 + * value on the running VM.
     2.9 + */
    2.10 +extern bool
    2.11 +xen_vm_add_to_vcpus_params_live(xen_session *session, xen_vm self, char *key, char *value);
    2.12 +
    2.13 +
    2.14 +/**
    2.15 + * Set memory_dynamic_max in database and on running VM.
    2.16 + */
    2.17 +extern bool
    2.18 +xen_vm_set_memory_dynamic_max_live(xen_session *session, xen_vm self, int64_t max);
    2.19 +
    2.20 +
    2.21 +/**
    2.22 + * Set memory_dynamic_min in database and on running VM.
    2.23 + */
    2.24 +extern bool
    2.25 +xen_vm_set_memory_dynamic_min_live(xen_session *session, xen_vm self, int64_t min);
    2.26 +
    2.27 +
    2.28 +/**
    2.29   * Send the given key as a sysrq to this VM.  The key is specified as a
    2.30   * single character (a String of length 1).  This can only be called when the
    2.31   * specified VM is in the Running state.
     3.1 --- a/tools/libxen/src/xen_vm.c	Wed Apr 11 21:55:05 2007 +0100
     3.2 +++ b/tools/libxen/src/xen_vm.c	Wed Apr 11 22:24:30 2007 +0100
     3.3 @@ -1610,6 +1610,56 @@ xen_vm_set_vcpus_number_live(xen_session
     3.4  
     3.5  
     3.6  bool
     3.7 +xen_vm_add_to_vcpus_params_live(xen_session *session, xen_vm self, char *key, char *value)
     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_string,
    3.14 +              .u.string_val = key },
    3.15 +            { .type = &abstract_type_string,
    3.16 +              .u.string_val = value }
    3.17 +        };
    3.18 +
    3.19 +    xen_call_(session, "VM.add_to_VCPUs_params_live", param_values, 3, NULL, NULL);
    3.20 +    return session->ok;
    3.21 +}
    3.22 +
    3.23 +
    3.24 +bool
    3.25 +xen_vm_set_memory_dynamic_max_live(xen_session *session, xen_vm self, int64_t max)
    3.26 +{
    3.27 +    abstract_value param_values[] =
    3.28 +        {
    3.29 +            { .type = &abstract_type_string,
    3.30 +              .u.string_val = self },
    3.31 +            { .type = &abstract_type_int,
    3.32 +              .u.int_val = max }
    3.33 +        };
    3.34 +
    3.35 +    xen_call_(session, "VM.set_memory_dynamic_max_live", param_values, 2, NULL, NULL);
    3.36 +    return session->ok;
    3.37 +}
    3.38 +
    3.39 +
    3.40 +bool
    3.41 +xen_vm_set_memory_dynamic_min_live(xen_session *session, xen_vm self, int64_t min)
    3.42 +{
    3.43 +    abstract_value param_values[] =
    3.44 +        {
    3.45 +            { .type = &abstract_type_string,
    3.46 +              .u.string_val = self },
    3.47 +            { .type = &abstract_type_int,
    3.48 +              .u.int_val = min }
    3.49 +        };
    3.50 +
    3.51 +    xen_call_(session, "VM.set_memory_dynamic_min_live", param_values, 2, NULL, NULL);
    3.52 +    return session->ok;
    3.53 +}
    3.54 +
    3.55 +
    3.56 +bool
    3.57  xen_vm_send_sysrq(xen_session *session, xen_vm vm, char *key)
    3.58  {
    3.59      abstract_value param_values[] =