WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Made task.name_* read-only (these are set

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Made task.name_* read-only (these are set by Xend) and drop task.eta.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 06:00:47 -0800
Delivery-date: Tue, 30 Jan 2007 06:03:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170005630 0
# Node ID 9521974ea1fa3461d05796e8e95a18773d18dd72
# Parent  207ee547b193865e669b75326472970e8c6054ed
Made task.name_* read-only (these are set by Xend) and drop task.eta.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex |  191 ++++++++------------------------------
 tools/python/xen/xend/XendAPI.py  |   26 -----
 2 files changed, 49 insertions(+), 168 deletions(-)

diff -r 207ee547b193 -r 9521974ea1fa docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Sun Jan 28 17:21:37 2007 +0000
+++ b/docs/xen-api/xenapi-datamodel.tex Sun Jan 28 17:33:50 2007 +0000
@@ -550,11 +550,10 @@ Quals & Field & Type & Description \\
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object 
reference \\
-$\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
-$\mathit{RW}$ &  {\tt name/description} & string & a notes field containg 
human-readable description \\
+$\mathit{RO}_\mathit{run}$ &  {\tt name/label} & string & a human-readable 
name \\
+$\mathit{RO}_\mathit{run}$ &  {\tt name/description} & string & a notes field 
containg human-readable description \\
 $\mathit{RO}_\mathit{run}$ &  {\tt status} & task\_status\_type & current 
status of the task \\
 $\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. \\
-$\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. \\
 $\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. \\
 $\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. \\
 $\mathit{RO}_\mathit{run}$ &  {\tt error\_code} & int & if the task has 
failed, this field contains the error code. Undefined otherwise. \\
@@ -647,13 +646,13 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
-\subsubsection{RPC name:~set\_name\_label}
-
-{\bf Overview:} 
-Set the name/label field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_name_label (session_id s, task ref self, string 
value)\end{verbatim}
+\subsubsection{RPC name:~get\_name\_description}
+
+{\bf Overview:} 
+Get the name/description field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_name_description (session_id s, task ref 
self)\end{verbatim}
 
 
 \noindent{\bf Arguments:}
@@ -665,29 +664,27 @@ Set the name/label field of the given ta
 {\bf type} & {\bf name} & {\bf description} \\ \hline
 {\tt task ref } & self & reference to the object \\ \hline 
 
-{\tt string } & 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}
-\subsubsection{RPC name:~get\_name\_description}
-
-{\bf Overview:} 
-Get the name/description field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} string get_name_description (session_id s, task ref 
self)\end{verbatim}
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_status}
+
+{\bf Overview:} 
+Get the status field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (task_status_type) get_status (session_id s, task ref 
self)\end{verbatim}
 
 
 \noindent{\bf Arguments:}
@@ -705,21 +702,21 @@ Get the name/description field of the gi
 
  \noindent {\bf Return Type:} 
 {\tt 
-string
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_name\_description}
-
-{\bf Overview:} 
-Set the name/description field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_name_description (session_id s, task ref self, 
string value)\end{verbatim}
+task\_status\_type
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_progress}
+
+{\bf Overview:} 
+Get the progress field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} int get_progress (session_id s, task ref self)\end{verbatim}
 
 
 \noindent{\bf Arguments:}
@@ -731,72 +728,6 @@ Set the name/description field of the gi
 {\bf type} & {\bf name} & {\bf description} \\ \hline
 {\tt task ref } & self & reference to the object \\ \hline 
 
-{\tt string } & 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}
-\subsubsection{RPC name:~get\_status}
-
-{\bf Overview:} 
-Get the status field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (task_status_type) get_status (session_id s, task 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 task ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-task\_status\_type
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_progress}
-
-{\bf Overview:} 
-Get the progress field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} int get_progress (session_id s, task 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 task ref } & self & reference to the object \\ \hline 
-
 \end{tabular}
 
 \vspace{0.3cm}
@@ -804,38 +735,6 @@ Get the progress field of the given task
  \noindent {\bf Return Type:} 
 {\tt 
 int
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_eta}
-
-{\bf Overview:} 
-Get the eta field of the given task.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} datetime get_eta (session_id s, task 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 task ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-datetime
 }
 
 
diff -r 207ee547b193 -r 9521974ea1fa tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Sun Jan 28 17:21:37 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Sun Jan 28 17:33:50 2007 +0000
@@ -496,16 +496,16 @@ class XendAPI(object):
     # Xen API: Class Tasks
     # ----------------------------------------------------------------
 
-    task_attr_ro = ['status',
+    task_attr_ro = ['name_label',
+                    'name_description',
+                    'status',
                     'progress',
-                    'eta',                    
                     'type',
                     'result',
                     'error_code',
                     'error_info']
 
-    task_attr_rw = ['name_label',
-                    'name_description']
+    task_attr_rw = []
 
     task_funcs = [('get_by_name_label', 'Set(task)')]
 
@@ -517,10 +517,6 @@ class XendAPI(object):
         task = XendTaskManager.get_task(task_ref)
         return xen_api_success(task.progress)
 
-    def task_get_eta(self, session, task_ref):
-        task = XendTaskManager.get_task(task_ref)
-        return xen_api_success(task.eta)
-
     def task_get_type(self, session, task_ref):
         task = XendTaskManager.get_task(task_ref)
         return xen_api_success(task.type)
@@ -545,23 +541,9 @@ class XendAPI(object):
         task = XendTaskManager.get_task(task_ref)
         return xen_api_success(task.name_description)
 
-    def task_set_name_label(self, session, task_ref, label):
-        task = XendTaskManager.get_task(task_ref)
-        task.name_label = label
-        return xen_api_success_void()
-
-    def task_set_name_description(self, session, task_ref, desc):
-        task = XendTaskManager.get_task(task_ref)
-        task.name_description = desc
-        return xen_api_success_void()    
-
     def task_get_all(self, session):
         tasks = XendTaskManager.get_all_tasks()
         return xen_api_success(tasks)
-
-    def task_destroy(self, session, task_uuid):
-        XendTaskManager.destroy_task(task_uuid)
-        return xen_api_success_void()
 
     def task_get_record(self, session, task_ref):
         task = XendTaskManager.get_task(task_ref)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Made task.name_* read-only (these are set by Xend) and drop task.eta., Xen patchbot-unstable <=