WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Added host.logging, to hold server-side l

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Added host.logging, to hold server-side logging configuration.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2007 07:05:11 -0800
Delivery-date: Wed, 31 Jan 2007 07:06:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170160280 0
# Node ID b9febab4c6cbce55156f2f516a7e1e6b0b5b3df9
# Parent  dc5e6e65bf1058b525a2e27e6ddfe68b4dfd6d36
Added host.logging, to hold server-side logging configuration.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex |  138 ++++++++++++++++++++++++++++++++++++++
 tools/libxen/include/xen_host.h   |   30 ++++++++
 tools/libxen/src/xen_host.c       |   71 +++++++++++++++++++
 3 files changed, 239 insertions(+)

diff -r dc5e6e65bf10 -r b9febab4c6cb docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Tue Jan 30 11:57:56 2007 +0000
+++ b/docs/xen-api/xenapi-datamodel.tex Tue Jan 30 12:31:20 2007 +0000
@@ -3758,6 +3758,7 @@ Quals & Field & Type & Description \\
 $\mathit{RO}_\mathit{run}$ &  {\tt software\_version} & (string $\rightarrow$ 
string) Map & version strings \\
 $\mathit{RW}$ &  {\tt other\_config} & (string $\rightarrow$ string) Map & 
additional configuration \\
 $\mathit{RO}_\mathit{run}$ &  {\tt resident\_VMs} & (VM ref) Set & list of VMs 
currently resident on host \\
+$\mathit{RW}$ &  {\tt logging} & (string $\rightarrow$ string) Map & logging 
configuration \\
 $\mathit{RO}_\mathit{run}$ &  {\tt PIFs} & (PIF ref) Set & physical network 
interfaces \\
 $\mathit{RO}_\mathit{run}$ &  {\tt PBDs} & (PBD ref) Set & physical 
blockdevices \\
 $\mathit{RO}_\mathit{run}$ &  {\tt host\_CPUs} & (host\_cpu ref) Set & The 
physical CPUs on this host \\
@@ -4278,6 +4279,143 @@ Get the resident\_VMs field of the given
 
 
 value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_logging}
+
+{\bf Overview:} 
+Get the logging field of the given host.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((string -> string) Map) get_logging (session_id s, host ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt host ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(string $\rightarrow$ string) Map
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~set\_logging}
+
+{\bf Overview:} 
+Set the logging field of the given host.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_logging (session_id s, host ref self, (string -> 
string) Map value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt host ref } & self & reference to the object \\ \hline 
+
+{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~add\_to\_logging}
+
+{\bf Overview:} 
+Add the given key-value pair to the logging field of the given host.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void add_to_logging (session_id s, host ref self, string key, 
string value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt host ref } & self & reference to the object \\ \hline 
+
+{\tt string } & key & Key to add \\ \hline 
+
+{\tt string } & value & Value to add \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~remove\_from\_logging}
+
+{\bf Overview:} 
+Remove the given key and its corresponding value from the logging field of
+the given host.  If the key is not in that Map, then do nothing.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void remove_from_logging (session_id s, host ref self, 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 host ref } & self & reference to the object \\ \hline 
+
+{\tt string } & key & Key to remove \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
diff -r dc5e6e65bf10 -r b9febab4c6cb tools/libxen/include/xen_host.h
--- a/tools/libxen/include/xen_host.h   Tue Jan 30 11:57:56 2007 +0000
+++ b/tools/libxen/include/xen_host.h   Tue Jan 30 12:31:20 2007 +0000
@@ -72,6 +72,7 @@ typedef struct xen_host_record
     xen_string_string_map *software_version;
     xen_string_string_map *other_config;
     struct xen_vm_record_opt_set *resident_vms;
+    xen_string_string_map *logging;
     struct xen_pif_record_opt_set *pifs;
     struct xen_pbd_record_opt_set *pbds;
     struct xen_host_cpu_record_opt_set *host_cpus;
@@ -234,6 +235,13 @@ xen_host_get_resident_vms(xen_session *s
 
 
 /**
+ * Get the logging field of the given host.
+ */
+extern bool
+xen_host_get_logging(xen_session *session, xen_string_string_map **result, 
xen_host host);
+
+
+/**
  * Get the PIFs field of the given host.
  */
 extern bool
@@ -293,6 +301,28 @@ xen_host_remove_from_other_config(xen_se
 
 
 /**
+ * Set the logging field of the given host.
+ */
+extern bool
+xen_host_set_logging(xen_session *session, xen_host host, 
xen_string_string_map *logging);
+
+
+/**
+ * Add the given key-value pair to the logging field of the given host.
+ */
+extern bool
+xen_host_add_to_logging(xen_session *session, xen_host host, char *key, char 
*value);
+
+
+/**
+ * Remove the given key and its corresponding value from the logging
+ * field of the given host.  If the key is not in that Map, then do nothing.
+ */
+extern bool
+xen_host_remove_from_logging(xen_session *session, xen_host host, char *key);
+
+
+/**
  * Puts the host into a state in which no new VMs can be started.
  * Currently active VMs on the host continue to execute.
  */
diff -r dc5e6e65bf10 -r b9febab4c6cb tools/libxen/src/xen_host.c
--- a/tools/libxen/src/xen_host.c       Tue Jan 30 11:57:56 2007 +0000
+++ b/tools/libxen/src/xen_host.c       Tue Jan 30 12:31:20 2007 +0000
@@ -59,6 +59,9 @@ static const struct_member xen_host_reco
         { .key = "resident_VMs",
           .type = &abstract_type_ref_set,
           .offset = offsetof(xen_host_record, resident_vms) },
+        { .key = "logging",
+          .type = &abstract_type_string_string_map,
+          .offset = offsetof(xen_host_record, logging) },
         { .key = "PIFs",
           .type = &abstract_type_ref_set,
           .offset = offsetof(xen_host_record, pifs) },
@@ -94,6 +97,7 @@ xen_host_record_free(xen_host_record *re
     xen_string_string_map_free(record->software_version);
     xen_string_string_map_free(record->other_config);
     xen_vm_record_opt_set_free(record->resident_vms);
+    xen_string_string_map_free(record->logging);
     xen_pif_record_opt_set_free(record->pifs);
     xen_pbd_record_opt_set_free(record->pbds);
     xen_host_cpu_record_opt_set_free(record->host_cpus);
@@ -275,6 +279,23 @@ xen_host_get_resident_vms(xen_session *s
 
 
 bool
+xen_host_get_logging(xen_session *session, xen_string_string_map **result, 
xen_host host)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = host }
+        };
+
+    abstract_type result_type = abstract_type_string_string_map;
+
+    *result = NULL;
+    XEN_CALL_("host.get_logging");
+    return session->ok;
+}
+
+
+bool
 xen_host_get_pifs(xen_session *session, struct xen_pif_set **result, xen_host 
host)
 {
     abstract_value param_values[] =
@@ -408,6 +429,56 @@ xen_host_remove_from_other_config(xen_se
 
 
 bool
+xen_host_set_logging(xen_session *session, xen_host host, 
xen_string_string_map *logging)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = host },
+            { .type = &abstract_type_string_string_map,
+              .u.set_val = (arbitrary_set *)logging }
+        };
+
+    xen_call_(session, "host.set_logging", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
+xen_host_add_to_logging(xen_session *session, xen_host host, char *key, char 
*value)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = host },
+            { .type = &abstract_type_string,
+              .u.string_val = key },
+            { .type = &abstract_type_string,
+              .u.string_val = value }
+        };
+
+    xen_call_(session, "host.add_to_logging", param_values, 3, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
+xen_host_remove_from_logging(xen_session *session, xen_host host, char *key)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = host },
+            { .type = &abstract_type_string,
+              .u.string_val = key }
+        };
+
+    xen_call_(session, "host.remove_from_logging", param_values, 2, NULL, 
NULL);
+    return session->ok;
+}
+
+
+bool
 xen_host_disable(xen_session *session, xen_host host)
 {
     abstract_value param_values[] =

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Added host.logging, to hold server-side logging configuration., Xen patchbot-unstable <=