ia64/xen-unstable

changeset 12819:d3a3e57fcf8b

Improved task handling model.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Dec 06 15:20:03 2006 +0000 (2006-12-06)
parents a3b8066baced
children 4234c17f3c48
files docs/xen-api/xenapi-datamodel.tex
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Wed Dec 06 15:13:33 2006 +0000
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Wed Dec 06 15:20:03 2006 +0000
     1.3 @@ -109,6 +109,7 @@ The following enumeration types are used
     1.4  \hline
     1.5  \end{longtable}
     1.6  
     1.7 +\vspace{1cm}
     1.8  \begin{longtable}{|ll|}
     1.9  \hline
    1.10  {\tt enum vdi\_type} & \\
    1.11 @@ -136,6 +137,17 @@ The following enumeration types are used
    1.12  \vspace{1cm}
    1.13  \begin{longtable}{|ll|}
    1.14  \hline
    1.15 +{\tt enum task\_status\_type} & \\
    1.16 +\hline
    1.17 +\hspace{0.5cm}{\tt pending} & task is in progress \\
    1.18 +\hspace{0.5cm}{\tt success} & task was completed successfully \\
    1.19 +\hspace{0.5cm}{\tt failure} & task has failed \\
    1.20 +\hline
    1.21 +\end{longtable}
    1.22 +
    1.23 +\vspace{1cm}
    1.24 +\begin{longtable}{|ll|}
    1.25 +\hline
    1.26  {\tt enum cpu\_feature} & \\
    1.27  \hline
    1.28  \hspace{0.5cm}{\tt FPU} &  Onboard FPU  \\
    1.29 @@ -273,6 +285,7 @@ The following enumeration types are used
    1.30  \hline
    1.31  Quals & Field & Type & Description \\
    1.32  \hline
    1.33 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
    1.34  $\mathit{RO}_\mathit{ins}$ &  {\tt this\_host} & host ref & Currently connected host \\
    1.35  $\mathit{RO}_\mathit{ins}$ &  {\tt this\_user} & user ref & Currently connected user \\
    1.36  \hline
    1.37 @@ -333,6 +346,38 @@ void
    1.38  \vspace{0.3cm}
    1.39  \vspace{0.3cm}
    1.40  \vspace{0.3cm}
    1.41 +\subsubsection{RPC name:~get\_uuid}
    1.42 +
    1.43 +{\bf Overview:} 
    1.44 +Get the uuid field of the given session.
    1.45 +
    1.46 + \noindent {\bf Signature:} 
    1.47 +\begin{verbatim} string get_uuid (session_id s, session ref self)\end{verbatim}
    1.48 +
    1.49 +
    1.50 +\noindent{\bf Arguments:}
    1.51 +
    1.52 + 
    1.53 +\vspace{0.3cm}
    1.54 +\begin{tabular}{|c|c|p{7cm}|}
    1.55 + \hline
    1.56 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.57 +{\tt session ref } & self & reference to the object \\ \hline 
    1.58 +
    1.59 +\end{tabular}
    1.60 +
    1.61 +\vspace{0.3cm}
    1.62 +
    1.63 + \noindent {\bf Return Type:} 
    1.64 +{\tt 
    1.65 +string
    1.66 +}
    1.67 +
    1.68 +
    1.69 +value of the field
    1.70 +\vspace{0.3cm}
    1.71 +\vspace{0.3cm}
    1.72 +\vspace{0.3cm}
    1.73  \subsubsection{RPC name:~get\_this\_host}
    1.74  
    1.75  {\bf Overview:} 
    1.76 @@ -540,48 +585,23 @@ Quals & Field & Type & Description \\
    1.77  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
    1.78  $\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
    1.79  $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
    1.80 +$\mathit{RO}_\mathit{run}$ &  {\tt status} & task\_status\_type & current status of the task \\
    1.81 +$\mathit{RO}_\mathit{run}$ &  {\tt progress} & int & if the task is still pending, this field contains the estimated percentage complete (0-100). If task has completed (successfully or unsuccessfully) this should be 100. \\
    1.82 +$\mathit{RO}_\mathit{run}$ &  {\tt eta} & datetime & if the task is still pending, this field contains the estimated completion time. If the task has finished (successfully or not) it contains the time the task finished. \\
    1.83 +$\mathit{RO}_\mathit{run}$ &  {\tt type} & string & if the task has completed successfully, this field contains the type of the encoded result (i.e. name of the class whose reference is in the result field). Undefined otherwise. \\
    1.84 +$\mathit{RO}_\mathit{run}$ &  {\tt result} & string & if the task has completed successfully, this field contains the result value (either Void or an object reference). Undefined otherwise. \\
    1.85 +$\mathit{RO}_\mathit{run}$ &  {\tt error\_code} & int & if the task has failed, this field contains the error code. Undefined otherwise. \\
    1.86 +$\mathit{RO}_\mathit{run}$ &  {\tt error\_info} & string Set & if the task has failed, this field contains the set of associated error strings. Undefined otherwise. \\
    1.87  \hline
    1.88  \end{longtable}
    1.89  \subsection{Additional RPCs associated with class: task}
    1.90 -\subsubsection{RPC name:~get\_status}
    1.91 -
    1.92 -{\bf Overview:} 
    1.93 -Poll a running asynchronous RPC invocation and query its status
    1.94 -
    1.95 - \noindent {\bf Signature:} 
    1.96 -\begin{verbatim} (uuid ref) get_status (session_id s, task ref task)\end{verbatim}
    1.97 -
    1.98 -
    1.99 -\noindent{\bf Arguments:}
   1.100 -
   1.101 - 
   1.102 -\vspace{0.3cm}
   1.103 -\begin{tabular}{|c|c|p{7cm}|}
   1.104 - \hline
   1.105 -{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.106 -{\tt task ref } & task & The ID of the RPC call to poll \\ \hline 
   1.107 -
   1.108 -\end{tabular}
   1.109 -
   1.110 -\vspace{0.3cm}
   1.111 -
   1.112 - \noindent {\bf Return Type:} 
   1.113 -{\tt 
   1.114 -uuid ref
   1.115 -}
   1.116 -
   1.117 -
   1.118 -String describing status of specified asynchronous RPC invocation, including estimated completion time
   1.119 -\vspace{0.3cm}
   1.120 -\vspace{0.3cm}
   1.121 -\vspace{0.3cm}
   1.122 -\subsubsection{RPC name:~get\_all\_tasks}
   1.123 -
   1.124 -{\bf Overview:} 
   1.125 -List all asynchronous RPC calls currently executing
   1.126 -
   1.127 - \noindent {\bf Signature:} 
   1.128 -\begin{verbatim} ((task ref) Set) get_all_tasks (session_id s)\end{verbatim}
   1.129 +\subsubsection{RPC name:~get\_all}
   1.130 +
   1.131 +{\bf Overview:} 
   1.132 +Return a list of all the tasks known to the system
   1.133 +
   1.134 + \noindent {\bf Signature:} 
   1.135 +\begin{verbatim} ((task ref) Set) get_all (session_id s)\end{verbatim}
   1.136  
   1.137  
   1.138  \vspace{0.3cm}
   1.139 @@ -592,10 +612,7 @@ List all asynchronous RPC calls currentl
   1.140  }
   1.141  
   1.142  
   1.143 -A list of tasks currently executing. Note that
   1.144 -tasks are associated with users rather than sessions. Thus, if you logout and
   1.145 -login again with a different session but the same user, this function will still
   1.146 -return the user's running tasks.
   1.147 +references to all objects
   1.148  \vspace{0.3cm}
   1.149  \vspace{0.3cm}
   1.150  \vspace{0.3cm}
   1.151 @@ -763,6 +780,230 @@ void
   1.152  \vspace{0.3cm}
   1.153  \vspace{0.3cm}
   1.154  \vspace{0.3cm}
   1.155 +\subsubsection{RPC name:~get\_status}
   1.156 +
   1.157 +{\bf Overview:} 
   1.158 +Get the status field of the given task.
   1.159 +
   1.160 + \noindent {\bf Signature:} 
   1.161 +\begin{verbatim} (task_status_type) get_status (session_id s, task ref self)\end{verbatim}
   1.162 +
   1.163 +
   1.164 +\noindent{\bf Arguments:}
   1.165 +
   1.166 + 
   1.167 +\vspace{0.3cm}
   1.168 +\begin{tabular}{|c|c|p{7cm}|}
   1.169 + \hline
   1.170 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.171 +{\tt task ref } & self & reference to the object \\ \hline 
   1.172 +
   1.173 +\end{tabular}
   1.174 +
   1.175 +\vspace{0.3cm}
   1.176 +
   1.177 + \noindent {\bf Return Type:} 
   1.178 +{\tt 
   1.179 +task\_status\_type
   1.180 +}
   1.181 +
   1.182 +
   1.183 +value of the field
   1.184 +\vspace{0.3cm}
   1.185 +\vspace{0.3cm}
   1.186 +\vspace{0.3cm}
   1.187 +\subsubsection{RPC name:~get\_progress}
   1.188 +
   1.189 +{\bf Overview:} 
   1.190 +Get the progress field of the given task.
   1.191 +
   1.192 + \noindent {\bf Signature:} 
   1.193 +\begin{verbatim} int get_progress (session_id s, task ref self)\end{verbatim}
   1.194 +
   1.195 +
   1.196 +\noindent{\bf Arguments:}
   1.197 +
   1.198 + 
   1.199 +\vspace{0.3cm}
   1.200 +\begin{tabular}{|c|c|p{7cm}|}
   1.201 + \hline
   1.202 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.203 +{\tt task ref } & self & reference to the object \\ \hline 
   1.204 +
   1.205 +\end{tabular}
   1.206 +
   1.207 +\vspace{0.3cm}
   1.208 +
   1.209 + \noindent {\bf Return Type:} 
   1.210 +{\tt 
   1.211 +int
   1.212 +}
   1.213 +
   1.214 +
   1.215 +value of the field
   1.216 +\vspace{0.3cm}
   1.217 +\vspace{0.3cm}
   1.218 +\vspace{0.3cm}
   1.219 +\subsubsection{RPC name:~get\_eta}
   1.220 +
   1.221 +{\bf Overview:} 
   1.222 +Get the eta field of the given task.
   1.223 +
   1.224 + \noindent {\bf Signature:} 
   1.225 +\begin{verbatim} datetime get_eta (session_id s, task ref self)\end{verbatim}
   1.226 +
   1.227 +
   1.228 +\noindent{\bf Arguments:}
   1.229 +
   1.230 + 
   1.231 +\vspace{0.3cm}
   1.232 +\begin{tabular}{|c|c|p{7cm}|}
   1.233 + \hline
   1.234 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.235 +{\tt task ref } & self & reference to the object \\ \hline 
   1.236 +
   1.237 +\end{tabular}
   1.238 +
   1.239 +\vspace{0.3cm}
   1.240 +
   1.241 + \noindent {\bf Return Type:} 
   1.242 +{\tt 
   1.243 +datetime
   1.244 +}
   1.245 +
   1.246 +
   1.247 +value of the field
   1.248 +\vspace{0.3cm}
   1.249 +\vspace{0.3cm}
   1.250 +\vspace{0.3cm}
   1.251 +\subsubsection{RPC name:~get\_type}
   1.252 +
   1.253 +{\bf Overview:} 
   1.254 +Get the type field of the given task.
   1.255 +
   1.256 + \noindent {\bf Signature:} 
   1.257 +\begin{verbatim} string get_type (session_id s, task ref self)\end{verbatim}
   1.258 +
   1.259 +
   1.260 +\noindent{\bf Arguments:}
   1.261 +
   1.262 + 
   1.263 +\vspace{0.3cm}
   1.264 +\begin{tabular}{|c|c|p{7cm}|}
   1.265 + \hline
   1.266 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.267 +{\tt task ref } & self & reference to the object \\ \hline 
   1.268 +
   1.269 +\end{tabular}
   1.270 +
   1.271 +\vspace{0.3cm}
   1.272 +
   1.273 + \noindent {\bf Return Type:} 
   1.274 +{\tt 
   1.275 +string
   1.276 +}
   1.277 +
   1.278 +
   1.279 +value of the field
   1.280 +\vspace{0.3cm}
   1.281 +\vspace{0.3cm}
   1.282 +\vspace{0.3cm}
   1.283 +\subsubsection{RPC name:~get\_result}
   1.284 +
   1.285 +{\bf Overview:} 
   1.286 +Get the result field of the given task.
   1.287 +
   1.288 + \noindent {\bf Signature:} 
   1.289 +\begin{verbatim} string get_result (session_id s, task ref self)\end{verbatim}
   1.290 +
   1.291 +
   1.292 +\noindent{\bf Arguments:}
   1.293 +
   1.294 + 
   1.295 +\vspace{0.3cm}
   1.296 +\begin{tabular}{|c|c|p{7cm}|}
   1.297 + \hline
   1.298 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.299 +{\tt task ref } & self & reference to the object \\ \hline 
   1.300 +
   1.301 +\end{tabular}
   1.302 +
   1.303 +\vspace{0.3cm}
   1.304 +
   1.305 + \noindent {\bf Return Type:} 
   1.306 +{\tt 
   1.307 +string
   1.308 +}
   1.309 +
   1.310 +
   1.311 +value of the field
   1.312 +\vspace{0.3cm}
   1.313 +\vspace{0.3cm}
   1.314 +\vspace{0.3cm}
   1.315 +\subsubsection{RPC name:~get\_error\_code}
   1.316 +
   1.317 +{\bf Overview:} 
   1.318 +Get the error\_code field of the given task.
   1.319 +
   1.320 + \noindent {\bf Signature:} 
   1.321 +\begin{verbatim} int get_error_code (session_id s, task ref self)\end{verbatim}
   1.322 +
   1.323 +
   1.324 +\noindent{\bf Arguments:}
   1.325 +
   1.326 + 
   1.327 +\vspace{0.3cm}
   1.328 +\begin{tabular}{|c|c|p{7cm}|}
   1.329 + \hline
   1.330 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.331 +{\tt task ref } & self & reference to the object \\ \hline 
   1.332 +
   1.333 +\end{tabular}
   1.334 +
   1.335 +\vspace{0.3cm}
   1.336 +
   1.337 + \noindent {\bf Return Type:} 
   1.338 +{\tt 
   1.339 +int
   1.340 +}
   1.341 +
   1.342 +
   1.343 +value of the field
   1.344 +\vspace{0.3cm}
   1.345 +\vspace{0.3cm}
   1.346 +\vspace{0.3cm}
   1.347 +\subsubsection{RPC name:~get\_error\_info}
   1.348 +
   1.349 +{\bf Overview:} 
   1.350 +Get the error\_info field of the given task.
   1.351 +
   1.352 + \noindent {\bf Signature:} 
   1.353 +\begin{verbatim} (string Set) get_error_info (session_id s, task ref self)\end{verbatim}
   1.354 +
   1.355 +
   1.356 +\noindent{\bf Arguments:}
   1.357 +
   1.358 + 
   1.359 +\vspace{0.3cm}
   1.360 +\begin{tabular}{|c|c|p{7cm}|}
   1.361 + \hline
   1.362 +{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.363 +{\tt task ref } & self & reference to the object \\ \hline 
   1.364 +
   1.365 +\end{tabular}
   1.366 +
   1.367 +\vspace{0.3cm}
   1.368 +
   1.369 + \noindent {\bf Return Type:} 
   1.370 +{\tt 
   1.371 +string Set
   1.372 +}
   1.373 +
   1.374 +
   1.375 +value of the field
   1.376 +\vspace{0.3cm}
   1.377 +\vspace{0.3cm}
   1.378 +\vspace{0.3cm}
   1.379  \subsubsection{RPC name:~create}
   1.380  
   1.381  {\bf Overview:}