# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172541147 0
# Node ID c2e7bacf0919242623bbd0f4c20fec08c1735a07
# Parent 42dd9055ee1f833c647169cd5621b04f2e83fa2d
Fix missing bits of the docs from cset 14020, and match that change by removing
the similar fields on host_metrics, PIF_metrics, and VM_guest_metrics.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
docs/xen-api/xenapi-datamodel.tex | 101 ----------------------------
tools/libxen/include/xen_host_metrics.h | 9 --
tools/libxen/include/xen_pif_metrics.h | 9 --
tools/libxen/include/xen_vm_guest_metrics.h | 12 ---
tools/libxen/src/xen_host_metrics.c | 22 ------
tools/libxen/src/xen_pif_metrics.c | 22 ------
tools/libxen/src/xen_vm_guest_metrics.c | 22 ------
tools/python/xen/xend/XendAPI.py | 13 ---
8 files changed, 4 insertions(+), 206 deletions(-)
diff -r 42dd9055ee1f -r c2e7bacf0919 docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Tue Feb 27 01:05:32 2007 +0000
+++ b/docs/xen-api/xenapi-datamodel.tex Tue Feb 27 01:52:27 2007 +0000
@@ -62,8 +62,6 @@ crashdump.VM & VM.crash\_dumps & one-to-
crashdump.VM & VM.crash\_dumps & one-to-many\\
VIF.VM & VM.VIFs & one-to-many\\
VIF.network & network.VIFs & one-to-many\\
-host.metrics & host\_metrics.host & one-to-one\\
-PIF.metrics & PIF\_metrics.PIF & one-to-one\\
PIF.host & host.PIFs & one-to-many\\
PIF.network & network.PIFs & one-to-many\\
SR.VDIs & VDI.SR & many-to-one\\
@@ -4475,7 +4473,6 @@ Quals & Field & Type & Description \\
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object
reference \\
-$\mathit{RO}_\mathit{ins}$ & {\tt VM} & VM ref & VM to which these metrics
apply \\
$\mathit{RO}_\mathit{run}$ & {\tt os\_version} & (string $\rightarrow$
string) Map & version of the OS \\
$\mathit{RO}_\mathit{run}$ & {\tt PV\_drivers\_version} & (string
$\rightarrow$ string) Map & version of the PV drivers \\
$\mathit{RO}_\mathit{run}$ & {\tt memory} & (string $\rightarrow$ string) Map
& free/used/total memory \\
@@ -4531,38 +4528,6 @@ Get the uuid field of the given VM\_gues
\noindent {\bf Return Type:}
{\tt
string
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_VM}
-
-{\bf Overview:}
-Get the VM field of the given VM\_guest\_metrics.
-
- \noindent {\bf Signature:}
-\begin{verbatim} (VM ref) get_VM (session_id s, VM_guest_metrics 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 VM\_guest\_metrics ref } & self & reference to the object \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-VM ref
}
@@ -6109,7 +6074,6 @@ Quals & Field & Type & Description \\
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object
reference \\
-$\mathit{RO}_\mathit{ins}$ & {\tt host} & host ref & Host to which these
metrics apply \\
$\mathit{RO}_\mathit{run}$ & {\tt memory/total} & int & Host's total memory
(bytes) \\
$\mathit{RO}_\mathit{run}$ & {\tt memory/free} & int & Host's free memory
(bytes) \\
\hline
@@ -6161,38 +6125,6 @@ Get the uuid field of the given host\_me
\noindent {\bf Return Type:}
{\tt
string
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_host}
-
-{\bf Overview:}
-Get the host field of the given host\_metrics.
-
- \noindent {\bf Signature:}
-\begin{verbatim} (host ref) get_host (session_id s, host_metrics 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\_metrics ref } & self & reference to the object \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-host ref
}
@@ -8783,7 +8715,6 @@ Quals & Field & Type & Description \\
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object
reference \\
-$\mathit{RO}_\mathit{ins}$ & {\tt PIF} & PIF ref & PIF to which these metrics
apply \\
$\mathit{RO}_\mathit{run}$ & {\tt io/read\_kbs} & float & Read bandwidth
(KiB/s) \\
$\mathit{RO}_\mathit{run}$ & {\tt io/write\_kbs} & float & Write bandwidth
(KiB/s) \\
\hline
@@ -8835,38 +8766,6 @@ Get the uuid field of the given PIF\_met
\noindent {\bf Return Type:}
{\tt
string
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_PIF}
-
-{\bf Overview:}
-Get the PIF field of the given PIF\_metrics.
-
- \noindent {\bf Signature:}
-\begin{verbatim} (PIF ref) get_PIF (session_id s, PIF_metrics 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 PIF\_metrics ref } & self & reference to the object \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-PIF ref
}
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/include/xen_host_metrics.h
--- a/tools/libxen/include/xen_host_metrics.h Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/libxen/include/xen_host_metrics.h Tue Feb 27 01:52:27 2007 +0000
@@ -20,7 +20,6 @@
#define XEN_HOST_METRICS_H
#include "xen_common.h"
-#include "xen_host_decl.h"
#include "xen_host_metrics_decl.h"
@@ -63,7 +62,6 @@ typedef struct xen_host_metrics_record
{
xen_host_metrics handle;
char *uuid;
- struct xen_host_record_opt *host;
int64_t memory_total;
int64_t memory_free;
} xen_host_metrics_record;
@@ -170,13 +168,6 @@ xen_host_metrics_get_uuid(xen_session *s
/**
- * Get the host field of the given host_metrics.
- */
-extern bool
-xen_host_metrics_get_host(xen_session *session, xen_host *result,
xen_host_metrics host_metrics);
-
-
-/**
* Get the memory/total field of the given host_metrics.
*/
extern bool
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/include/xen_pif_metrics.h
--- a/tools/libxen/include/xen_pif_metrics.h Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/libxen/include/xen_pif_metrics.h Tue Feb 27 01:52:27 2007 +0000
@@ -20,7 +20,6 @@
#define XEN_PIF_METRICS_H
#include "xen_common.h"
-#include "xen_pif_decl.h"
#include "xen_pif_metrics_decl.h"
@@ -63,7 +62,6 @@ typedef struct xen_pif_metrics_record
{
xen_pif_metrics handle;
char *uuid;
- struct xen_pif_record_opt *pif;
double io_read_kbs;
double io_write_kbs;
} xen_pif_metrics_record;
@@ -169,13 +167,6 @@ xen_pif_metrics_get_uuid(xen_session *se
/**
- * Get the PIF field of the given PIF_metrics.
- */
-extern bool
-xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics
pif_metrics);
-
-
-/**
* Get the io/read_kbs field of the given PIF_metrics.
*/
extern bool
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/include/xen_vm_guest_metrics.h
--- a/tools/libxen/include/xen_vm_guest_metrics.h Tue Feb 27 01:05:32
2007 +0000
+++ b/tools/libxen/include/xen_vm_guest_metrics.h Tue Feb 27 01:52:27
2007 +0000
@@ -21,7 +21,6 @@
#include "xen_common.h"
#include "xen_string_string_map.h"
-#include "xen_vm_decl.h"
#include "xen_vm_guest_metrics_decl.h"
@@ -64,7 +63,6 @@ typedef struct xen_vm_guest_metrics_reco
{
xen_vm_guest_metrics handle;
char *uuid;
- struct xen_vm_record_opt *vm;
xen_string_string_map *os_version;
xen_string_string_map *pv_drivers_version;
xen_string_string_map *memory;
@@ -176,13 +174,6 @@ xen_vm_guest_metrics_get_uuid(xen_sessio
/**
- * Get the VM field of the given VM_guest_metrics.
- */
-extern bool
-xen_vm_guest_metrics_get_vm(xen_session *session, xen_vm *result,
xen_vm_guest_metrics vm_guest_metrics);
-
-
-/**
* Get the os_version field of the given VM_guest_metrics.
*/
extern bool
@@ -225,7 +216,8 @@ xen_vm_guest_metrics_get_other(xen_sessi
/**
- * Return a list of all the VM_guest_metrics instances known to the system.
+ * 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);
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/src/xen_host_metrics.c
--- a/tools/libxen/src/xen_host_metrics.c Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/libxen/src/xen_host_metrics.c Tue Feb 27 01:52:27 2007 +0000
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include "xen_common.h"
-#include "xen_host.h"
#include "xen_host_metrics.h"
#include "xen_internal.h"
@@ -40,9 +39,6 @@ static const struct_member xen_host_metr
{ .key = "uuid",
.type = &abstract_type_string,
.offset = offsetof(xen_host_metrics_record, uuid) },
- { .key = "host",
- .type = &abstract_type_ref,
- .offset = offsetof(xen_host_metrics_record, host) },
{ .key = "memory_total",
.type = &abstract_type_int,
.offset = offsetof(xen_host_metrics_record, memory_total) },
@@ -70,7 +66,6 @@ xen_host_metrics_record_free(xen_host_me
}
free(record->handle);
free(record->uuid);
- xen_host_record_opt_free(record->host);
free(record);
}
@@ -116,23 +111,6 @@ xen_host_metrics_get_by_uuid(xen_session
bool
-xen_host_metrics_get_host(xen_session *session, xen_host *result,
xen_host_metrics host_metrics)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = host_metrics }
- };
-
- abstract_type result_type = abstract_type_string;
-
- *result = NULL;
- XEN_CALL_("host_metrics.get_host");
- return session->ok;
-}
-
-
-bool
xen_host_metrics_get_memory_total(xen_session *session, int64_t *result,
xen_host_metrics host_metrics)
{
abstract_value param_values[] =
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/src/xen_pif_metrics.c
--- a/tools/libxen/src/xen_pif_metrics.c Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/libxen/src/xen_pif_metrics.c Tue Feb 27 01:52:27 2007 +0000
@@ -22,7 +22,6 @@
#include "xen_common.h"
#include "xen_internal.h"
-#include "xen_pif.h"
#include "xen_pif_metrics.h"
@@ -40,9 +39,6 @@ static const struct_member xen_pif_metri
{ .key = "uuid",
.type = &abstract_type_string,
.offset = offsetof(xen_pif_metrics_record, uuid) },
- { .key = "PIF",
- .type = &abstract_type_ref,
- .offset = offsetof(xen_pif_metrics_record, pif) },
{ .key = "io_read_kbs",
.type = &abstract_type_float,
.offset = offsetof(xen_pif_metrics_record, io_read_kbs) },
@@ -70,7 +66,6 @@ xen_pif_metrics_record_free(xen_pif_metr
}
free(record->handle);
free(record->uuid);
- xen_pif_record_opt_free(record->pif);
free(record);
}
@@ -116,23 +111,6 @@ xen_pif_metrics_get_by_uuid(xen_session
bool
-xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics
pif_metrics)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = pif_metrics }
- };
-
- abstract_type result_type = abstract_type_string;
-
- *result = NULL;
- XEN_CALL_("PIF_metrics.get_PIF");
- return session->ok;
-}
-
-
-bool
xen_pif_metrics_get_io_read_kbs(xen_session *session, double *result,
xen_pif_metrics pif_metrics)
{
abstract_value param_values[] =
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/libxen/src/xen_vm_guest_metrics.c
--- a/tools/libxen/src/xen_vm_guest_metrics.c Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/libxen/src/xen_vm_guest_metrics.c Tue Feb 27 01:52:27 2007 +0000
@@ -23,7 +23,6 @@
#include "xen_common.h"
#include "xen_internal.h"
#include "xen_string_string_map.h"
-#include "xen_vm.h"
#include "xen_vm_guest_metrics.h"
@@ -41,9 +40,6 @@ static const struct_member xen_vm_guest_
{ .key = "uuid",
.type = &abstract_type_string,
.offset = offsetof(xen_vm_guest_metrics_record, uuid) },
- { .key = "VM",
- .type = &abstract_type_ref,
- .offset = offsetof(xen_vm_guest_metrics_record, vm) },
{ .key = "os_version",
.type = &abstract_type_string_string_map,
.offset = offsetof(xen_vm_guest_metrics_record, os_version) },
@@ -83,7 +79,6 @@ xen_vm_guest_metrics_record_free(xen_vm_
}
free(record->handle);
free(record->uuid);
- xen_vm_record_opt_free(record->vm);
xen_string_string_map_free(record->os_version);
xen_string_string_map_free(record->pv_drivers_version);
xen_string_string_map_free(record->memory);
@@ -135,23 +130,6 @@ xen_vm_guest_metrics_get_by_uuid(xen_ses
bool
-xen_vm_guest_metrics_get_vm(xen_session *session, xen_vm *result,
xen_vm_guest_metrics vm_guest_metrics)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vm_guest_metrics }
- };
-
- abstract_type result_type = abstract_type_string;
-
- *result = NULL;
- XEN_CALL_("VM_guest_metrics.get_VM");
- return session->ok;
-}
-
-
-bool
xen_vm_guest_metrics_get_os_version(xen_session *session,
xen_string_string_map **result, xen_vm_guest_metrics vm_guest_metrics)
{
abstract_value param_values[] =
diff -r 42dd9055ee1f -r c2e7bacf0919 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Tue Feb 27 01:05:32 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py Tue Feb 27 01:52:27 2007 +0000
@@ -802,8 +802,7 @@ class XendAPI(object):
# ----------------------------------------------------------------
host_metrics_attr_ro = ['memory_total',
- 'memory_free',
- 'host']
+ 'memory_free']
host_metrics_attr_rw = []
host_metrics_methods = []
@@ -816,13 +815,9 @@ class XendAPI(object):
def host_metrics_get_record(self, _, ref):
return xen_api_success({
'uuid' : ref,
- 'host' : XendNode.instance().uuid,
'memory_total' : self._host_metrics_get_memory_total(),
'memory_free' : self._host_metrics_get_memory_free(),
})
-
- def host_metrics_get_host(self, _, ref):
- return xen_api_success(XendNode.instance().uuid)
def host_metrics_get_memory_total(self, _, ref):
return xen_api_success(self._host_metrics_get_memory_total())
@@ -968,8 +963,7 @@ class XendAPI(object):
# Xen API: Class PIF_metrics
# ----------------------------------------------------------------
- PIF_metrics_attr_ro = ['PIF',
- 'io_read_kbs',
+ PIF_metrics_attr_ro = ['io_read_kbs',
'io_write_kbs']
PIF_metrics_attr_rw = []
PIF_methods = []
@@ -982,9 +976,6 @@ class XendAPI(object):
def PIF_metrics_get_record(self, _, ref):
return xen_api_success(self._PIF_metrics_get(ref).get_record())
-
- def PIF_metrics_get_PIF(self, _, ref):
- return xen_api_success(self._PIF_metrics_get(ref).pif.uuid)
def PIF_metrics_get_io_read_kbs(self, _, ref):
return xen_api_success(self._PIF_metrics_get(ref).get_io_read_kbs())
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|