From: Ewan Mellor Date: Mon, 29 Jan 2007 14:52:27 +0000 (+0000) Subject: Fix documentation so that the connection objects (PIF, VBD, and VIF) are X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15368^2~45 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32890a0e31052dfe4f8fabfbeef7589af6f53986;p=xen.git Fix documentation so that the connection objects (PIF, VBD, and VIF) are connected to their referands through StaticRO fields. Signed-off-by: Ewan Mellor --- diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index 8e17ee0306..dabbbc53be 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -5862,8 +5862,8 @@ Quals & Field & Type & Description \\ \hline $\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\ $\mathit{RW}$ & {\tt device} & string & name of network device as exposed to guest e.g. eth0 \\ -$\mathit{RW}$ & {\tt network} & network ref & virtual network to which this vif is connected \\ -$\mathit{RW}$ & {\tt VM} & VM ref & virtual machine to which this vif is connected \\ +$\mathit{RO}_\mathit{ins}$ & {\tt network} & network ref & virtual network to which this vif is connected \\ +$\mathit{RO}_\mathit{ins}$ & {\tt VM} & VM ref & virtual machine to which this vif is connected \\ $\mathit{RW}$ & {\tt MAC} & string & ethernet MAC address of virtual interface, as exposed to guest \\ $\mathit{RW}$ & {\tt MTU} & int & MTU in octets \\ $\mathit{RO}_\mathit{run}$ & {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\ @@ -5998,40 +5998,6 @@ network ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_network} - -{\bf Overview:} -Set the network field of the given VIF. - - \noindent {\bf Signature:} -\begin{verbatim} void set_network (session_id s, VIF ref self, network ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VIF ref } & self & reference to the object \\ \hline - -{\tt network ref } & 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} @@ -6064,40 +6030,6 @@ VM ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_VM} - -{\bf Overview:} -Set the VM field of the given VIF. - - \noindent {\bf Signature:} -\begin{verbatim} void set_VM (session_id s, VIF ref self, VM ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VIF ref } & self & reference to the object \\ \hline - -{\tt VM ref } & 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} @@ -6441,8 +6373,8 @@ Quals & Field & Type & Description \\ \hline $\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\ $\mathit{RW}$ & {\tt device} & string & machine-readable name of the interface (e.g. eth0) \\ -$\mathit{RW}$ & {\tt network} & network ref & virtual network to which this pif is connected \\ -$\mathit{RW}$ & {\tt host} & host ref & physical machine to which this pif is connected \\ +$\mathit{RO}_\mathit{ins}$ & {\tt network} & network ref & virtual network to which this pif is connected \\ +$\mathit{RO}_\mathit{ins}$ & {\tt host} & host ref & physical machine to which this pif is connected \\ $\mathit{RW}$ & {\tt MAC} & string & ethernet MAC address of physical interface \\ $\mathit{RW}$ & {\tt MTU} & int & MTU in octets \\ $\mathit{RW}$ & {\tt VLAN} & int & VLAN tag for all traffic passing through this interface \\ @@ -6653,40 +6585,6 @@ network ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_network} - -{\bf Overview:} -Set the network field of the given PIF. - - \noindent {\bf Signature:} -\begin{verbatim} void set_network (session_id s, PIF ref self, network ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt PIF ref } & self & reference to the object \\ \hline - -{\tt network ref } & 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} @@ -6719,40 +6617,6 @@ host ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_host} - -{\bf Overview:} -Set the host field of the given PIF. - - \noindent {\bf Signature:} -\begin{verbatim} void set_host (session_id s, PIF ref self, host ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt PIF ref } & self & reference to the object \\ \hline - -{\tt host ref } & 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} @@ -8538,8 +8402,8 @@ virtual block device.}} \\ Quals & Field & Type & Description \\ \hline $\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\ -$\mathit{RW}$ & {\tt VM} & VM ref & the virtual machine \\ -$\mathit{RW}$ & {\tt VDI} & VDI ref & the virtual disk \\ +$\mathit{RO}_\mathit{ins}$ & {\tt VM} & VM ref & the virtual machine \\ +$\mathit{RO}_\mathit{ins}$ & {\tt VDI} & VDI ref & the virtual disk \\ $\mathit{RW}$ & {\tt device} & string & device seen by the guest e.g. hda1 \\ $\mathit{RW}$ & {\tt bootable} & bool & true if this VBD is bootable \\ $\mathit{RW}$ & {\tt mode} & vbd\_mode & the mode the VBD should be mounted with \\ @@ -8645,40 +8509,6 @@ VM ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_VM} - -{\bf Overview:} -Set the VM field of the given VBD. - - \noindent {\bf Signature:} -\begin{verbatim} void set_VM (session_id s, VBD ref self, VM ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VBD ref } & self & reference to the object \\ \hline - -{\tt VM ref } & 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} @@ -8711,40 +8541,6 @@ VDI ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_VDI} - -{\bf Overview:} -Set the VDI field of the given VBD. - - \noindent {\bf Signature:} -\begin{verbatim} void set_VDI (session_id s, VBD ref self, VDI ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VBD ref } & self & reference to the object \\ \hline - -{\tt VDI ref } & 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} diff --git a/tools/libxen/include/xen_pif.h b/tools/libxen/include/xen_pif.h index 0c0525f9a1..6905c60fe5 100644 --- a/tools/libxen/include/xen_pif.h +++ b/tools/libxen/include/xen_pif.h @@ -238,20 +238,6 @@ extern bool xen_pif_set_device(xen_session *session, xen_pif pif, char *device); -/** - * Set the network field of the given PIF. - */ -extern bool -xen_pif_set_network(xen_session *session, xen_pif pif, xen_network network); - - -/** - * Set the host field of the given PIF. - */ -extern bool -xen_pif_set_host(xen_session *session, xen_pif pif, xen_host host); - - /** * Set the MAC field of the given PIF. */ diff --git a/tools/libxen/include/xen_vbd.h b/tools/libxen/include/xen_vbd.h index 7080530a63..880449f3c1 100644 --- a/tools/libxen/include/xen_vbd.h +++ b/tools/libxen/include/xen_vbd.h @@ -238,20 +238,6 @@ extern bool xen_vbd_get_io_write_kbs(xen_session *session, double *result, xen_vbd vbd); -/** - * Set the VM field of the given VBD. - */ -extern bool -xen_vbd_set_vm(xen_session *session, xen_vbd vbd, xen_vm vm); - - -/** - * Set the VDI field of the given VBD. - */ -extern bool -xen_vbd_set_vdi(xen_session *session, xen_vbd vbd, xen_vdi vdi); - - /** * Set the device field of the given VBD. */ diff --git a/tools/libxen/include/xen_vif.h b/tools/libxen/include/xen_vif.h index f0d4f07651..7141bf3197 100644 --- a/tools/libxen/include/xen_vif.h +++ b/tools/libxen/include/xen_vif.h @@ -243,20 +243,6 @@ extern bool xen_vif_set_device(xen_session *session, xen_vif vif, char *device); -/** - * Set the network field of the given VIF. - */ -extern bool -xen_vif_set_network(xen_session *session, xen_vif vif, xen_network network); - - -/** - * Set the VM field of the given VIF. - */ -extern bool -xen_vif_set_vm(xen_session *session, xen_vif vif, xen_vm vm); - - /** * Set the MAC field of the given VIF. */ diff --git a/tools/libxen/src/xen_pif.c b/tools/libxen/src/xen_pif.c index 16cfe53901..39f8c748e6 100644 --- a/tools/libxen/src/xen_pif.c +++ b/tools/libxen/src/xen_pif.c @@ -282,38 +282,6 @@ xen_pif_set_device(xen_session *session, xen_pif pif, char *device) } -bool -xen_pif_set_network(xen_session *session, xen_pif pif, xen_network network) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = pif }, - { .type = &abstract_type_string, - .u.string_val = network } - }; - - xen_call_(session, "PIF.set_network", param_values, 2, NULL, NULL); - return session->ok; -} - - -bool -xen_pif_set_host(xen_session *session, xen_pif pif, xen_host host) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = pif }, - { .type = &abstract_type_string, - .u.string_val = host } - }; - - xen_call_(session, "PIF.set_host", param_values, 2, NULL, NULL); - return session->ok; -} - - bool xen_pif_set_mac(xen_session *session, xen_pif pif, char *mac) { diff --git a/tools/libxen/src/xen_vbd.c b/tools/libxen/src/xen_vbd.c index f581f85da7..786c7ea896 100644 --- a/tools/libxen/src/xen_vbd.c +++ b/tools/libxen/src/xen_vbd.c @@ -281,38 +281,6 @@ xen_vbd_get_io_write_kbs(xen_session *session, double *result, xen_vbd vbd) } -bool -xen_vbd_set_vm(xen_session *session, xen_vbd vbd, xen_vm vm) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vbd }, - { .type = &abstract_type_string, - .u.string_val = vm } - }; - - xen_call_(session, "VBD.set_VM", param_values, 2, NULL, NULL); - return session->ok; -} - - -bool -xen_vbd_set_vdi(xen_session *session, xen_vbd vbd, xen_vdi vdi) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vbd }, - { .type = &abstract_type_string, - .u.string_val = vdi } - }; - - xen_call_(session, "VBD.set_VDI", param_values, 2, NULL, NULL); - return session->ok; -} - - bool xen_vbd_set_device(xen_session *session, xen_vbd vbd, char *device) { diff --git a/tools/libxen/src/xen_vif.c b/tools/libxen/src/xen_vif.c index dd9e173a6a..47ef4730f6 100644 --- a/tools/libxen/src/xen_vif.c +++ b/tools/libxen/src/xen_vif.c @@ -294,38 +294,6 @@ xen_vif_set_device(xen_session *session, xen_vif vif, char *device) } -bool -xen_vif_set_network(xen_session *session, xen_vif vif, xen_network network) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vif }, - { .type = &abstract_type_string, - .u.string_val = network } - }; - - xen_call_(session, "VIF.set_network", param_values, 2, NULL, NULL); - return session->ok; -} - - -bool -xen_vif_set_vm(xen_session *session, xen_vif vif, xen_vm vm) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vif }, - { .type = &abstract_type_string, - .u.string_val = vm } - }; - - xen_call_(session, "VIF.set_VM", param_values, 2, NULL, NULL); - return session->ok; -} - - bool xen_vif_set_mac(xen_session *session, xen_vif vif, char *mac) {