[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Implementation of host_metrics.get_all, PIF_metrics.get_all, and docs and



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172538332 0
# Node ID 42dd9055ee1f833c647169cd5621b04f2e83fa2d
# Parent  50e0616fd012573f6e4c5b52c32bde6882308a24
Implementation of host_metrics.get_all, PIF_metrics.get_all, and docs and
bindings for many of the get_all methods elsewhere that Xend already
implemented.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex           |  273 ++++++++++++++++++++++++++++
 tools/libxen/include/xen_console.h          |    7 
 tools/libxen/include/xen_host_cpu.h         |    7 
 tools/libxen/include/xen_host_metrics.h     |    9 
 tools/libxen/include/xen_pbd.h              |    9 
 tools/libxen/include/xen_pif.h              |    9 
 tools/libxen/include/xen_pif_metrics.h      |    9 
 tools/libxen/include/xen_vbd.h              |    7 
 tools/libxen/include/xen_vbd_metrics.h      |    7 
 tools/libxen/include/xen_vdi.h              |    7 
 tools/libxen/include/xen_vif.h              |    7 
 tools/libxen/include/xen_vif_metrics.h      |    7 
 tools/libxen/include/xen_vm_guest_metrics.h |    7 
 tools/libxen/include/xen_vm_metrics.h       |    7 
 tools/libxen/src/xen_console.c              |   12 +
 tools/libxen/src/xen_host_cpu.c             |   12 +
 tools/libxen/src/xen_host_metrics.c         |   14 +
 tools/libxen/src/xen_pbd.c                  |   14 +
 tools/libxen/src/xen_pif.c                  |   14 +
 tools/libxen/src/xen_pif_metrics.c          |   14 +
 tools/libxen/src/xen_vbd.c                  |   12 +
 tools/libxen/src/xen_vbd_metrics.c          |   12 +
 tools/libxen/src/xen_vdi.c                  |   12 +
 tools/libxen/src/xen_vif.c                  |   12 +
 tools/libxen/src/xen_vif_metrics.c          |   12 +
 tools/libxen/src/xen_vm_guest_metrics.c     |   12 +
 tools/libxen/src/xen_vm_metrics.c           |   12 +
 tools/python/xen/xend/XendAPI.py            |    6 
 28 files changed, 534 insertions(+), 8 deletions(-)

diff -r 50e0616fd012 -r 42dd9055ee1f docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Tue Feb 27 00:37:27 2007 +0000
+++ b/docs/xen-api/xenapi-datamodel.tex Tue Feb 27 01:05:32 2007 +0000
@@ -4248,6 +4248,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VM\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VM\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VM_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VM\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -4464,6 +4485,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VM\_guest\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VM\_guest\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VM_guest_metrics ref) Set) get_all (session_id 
s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VM\_guest\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -6073,6 +6115,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: host\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the host\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((host_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(host\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -6289,6 +6352,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: host\_cpu}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the host\_cpus known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((host_cpu ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(host\_cpu ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -7100,6 +7184,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VIF}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VIFs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VIF ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VIF ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -7906,6 +8011,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VIF\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VIF\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VIF_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VIF\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -8166,6 +8292,27 @@ void
 \noindent{\bf Possible Error Codes:} {\tt PIF\_IS\_PHYSICAL}
 
 \vspace{0.6cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PIFs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PIF ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PIF ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -8642,6 +8789,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: PIF\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PIF\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PIF_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PIF\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -9558,6 +9726,27 @@ void
 
 
 
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VDIs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VDI ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VDI ref) Set
+}
+
+
+references to all objects
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -10374,6 +10563,27 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VBDs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VBD ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VBD ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -11246,6 +11456,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VBD\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VBD\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VBD_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VBD\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -11427,6 +11658,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: PBD}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PBDs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PBD ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PBD ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -12243,6 +12495,27 @@ Quals & Field & Type & Description \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: console}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the consoles known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((console ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(console ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_console.h
--- a/tools/libxen/include/xen_console.h        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_console.h        Tue Feb 27 01:05:32 2007 +0000
@@ -237,4 +237,11 @@ xen_console_remove_from_other_config(xen
 xen_console_remove_from_other_config(xen_session *session, xen_console 
console, char *key);
 
 
+/**
+ * Return a list of all the consoles known to the system.
+ */
+extern bool
+xen_console_get_all(xen_session *session, struct xen_console_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_host_cpu.h
--- a/tools/libxen/include/xen_host_cpu.h       Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_host_cpu.h       Tue Feb 27 01:05:32 2007 +0000
@@ -229,4 +229,11 @@ xen_host_cpu_get_utilisation(xen_session
 xen_host_cpu_get_utilisation(xen_session *session, double *result, 
xen_host_cpu host_cpu);
 
 
+/**
+ * Return a list of all the host_cpus known to the system.
+ */
+extern bool
+xen_host_cpu_get_all(xen_session *session, struct xen_host_cpu_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_host_metrics.h
--- a/tools/libxen/include/xen_host_metrics.h   Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_host_metrics.h   Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -190,4 +190,11 @@ xen_host_metrics_get_memory_free(xen_ses
 xen_host_metrics_get_memory_free(xen_session *session, int64_t *result, 
xen_host_metrics host_metrics);
 
 
+/**
+ * Return a list of all the host_metrics instances known to the system.
+ */
+extern bool
+xen_host_metrics_get_all(xen_session *session, struct xen_host_metrics_set 
**result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_pbd.h
--- a/tools/libxen/include/xen_pbd.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_pbd.h    Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -213,4 +213,11 @@ xen_pbd_get_currently_attached(xen_sessi
 xen_pbd_get_currently_attached(xen_session *session, bool *result, xen_pbd 
pbd);
 
 
+/**
+ * Return a list of all the PBDs known to the system.
+ */
+extern bool
+xen_pbd_get_all(xen_session *session, struct xen_pbd_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_pif.h
--- a/tools/libxen/include/xen_pif.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_pif.h    Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -267,4 +267,11 @@ xen_pif_destroy(xen_session *session, xe
 xen_pif_destroy(xen_session *session, xen_pif self);
 
 
+/**
+ * Return a list of all the PIFs known to the system.
+ */
+extern bool
+xen_pif_get_all(xen_session *session, struct xen_pif_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_pif_metrics.h
--- a/tools/libxen/include/xen_pif_metrics.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_pif_metrics.h    Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -189,4 +189,11 @@ xen_pif_metrics_get_io_write_kbs(xen_ses
 xen_pif_metrics_get_io_write_kbs(xen_session *session, double *result, 
xen_pif_metrics pif_metrics);
 
 
+/**
+ * Return a list of all the PIF_metrics instances known to the system.
+ */
+extern bool
+xen_pif_metrics_get_all(xen_session *session, struct xen_pif_metrics_set 
**result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vbd.h
--- a/tools/libxen/include/xen_vbd.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vbd.h    Tue Feb 27 01:05:32 2007 +0000
@@ -357,4 +357,11 @@ xen_vbd_media_change(xen_session *sessio
 xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi);
 
 
+/**
+ * Return a list of all the VBDs known to the system.
+ */
+extern bool
+xen_vbd_get_all(xen_session *session, struct xen_vbd_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vbd_metrics.h
--- a/tools/libxen/include/xen_vbd_metrics.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vbd_metrics.h    Tue Feb 27 01:05:32 2007 +0000
@@ -180,4 +180,11 @@ xen_vbd_metrics_get_io_write_kbs(xen_ses
 xen_vbd_metrics_get_io_write_kbs(xen_session *session, double *result, 
xen_vbd_metrics vbd_metrics);
 
 
+/**
+ * Return a list of all the VBD_metrics instances known to the system.
+ */
+extern bool
+xen_vbd_metrics_get_all(xen_session *session, struct xen_vbd_metrics_set 
**result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vdi.h
--- a/tools/libxen/include/xen_vdi.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vdi.h    Tue Feb 27 01:05:32 2007 +0000
@@ -335,4 +335,11 @@ xen_vdi_resize(xen_session *session, xen
 xen_vdi_resize(xen_session *session, xen_vdi vdi, int64_t size);
 
 
+/**
+ * Return a list of all the VDIs known to the system.
+ */
+extern bool
+xen_vdi_get_all(xen_session *session, struct xen_vdi_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vif.h
--- a/tools/libxen/include/xen_vif.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vif.h    Tue Feb 27 01:05:32 2007 +0000
@@ -331,4 +331,11 @@ xen_vif_remove_from_qos_algorithm_params
 xen_vif_remove_from_qos_algorithm_params(xen_session *session, xen_vif vif, 
char *key);
 
 
+/**
+ * Return a list of all the VIFs known to the system.
+ */
+extern bool
+xen_vif_get_all(xen_session *session, struct xen_vif_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vif_metrics.h
--- a/tools/libxen/include/xen_vif_metrics.h    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vif_metrics.h    Tue Feb 27 01:05:32 2007 +0000
@@ -180,4 +180,11 @@ xen_vif_metrics_get_io_write_kbs(xen_ses
 xen_vif_metrics_get_io_write_kbs(xen_session *session, double *result, 
xen_vif_metrics vif_metrics);
 
 
+/**
+ * Return a list of all the VIF_metrics instances known to the system.
+ */
+extern bool
+xen_vif_metrics_get_all(xen_session *session, struct xen_vif_metrics_set 
**result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vm_guest_metrics.h
--- a/tools/libxen/include/xen_vm_guest_metrics.h       Tue Feb 27 00:37:27 
2007 +0000
+++ b/tools/libxen/include/xen_vm_guest_metrics.h       Tue Feb 27 01:05:32 
2007 +0000
@@ -224,4 +224,11 @@ xen_vm_guest_metrics_get_other(xen_sessi
 xen_vm_guest_metrics_get_other(xen_session *session, xen_string_string_map 
**result, xen_vm_guest_metrics vm_guest_metrics);
 
 
+/**
+ * Return a list of all the VM_guest_metrics instances known to the system.
+ */
+extern bool
+xen_vm_guest_metrics_get_all(xen_session *session, struct 
xen_vm_guest_metrics_set **result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/include/xen_vm_metrics.h
--- a/tools/libxen/include/xen_vm_metrics.h     Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/include/xen_vm_metrics.h     Tue Feb 27 01:05:32 2007 +0000
@@ -189,4 +189,11 @@ xen_vm_metrics_get_vcpus_utilisation(xen
 xen_vm_metrics_get_vcpus_utilisation(xen_session *session, xen_int_float_map 
**result, xen_vm_metrics vm_metrics);
 
 
+/**
+ * Return a list of all the VM_metrics instances known to the system.
+ */
+extern bool
+xen_vm_metrics_get_all(xen_session *session, struct xen_vm_metrics_set 
**result);
+
+
 #endif
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_console.c
--- a/tools/libxen/src/xen_console.c    Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_console.c    Tue Feb 27 01:05:32 2007 +0000
@@ -270,6 +270,18 @@ xen_console_remove_from_other_config(xen
 
 
 bool
+xen_console_get_all(xen_session *session, struct xen_console_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "console.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_console_get_uuid(xen_session *session, char **result, xen_console console)
 {
     *result = session->ok ? xen_strdup_((char *)console) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_host_cpu.c
--- a/tools/libxen/src/xen_host_cpu.c   Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_host_cpu.c   Tue Feb 27 01:05:32 2007 +0000
@@ -268,6 +268,18 @@ xen_host_cpu_get_utilisation(xen_session
 
 
 bool
+xen_host_cpu_get_all(xen_session *session, struct xen_host_cpu_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "host_cpu.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_host_cpu_get_uuid(xen_session *session, char **result, xen_host_cpu 
host_cpu)
 {
     *result = session->ok ? xen_strdup_((char *)host_cpu) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_host_metrics.c
--- a/tools/libxen/src/xen_host_metrics.c       Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_host_metrics.c       Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -165,6 +165,18 @@ xen_host_metrics_get_memory_free(xen_ses
 
 
 bool
+xen_host_metrics_get_all(xen_session *session, struct xen_host_metrics_set 
**result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "host_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_host_metrics_get_uuid(xen_session *session, char **result, 
xen_host_metrics host_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)host_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_pbd.c
--- a/tools/libxen/src/xen_pbd.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_pbd.c        Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -221,6 +221,18 @@ xen_pbd_get_currently_attached(xen_sessi
 
 
 bool
+xen_pbd_get_all(xen_session *session, struct xen_pbd_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PBD.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_pbd_get_uuid(xen_session *session, char **result, xen_pbd pbd)
 {
     *result = session->ok ? xen_strdup_((char *)pbd) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_pif.c
--- a/tools/libxen/src/xen_pif.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_pif.c        Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -352,6 +352,18 @@ xen_pif_destroy(xen_session *session, xe
 
 
 bool
+xen_pif_get_all(xen_session *session, struct xen_pif_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PIF.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_pif_get_uuid(xen_session *session, char **result, xen_pif pif)
 {
     *result = session->ok ? xen_strdup_((char *)pif) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_pif_metrics.c
--- a/tools/libxen/src/xen_pif_metrics.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_pif_metrics.c        Tue Feb 27 01:05:32 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -165,6 +165,18 @@ xen_pif_metrics_get_io_write_kbs(xen_ses
 
 
 bool
+xen_pif_metrics_get_all(xen_session *session, struct xen_pif_metrics_set 
**result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PIF_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics 
pif_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)pif_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vbd.c
--- a/tools/libxen/src/xen_vbd.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vbd.c        Tue Feb 27 01:05:32 2007 +0000
@@ -552,6 +552,18 @@ xen_vbd_media_change(xen_session *sessio
 
 
 bool
+xen_vbd_get_all(xen_session *session, struct xen_vbd_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VBD.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vbd_get_uuid(xen_session *session, char **result, xen_vbd vbd)
 {
     *result = session->ok ? xen_strdup_((char *)vbd) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vbd_metrics.c
--- a/tools/libxen/src/xen_vbd_metrics.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vbd_metrics.c        Tue Feb 27 01:05:32 2007 +0000
@@ -143,6 +143,18 @@ xen_vbd_metrics_get_io_write_kbs(xen_ses
 
 
 bool
+xen_vbd_metrics_get_all(xen_session *session, struct xen_vbd_metrics_set 
**result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VBD_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vbd_metrics_get_uuid(xen_session *session, char **result, xen_vbd_metrics 
vbd_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)vbd_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vdi.c
--- a/tools/libxen/src/xen_vdi.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vdi.c        Tue Feb 27 01:05:32 2007 +0000
@@ -507,6 +507,18 @@ xen_vdi_resize(xen_session *session, xen
 
 
 bool
+xen_vdi_get_all(xen_session *session, struct xen_vdi_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VDI.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vdi_get_uuid(xen_session *session, char **result, xen_vdi vdi)
 {
     *result = session->ok ? xen_strdup_((char *)vdi) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vif.c
--- a/tools/libxen/src/xen_vif.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vif.c        Tue Feb 27 01:05:32 2007 +0000
@@ -500,6 +500,18 @@ xen_vif_remove_from_qos_algorithm_params
 
 
 bool
+xen_vif_get_all(xen_session *session, struct xen_vif_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VIF.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vif_get_uuid(xen_session *session, char **result, xen_vif vif)
 {
     *result = session->ok ? xen_strdup_((char *)vif) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vif_metrics.c
--- a/tools/libxen/src/xen_vif_metrics.c        Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vif_metrics.c        Tue Feb 27 01:05:32 2007 +0000
@@ -143,6 +143,18 @@ xen_vif_metrics_get_io_write_kbs(xen_ses
 
 
 bool
+xen_vif_metrics_get_all(xen_session *session, struct xen_vif_metrics_set 
**result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VIF_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vif_metrics_get_uuid(xen_session *session, char **result, xen_vif_metrics 
vif_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)vif_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vm_guest_metrics.c
--- a/tools/libxen/src/xen_vm_guest_metrics.c   Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vm_guest_metrics.c   Tue Feb 27 01:05:32 2007 +0000
@@ -254,6 +254,18 @@ xen_vm_guest_metrics_get_other(xen_sessi
 
 
 bool
+xen_vm_guest_metrics_get_all(xen_session *session, struct 
xen_vm_guest_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VM_guest_metrics.get_all", NULL, 0, &result_type, 
result);
+    return session->ok;
+}
+
+
+bool
 xen_vm_guest_metrics_get_uuid(xen_session *session, char **result, 
xen_vm_guest_metrics vm_guest_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)vm_guest_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/libxen/src/xen_vm_metrics.c
--- a/tools/libxen/src/xen_vm_metrics.c Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/libxen/src/xen_vm_metrics.c Tue Feb 27 01:05:32 2007 +0000
@@ -165,6 +165,18 @@ xen_vm_metrics_get_vcpus_utilisation(xen
 
 
 bool
+xen_vm_metrics_get_all(xen_session *session, struct xen_vm_metrics_set 
**result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VM_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
+bool
 xen_vm_metrics_get_uuid(xen_session *session, char **result, xen_vm_metrics 
vm_metrics)
 {
     *result = session->ok ? xen_strdup_((char *)vm_metrics) : NULL;
diff -r 50e0616fd012 -r 42dd9055ee1f tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue Feb 27 00:37:27 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Tue Feb 27 01:05:32 2007 +0000
@@ -807,6 +807,9 @@ class XendAPI(object):
     host_metrics_attr_rw = []
     host_metrics_methods = []
 
+    def host_metrics_get_all(self, _):
+        return xen_api_success([XendNode.instance().host_metrics_uuid])
+
     def _host_metrics_get(self, ref, f):
         return xen_api_success(getattr(node, f)())
 
@@ -970,6 +973,9 @@ class XendAPI(object):
                            'io_write_kbs']
     PIF_metrics_attr_rw = []
     PIF_methods = []
+
+    def PIF_metrics_get_all(self, _):
+        return xen_api_success(XendNode.instance().pif_metrics.keys())
 
     def _PIF_metrics_get(self, ref):
         return XendNode.instance().pif_metrics[ref]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.