ia64/xen-unstable

changeset 14787:51678fab4b0f

Added bindings and documentation for host.send_debug_keys and host.get_log.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Apr 09 11:39:27 2007 +0100 (2007-04-09)
parents d1860a7c30fd
children 3565e4883548
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_host.h tools/libxen/src/xen_host.c
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Sun Apr 08 23:03:16 2007 +0100
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Mon Apr 09 11:39:27 2007 +0100
     1.3 @@ -4951,6 +4951,72 @@ dmesg string
     1.4  \vspace{0.3cm}
     1.5  \vspace{0.3cm}
     1.6  \vspace{0.3cm}
     1.7 +\subsubsection{RPC name:~get\_log}
     1.8 +
     1.9 +{\bf Overview:} 
    1.10 +Get the host's log file.
    1.11 +
    1.12 + \noindent {\bf Signature:} 
    1.13 +\begin{verbatim} string get_log (session_id s, host ref host)\end{verbatim}
    1.14 +
    1.15 +
    1.16 +\noindent{\bf Arguments:}
    1.17 +
    1.18 + 
    1.19 +\vspace{0.3cm}
    1.20 +\begin{tabular}{|c|c|p{7cm}|}
    1.21 + \hline
    1.22 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.23 +{\tt host ref } & host & The Host to query \\ \hline 
    1.24 +
    1.25 +\end{tabular}
    1.26 +
    1.27 +\vspace{0.3cm}
    1.28 +
    1.29 + \noindent {\bf Return Type:} 
    1.30 +{\tt 
    1.31 +string
    1.32 +}
    1.33 +
    1.34 +
    1.35 +The contents of the host's primary log file
    1.36 +\vspace{0.3cm}
    1.37 +\vspace{0.3cm}
    1.38 +\vspace{0.3cm}
    1.39 +\subsubsection{RPC name:~send\_debug\_keys}
    1.40 +
    1.41 +{\bf Overview:} 
    1.42 +Inject the given string as debugging keys into Xen.
    1.43 +
    1.44 + \noindent {\bf Signature:} 
    1.45 +\begin{verbatim} void send_debug_keys (session_id s, host ref host, string keys)\end{verbatim}
    1.46 +
    1.47 +
    1.48 +\noindent{\bf Arguments:}
    1.49 +
    1.50 + 
    1.51 +\vspace{0.3cm}
    1.52 +\begin{tabular}{|c|c|p{7cm}|}
    1.53 + \hline
    1.54 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.55 +{\tt host ref } & host & The host \\ \hline 
    1.56 +
    1.57 +{\tt string } & keys & The keys to send \\ \hline 
    1.58 +
    1.59 +\end{tabular}
    1.60 +
    1.61 +\vspace{0.3cm}
    1.62 +
    1.63 + \noindent {\bf Return Type:} 
    1.64 +{\tt 
    1.65 +void
    1.66 +}
    1.67 +
    1.68 +
    1.69 +
    1.70 +\vspace{0.3cm}
    1.71 +\vspace{0.3cm}
    1.72 +\vspace{0.3cm}
    1.73  \subsubsection{RPC name:~list\_methods}
    1.74  
    1.75  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_host.h	Sun Apr 08 23:03:16 2007 +0100
     2.2 +++ b/tools/libxen/include/xen_host.h	Mon Apr 09 11:39:27 2007 +0100
     2.3 @@ -443,6 +443,20 @@ xen_host_dmesg_clear(xen_session *sessio
     2.4  
     2.5  
     2.6  /**
     2.7 + * Get the host's log file.
     2.8 + */
     2.9 +extern bool
    2.10 +xen_host_get_log(xen_session *session, char **result, xen_host host);
    2.11 +
    2.12 +
    2.13 +/**
    2.14 + * Inject the given string as debugging keys into Xen.
    2.15 + */
    2.16 +extern bool
    2.17 +xen_host_send_debug_keys(xen_session *session, xen_host host, char *keys);
    2.18 +
    2.19 +
    2.20 +/**
    2.21   * List all supported methods.
    2.22   */
    2.23  extern bool
     3.1 --- a/tools/libxen/src/xen_host.c	Sun Apr 08 23:03:16 2007 +0100
     3.2 +++ b/tools/libxen/src/xen_host.c	Mon Apr 09 11:39:27 2007 +0100
     3.3 @@ -757,6 +757,39 @@ xen_host_dmesg_clear(xen_session *sessio
     3.4  
     3.5  
     3.6  bool
     3.7 +xen_host_get_log(xen_session *session, char **result, xen_host host)
     3.8 +{
     3.9 +    abstract_value param_values[] =
    3.10 +        {
    3.11 +            { .type = &abstract_type_string,
    3.12 +              .u.string_val = host }
    3.13 +        };
    3.14 +
    3.15 +    abstract_type result_type = abstract_type_string;
    3.16 +
    3.17 +    *result = NULL;
    3.18 +    XEN_CALL_("host.get_log");
    3.19 +    return session->ok;
    3.20 +}
    3.21 +
    3.22 +
    3.23 +bool
    3.24 +xen_host_send_debug_keys(xen_session *session, xen_host host, char *keys)
    3.25 +{
    3.26 +    abstract_value param_values[] =
    3.27 +        {
    3.28 +            { .type = &abstract_type_string,
    3.29 +              .u.string_val = host },
    3.30 +            { .type = &abstract_type_string,
    3.31 +              .u.string_val = keys }
    3.32 +        };
    3.33 +
    3.34 +    xen_call_(session, "host.send_debug_keys", param_values, 2, NULL, NULL);
    3.35 +    return session->ok;
    3.36 +}
    3.37 +
    3.38 +
    3.39 +bool
    3.40  xen_host_list_methods(xen_session *session, struct xen_string_set **result)
    3.41  {
    3.42