direct-io.hg
changeset 13681:9521974ea1fa
Made task.name_* read-only (these are set by Xend) and drop task.eta.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | Ewan Mellor <ewan@xensource.com> |
---|---|
date | Sun Jan 28 17:33:50 2007 +0000 (2007-01-28) |
parents | 207ee547b193 |
children | 58344c358aa0 |
files | docs/xen-api/xenapi-datamodel.tex tools/python/xen/xend/XendAPI.py |
line diff
1.1 --- a/docs/xen-api/xenapi-datamodel.tex Sun Jan 28 17:21:37 2007 +0000 1.2 +++ b/docs/xen-api/xenapi-datamodel.tex Sun Jan 28 17:33:50 2007 +0000 1.3 @@ -550,11 +550,10 @@ all fields from the object 1.4 Quals & Field & Type & Description \\ 1.5 \hline 1.6 $\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\ 1.7 -$\mathit{RW}$ & {\tt name/label} & string & a human-readable name \\ 1.8 -$\mathit{RW}$ & {\tt name/description} & string & a notes field containg human-readable description \\ 1.9 +$\mathit{RO}_\mathit{run}$ & {\tt name/label} & string & a human-readable name \\ 1.10 +$\mathit{RO}_\mathit{run}$ & {\tt name/description} & string & a notes field containg human-readable description \\ 1.11 $\mathit{RO}_\mathit{run}$ & {\tt status} & task\_status\_type & current status of the task \\ 1.12 $\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.13 -$\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.14 $\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.15 $\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.16 $\mathit{RO}_\mathit{run}$ & {\tt error\_code} & int & if the task has failed, this field contains the error code. Undefined otherwise. \\ 1.17 @@ -647,40 +646,6 @@ value of the field 1.18 \vspace{0.3cm} 1.19 \vspace{0.3cm} 1.20 \vspace{0.3cm} 1.21 -\subsubsection{RPC name:~set\_name\_label} 1.22 - 1.23 -{\bf Overview:} 1.24 -Set the name/label field of the given task. 1.25 - 1.26 - \noindent {\bf Signature:} 1.27 -\begin{verbatim} void set_name_label (session_id s, task ref self, string value)\end{verbatim} 1.28 - 1.29 - 1.30 -\noindent{\bf Arguments:} 1.31 - 1.32 - 1.33 -\vspace{0.3cm} 1.34 -\begin{tabular}{|c|c|p{7cm}|} 1.35 - \hline 1.36 -{\bf type} & {\bf name} & {\bf description} \\ \hline 1.37 -{\tt task ref } & self & reference to the object \\ \hline 1.38 - 1.39 -{\tt string } & value & New value to set \\ \hline 1.40 - 1.41 -\end{tabular} 1.42 - 1.43 -\vspace{0.3cm} 1.44 - 1.45 - \noindent {\bf Return Type:} 1.46 -{\tt 1.47 -void 1.48 -} 1.49 - 1.50 - 1.51 - 1.52 -\vspace{0.3cm} 1.53 -\vspace{0.3cm} 1.54 -\vspace{0.3cm} 1.55 \subsubsection{RPC name:~get\_name\_description} 1.56 1.57 {\bf Overview:} 1.58 @@ -713,40 +678,6 @@ value of the field 1.59 \vspace{0.3cm} 1.60 \vspace{0.3cm} 1.61 \vspace{0.3cm} 1.62 -\subsubsection{RPC name:~set\_name\_description} 1.63 - 1.64 -{\bf Overview:} 1.65 -Set the name/description field of the given task. 1.66 - 1.67 - \noindent {\bf Signature:} 1.68 -\begin{verbatim} void set_name_description (session_id s, task ref self, string value)\end{verbatim} 1.69 - 1.70 - 1.71 -\noindent{\bf Arguments:} 1.72 - 1.73 - 1.74 -\vspace{0.3cm} 1.75 -\begin{tabular}{|c|c|p{7cm}|} 1.76 - \hline 1.77 -{\bf type} & {\bf name} & {\bf description} \\ \hline 1.78 -{\tt task ref } & self & reference to the object \\ \hline 1.79 - 1.80 -{\tt string } & value & New value to set \\ \hline 1.81 - 1.82 -\end{tabular} 1.83 - 1.84 -\vspace{0.3cm} 1.85 - 1.86 - \noindent {\bf Return Type:} 1.87 -{\tt 1.88 -void 1.89 -} 1.90 - 1.91 - 1.92 - 1.93 -\vspace{0.3cm} 1.94 -\vspace{0.3cm} 1.95 -\vspace{0.3cm} 1.96 \subsubsection{RPC name:~get\_status} 1.97 1.98 {\bf Overview:} 1.99 @@ -811,38 +742,6 @@ value of the field 1.100 \vspace{0.3cm} 1.101 \vspace{0.3cm} 1.102 \vspace{0.3cm} 1.103 -\subsubsection{RPC name:~get\_eta} 1.104 - 1.105 -{\bf Overview:} 1.106 -Get the eta field of the given task. 1.107 - 1.108 - \noindent {\bf Signature:} 1.109 -\begin{verbatim} datetime get_eta (session_id s, task ref self)\end{verbatim} 1.110 - 1.111 - 1.112 -\noindent{\bf Arguments:} 1.113 - 1.114 - 1.115 -\vspace{0.3cm} 1.116 -\begin{tabular}{|c|c|p{7cm}|} 1.117 - \hline 1.118 -{\bf type} & {\bf name} & {\bf description} \\ \hline 1.119 -{\tt task ref } & self & reference to the object \\ \hline 1.120 - 1.121 -\end{tabular} 1.122 - 1.123 -\vspace{0.3cm} 1.124 - 1.125 - \noindent {\bf Return Type:} 1.126 -{\tt 1.127 -datetime 1.128 -} 1.129 - 1.130 - 1.131 -value of the field 1.132 -\vspace{0.3cm} 1.133 -\vspace{0.3cm} 1.134 -\vspace{0.3cm} 1.135 \subsubsection{RPC name:~get\_type} 1.136 1.137 {\bf Overview:}
2.1 --- a/tools/python/xen/xend/XendAPI.py Sun Jan 28 17:21:37 2007 +0000 2.2 +++ b/tools/python/xen/xend/XendAPI.py Sun Jan 28 17:33:50 2007 +0000 2.3 @@ -496,16 +496,16 @@ class XendAPI(object): 2.4 # Xen API: Class Tasks 2.5 # ---------------------------------------------------------------- 2.6 2.7 - task_attr_ro = ['status', 2.8 + task_attr_ro = ['name_label', 2.9 + 'name_description', 2.10 + 'status', 2.11 'progress', 2.12 - 'eta', 2.13 'type', 2.14 'result', 2.15 'error_code', 2.16 'error_info'] 2.17 2.18 - task_attr_rw = ['name_label', 2.19 - 'name_description'] 2.20 + task_attr_rw = [] 2.21 2.22 task_funcs = [('get_by_name_label', 'Set(task)')] 2.23 2.24 @@ -517,10 +517,6 @@ class XendAPI(object): 2.25 task = XendTaskManager.get_task(task_ref) 2.26 return xen_api_success(task.progress) 2.27 2.28 - def task_get_eta(self, session, task_ref): 2.29 - task = XendTaskManager.get_task(task_ref) 2.30 - return xen_api_success(task.eta) 2.31 - 2.32 def task_get_type(self, session, task_ref): 2.33 task = XendTaskManager.get_task(task_ref) 2.34 return xen_api_success(task.type) 2.35 @@ -545,24 +541,10 @@ class XendAPI(object): 2.36 task = XendTaskManager.get_task(task_ref) 2.37 return xen_api_success(task.name_description) 2.38 2.39 - def task_set_name_label(self, session, task_ref, label): 2.40 - task = XendTaskManager.get_task(task_ref) 2.41 - task.name_label = label 2.42 - return xen_api_success_void() 2.43 - 2.44 - def task_set_name_description(self, session, task_ref, desc): 2.45 - task = XendTaskManager.get_task(task_ref) 2.46 - task.name_description = desc 2.47 - return xen_api_success_void() 2.48 - 2.49 def task_get_all(self, session): 2.50 tasks = XendTaskManager.get_all_tasks() 2.51 return xen_api_success(tasks) 2.52 2.53 - def task_destroy(self, session, task_uuid): 2.54 - XendTaskManager.destroy_task(task_uuid) 2.55 - return xen_api_success_void() 2.56 - 2.57 def task_get_record(self, session, task_ref): 2.58 task = XendTaskManager.get_task(task_ref) 2.59 return xen_api_success(task.get_record())