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] Fix description of ErrorDescription to be

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix description of ErrorDescription to be all strings, and update the examples.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Dec 2006 06:55:06 -0800
Delivery-date: Fri, 22 Dec 2006 06:55:39 -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 1166788159 0
# Node ID 5675a2ac56e4b8904252b00c931415cf372ea787
# Parent  e45948c4dba4aab330f09b53c40cacd3ded2b4b9
Fix description of ErrorDescription to be all strings, and update the examples.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/wire-protocol.tex |   45 ++++++++++++++++++++++-------------------
 1 files changed, 25 insertions(+), 20 deletions(-)

diff -r e45948c4dba4 -r 5675a2ac56e4 docs/xen-api/wire-protocol.tex
--- a/docs/xen-api/wire-protocol.tex    Fri Dec 22 11:39:29 2006 +0000
+++ b/docs/xen-api/wire-protocol.tex    Fri Dec 22 11:49:19 2006 +0000
@@ -105,11 +105,13 @@ the struct contains a second element nam
 the struct contains a second element named {\tt ErrorDescription}:
 \begin{itemize}
 \item The element of the struct named {\tt ErrorDescription} contains
-an array of string values. The first element of the array is an XML-RPC 32-bit 
{\tt i4} and represents an error code;
-the remainder of the array are strings representing error parameters relating 
to that code.
-\end{itemize}
-
-For example, an XML-RPC return value from the {\tt Host.ListAllVMs} function 
above
+an array of string values. The first element of the array is an error code;
+the remainder of the array are strings representing error parameters relating
+to that code.
+\end{itemize}
+
+For example, an XML-RPC return value from the {\tt host.get_resident_VMs}
+function above
 may look like this:
 \begin{verbatim}
     <struct>
@@ -122,9 +124,9 @@ may look like this:
           <value>
             <array>
                <data>
-                 <value>vm-id-1</value>
-                 <value>vm-id-2</value>
-                 <value>vm-id-3</value>
+                 <value>81547a35-205c-a551-c577-00b982c5fe00</value>
+                 <value>61c85a22-05da-b8a2-2e55-06b0847da503</value>
+                 <value>1d401ec4-3c17-35a6-fc79-cee6bd9811fe</value>
                </data>
             </array>
          </value>
@@ -214,10 +216,12 @@ Create a python object referencing the r
 >>> xen = xmlrpclib.Server("http://test:4464";)
 \end{verbatim}
 
-Acquire a session token by logging in with a username and password 
(error-handling ommitted for brevity; the session token is pointed to by the 
key {\tt 'Value'} in the returned dictionary)
-
-\begin{verbatim}
->>> session = xen.Session.do_login_with_password("user", "passwd")['Value']
+Acquire a session token by logging in with a username and password
+(error-handling ommitted for brevity; the session token is pointed to by the
+key {\tt 'Value'} in the returned dictionary)
+
+\begin{verbatim}
+>>> session = session.login_with_password("user", "passwd")['Value']
 \end{verbatim}
 
 When serialised, this call looks like the following:
@@ -225,7 +229,7 @@ When serialised, this call looks like th
 \begin{verbatim}
 <?xml version='1.0'?>
 <methodCall>
-  <methodName>Session.do_login_with_password</methodName>
+  <methodName>session.login_with_password</methodName>
   <params>
     <param>
       <value><string>user</string></value>
@@ -237,10 +241,11 @@ When serialised, this call looks like th
 </methodCall>
 \end{verbatim}
 
-Next, the user may acquire a list of all the VMs known to the host: (Note the 
call takes the session token as the only parameter)
-
-\begin{verbatim}
->>> all_vms = xen.VM.do_list(session)['Value']
+Next, the user may acquire a list of all the VMs known to the host: (Note the
+call takes the session token as the only parameter)
+
+\begin{verbatim}
+>>> all_vms = host.get_resident_VMs(session)['Value']
 >>> all_vms
 ['b7b92d9e-d442-4710-92a5-ab039fd7d89b', 
'23e1e837-abbf-4675-b077-d4007989b0cc',
   '2045dbc0-0734-4eea-9cb2-b8218c6b5bf2', 
'3202ae18-a046-4c32-9fda-e32e9631866e']
@@ -249,15 +254,15 @@ Note the VM references are internally UU
 Note the VM references are internally UUIDs. Once a reference to a VM has been 
acquired a lifecycle operation may be invoked:
 
 \begin{verbatim}
->>> xen.VM.do_start(session, all_vms[3], False)
+>>> xen.VM.start(session, all_vms[3], False)
 {'Status': 'Failure', 'ErrorDescription': 'Operation not implemented'}
 \end{verbatim}
 
 In this case the {\tt start} message has not been implemented and an error 
response has been returned. Currently these high-level errors are returned as 
structured data (rather than as XMLRPC faults), allowing for internationalised 
errors in future. Finally, here are some examples of using accessors for object 
fields:
 
 \begin{verbatim}
->>> xen.VM.getname_label(session, all_vms[3])['Value']
+>>> xen.VM.get_name_label(session, all_vms[3])['Value']
 'SMP'
->>> xen.VM.getname_description(session, all_vms[3])['Value']
+>>> xen.VM.get_name_description(session, all_vms[3])['Value']
 'Debian for Xen'
 \end{verbatim}

_______________________________________________
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] Fix description of ErrorDescription to be all strings, and update the examples., Xen patchbot-unstable <=