direct-io.hg

changeset 14299:2ff4a2a5a6e5

Added {VIF,VBD}.{plug,unplug} methods. Docs and C bindings -- Xend to follow.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Mar 08 23:47:24 2007 +0000 (2007-03-08)
parents e562440e0412
children 3f8f5854acf0
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_vbd.h tools/libxen/include/xen_vif.h tools/libxen/src/xen_vbd.c tools/libxen/src/xen_vif.c
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Thu Mar 08 23:22:56 2007 +0000
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Thu Mar 08 23:47:24 2007 +0000
     1.3 @@ -7118,6 +7118,71 @@ Quals & Field & Type & Description \\
     1.4  \hline
     1.5  \end{longtable}
     1.6  \subsection{Additional RPCs associated with class: VIF}
     1.7 +\subsubsection{RPC name:~plug}
     1.8 +
     1.9 +{\bf Overview:} 
    1.10 +Hotplug the specified VIF, dynamically attaching it to the running VM.
    1.11 +
    1.12 + \noindent {\bf Signature:} 
    1.13 +\begin{verbatim} void plug (session_id s, VIF ref self)\end{verbatim}
    1.14 +
    1.15 +
    1.16 +\noindent{\bf Arguments:}
    1.17 +
    1.18 + 
    1.19 +\vspace{0.3cm}
    1.20 +\begin{tabular}{|c|c|p{7cm}|}
    1.21 + \hline
    1.22 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.23 +{\tt VIF ref } & self & The VIF to hotplug \\ \hline 
    1.24 +
    1.25 +\end{tabular}
    1.26 +
    1.27 +\vspace{0.3cm}
    1.28 +
    1.29 + \noindent {\bf Return Type:} 
    1.30 +{\tt 
    1.31 +void
    1.32 +}
    1.33 +
    1.34 +
    1.35 +
    1.36 +\vspace{0.3cm}
    1.37 +\vspace{0.3cm}
    1.38 +\vspace{0.3cm}
    1.39 +\subsubsection{RPC name:~unplug}
    1.40 +
    1.41 +{\bf Overview:} 
    1.42 +Hot-unplug the specified VIF, dynamically unattaching it from the running
    1.43 +VM.
    1.44 +
    1.45 + \noindent {\bf Signature:} 
    1.46 +\begin{verbatim} void unplug (session_id s, VIF ref self)\end{verbatim}
    1.47 +
    1.48 +
    1.49 +\noindent{\bf Arguments:}
    1.50 +
    1.51 + 
    1.52 +\vspace{0.3cm}
    1.53 +\begin{tabular}{|c|c|p{7cm}|}
    1.54 + \hline
    1.55 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.56 +{\tt VIF ref } & self & The VIF to hot-unplug \\ \hline 
    1.57 +
    1.58 +\end{tabular}
    1.59 +
    1.60 +\vspace{0.3cm}
    1.61 +
    1.62 + \noindent {\bf Return Type:} 
    1.63 +{\tt 
    1.64 +void
    1.65 +}
    1.66 +
    1.67 +
    1.68 +
    1.69 +\vspace{0.3cm}
    1.70 +\vspace{0.3cm}
    1.71 +\vspace{0.3cm}
    1.72  \subsubsection{RPC name:~get\_all}
    1.73  
    1.74  {\bf Overview:} 
    1.75 @@ -10464,6 +10529,71 @@ void
    1.76  \vspace{0.3cm}
    1.77  \vspace{0.3cm}
    1.78  \vspace{0.3cm}
    1.79 +\subsubsection{RPC name:~plug}
    1.80 +
    1.81 +{\bf Overview:} 
    1.82 +Hotplug the specified VBD, dynamically attaching it to the running VM.
    1.83 +
    1.84 + \noindent {\bf Signature:} 
    1.85 +\begin{verbatim} void plug (session_id s, VBD ref self)\end{verbatim}
    1.86 +
    1.87 +
    1.88 +\noindent{\bf Arguments:}
    1.89 +
    1.90 + 
    1.91 +\vspace{0.3cm}
    1.92 +\begin{tabular}{|c|c|p{7cm}|}
    1.93 + \hline
    1.94 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.95 +{\tt VBD ref } & self & The VBD to hotplug \\ \hline 
    1.96 +
    1.97 +\end{tabular}
    1.98 +
    1.99 +\vspace{0.3cm}
   1.100 +
   1.101 + \noindent {\bf Return Type:} 
   1.102 +{\tt 
   1.103 +void
   1.104 +}
   1.105 +
   1.106 +
   1.107 +
   1.108 +\vspace{0.3cm}
   1.109 +\vspace{0.3cm}
   1.110 +\vspace{0.3cm}
   1.111 +\subsubsection{RPC name:~unplug}
   1.112 +
   1.113 +{\bf Overview:} 
   1.114 +Hot-unplug the specified VBD, dynamically unattaching it from the running
   1.115 +VM.
   1.116 +
   1.117 + \noindent {\bf Signature:} 
   1.118 +\begin{verbatim} void unplug (session_id s, VBD ref self)\end{verbatim}
   1.119 +
   1.120 +
   1.121 +\noindent{\bf Arguments:}
   1.122 +
   1.123 + 
   1.124 +\vspace{0.3cm}
   1.125 +\begin{tabular}{|c|c|p{7cm}|}
   1.126 + \hline
   1.127 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.128 +{\tt VBD ref } & self & The VBD to hot-unplug \\ \hline 
   1.129 +
   1.130 +\end{tabular}
   1.131 +
   1.132 +\vspace{0.3cm}
   1.133 +
   1.134 + \noindent {\bf Return Type:} 
   1.135 +{\tt 
   1.136 +void
   1.137 +}
   1.138 +
   1.139 +
   1.140 +
   1.141 +\vspace{0.3cm}
   1.142 +\vspace{0.3cm}
   1.143 +\vspace{0.3cm}
   1.144  \subsubsection{RPC name:~get\_all}
   1.145  
   1.146  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_vbd.h	Thu Mar 08 23:22:56 2007 +0000
     2.2 +++ b/tools/libxen/include/xen_vbd.h	Thu Mar 08 23:47:24 2007 +0000
     2.3 @@ -358,6 +358,22 @@ xen_vbd_media_change(xen_session *sessio
     2.4  
     2.5  
     2.6  /**
     2.7 + * Hotplug the specified VBD, dynamically attaching it to the running
     2.8 + * VM
     2.9 + */
    2.10 +extern bool
    2.11 +xen_vbd_plug(xen_session *session, xen_vbd self);
    2.12 +
    2.13 +
    2.14 +/**
    2.15 + * Hot-unplug the specified VBD, dynamically unattaching it from the
    2.16 + * running VM
    2.17 + */
    2.18 +extern bool
    2.19 +xen_vbd_unplug(xen_session *session, xen_vbd self);
    2.20 +
    2.21 +
    2.22 +/**
    2.23   * Return a list of all the VBDs known to the system.
    2.24   */
    2.25  extern bool
     3.1 --- a/tools/libxen/include/xen_vif.h	Thu Mar 08 23:22:56 2007 +0000
     3.2 +++ b/tools/libxen/include/xen_vif.h	Thu Mar 08 23:47:24 2007 +0000
     3.3 @@ -332,6 +332,22 @@ xen_vif_remove_from_qos_algorithm_params
     3.4  
     3.5  
     3.6  /**
     3.7 + * Hotplug the specified VIF, dynamically attaching it to the running
     3.8 + * VM
     3.9 + */
    3.10 +extern bool
    3.11 +xen_vif_plug(xen_session *session, xen_vif self);
    3.12 +
    3.13 +
    3.14 +/**
    3.15 + * Hot-unplug the specified VIF, dynamically unattaching it from the
    3.16 + * running VM
    3.17 + */
    3.18 +extern bool
    3.19 +xen_vif_unplug(xen_session *session, xen_vif self);
    3.20 +
    3.21 +
    3.22 +/**
    3.23   * Return a list of all the VIFs known to the system.
    3.24   */
    3.25  extern bool
     4.1 --- a/tools/libxen/src/xen_vbd.c	Thu Mar 08 23:22:56 2007 +0000
     4.2 +++ b/tools/libxen/src/xen_vbd.c	Thu Mar 08 23:47:24 2007 +0000
     4.3 @@ -552,6 +552,34 @@ xen_vbd_media_change(xen_session *sessio
     4.4  
     4.5  
     4.6  bool
     4.7 +xen_vbd_plug(xen_session *session, xen_vbd self)
     4.8 +{
     4.9 +    abstract_value param_values[] =
    4.10 +        {
    4.11 +            { .type = &abstract_type_string,
    4.12 +              .u.string_val = self }
    4.13 +        };
    4.14 +
    4.15 +    xen_call_(session, "VBD.plug", param_values, 1, NULL, NULL);
    4.16 +    return session->ok;
    4.17 +}
    4.18 +
    4.19 +
    4.20 +bool
    4.21 +xen_vbd_unplug(xen_session *session, xen_vbd self)
    4.22 +{
    4.23 +    abstract_value param_values[] =
    4.24 +        {
    4.25 +            { .type = &abstract_type_string,
    4.26 +              .u.string_val = self }
    4.27 +        };
    4.28 +
    4.29 +    xen_call_(session, "VBD.unplug", param_values, 1, NULL, NULL);
    4.30 +    return session->ok;
    4.31 +}
    4.32 +
    4.33 +
    4.34 +bool
    4.35  xen_vbd_get_all(xen_session *session, struct xen_vbd_set **result)
    4.36  {
    4.37  
     5.1 --- a/tools/libxen/src/xen_vif.c	Thu Mar 08 23:22:56 2007 +0000
     5.2 +++ b/tools/libxen/src/xen_vif.c	Thu Mar 08 23:47:24 2007 +0000
     5.3 @@ -500,6 +500,34 @@ xen_vif_remove_from_qos_algorithm_params
     5.4  
     5.5  
     5.6  bool
     5.7 +xen_vif_plug(xen_session *session, xen_vif self)
     5.8 +{
     5.9 +    abstract_value param_values[] =
    5.10 +        {
    5.11 +            { .type = &abstract_type_string,
    5.12 +              .u.string_val = self }
    5.13 +        };
    5.14 +
    5.15 +    xen_call_(session, "VIF.plug", param_values, 1, NULL, NULL);
    5.16 +    return session->ok;
    5.17 +}
    5.18 +
    5.19 +
    5.20 +bool
    5.21 +xen_vif_unplug(xen_session *session, xen_vif self)
    5.22 +{
    5.23 +    abstract_value param_values[] =
    5.24 +        {
    5.25 +            { .type = &abstract_type_string,
    5.26 +              .u.string_val = self }
    5.27 +        };
    5.28 +
    5.29 +    xen_call_(session, "VIF.unplug", param_values, 1, NULL, NULL);
    5.30 +    return session->ok;
    5.31 +}
    5.32 +
    5.33 +
    5.34 +bool
    5.35  xen_vif_get_all(xen_session *session, struct xen_vif_set **result)
    5.36  {
    5.37