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@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-02-27 01:52:27 +00:00
1 parent b33bb1e4d9
commit 6bd6a1390e
8 files changed
+4 -206

No files matched your search

-101
View File
@@ -62,8 +62,6 @@ VBD.VM & VM.VBDs & one-to-many\\
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 @@ The metrics reported by the guest (as opposed to inferred from outside).}} \\
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 \\
@@ -4534,38 +4531,6 @@ 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
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
@@ -6109,7 +6074,6 @@ The metrics associated with a host.}} \\
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
@@ -6164,38 +6128,6 @@ 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
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
@@ -8783,7 +8715,6 @@ The metrics associated with a physical network interface.}} \\
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
@@ -8838,38 +8769,6 @@ 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
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
-9
View File
@@ -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;
@@ -169,13 +167,6 @@ extern bool
xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics);
/**
* 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.
*/
-9
View File
@@ -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;
@@ -168,13 +166,6 @@ extern bool
xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics);
/**
* 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.
*/
+2 -10
View File
@@ -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_record
{
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;
@@ -175,13 +173,6 @@ extern bool
xen_vm_guest_metrics_get_uuid(xen_session *session, char **result, xen_vm_guest_metrics vm_guest_metrics);
/**
* 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.
*/
@@ -225,7 +216,8 @@ xen_vm_guest_metrics_get_other(xen_session *session, xen_string_string_map **res
/**
* 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);
-22
View File
@@ -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_metrics_record_struct_members[] =
{ .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_metrics_record *record)
}
free(record->handle);
free(record->uuid);
xen_host_record_opt_free(record->host);
free(record);
}
@@ -115,23 +110,6 @@ xen_host_metrics_get_by_uuid(xen_session *session, xen_host_metrics *result, cha
}
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)
{
-22
View File
@@ -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_metrics_record_struct_members[] =
{ .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_metrics_record *record)
}
free(record->handle);
free(record->uuid);
xen_pif_record_opt_free(record->pif);
free(record);
}
@@ -115,23 +110,6 @@ xen_pif_metrics_get_by_uuid(xen_session *session, xen_pif_metrics *result, char
}
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)
{
-22
View File
@@ -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_metrics_record_struct_members[] =
{ .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_guest_metrics_record *record)
}
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);
@@ -134,23 +129,6 @@ xen_vm_guest_metrics_get_by_uuid(xen_session *session, xen_vm_guest_metrics *res
}
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)
{
+2 -11
View File
@@ -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,14 +815,10 @@ 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 = []
@@ -983,9 +977,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())
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.