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-devel

[Xen-devel] Re: [PATCH] [XEN-API] Not raising an API error in VTPM destr

To: Stefan Berger <stefanb@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] [XEN-API] Not raising an API error in VTPM destroy method
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Thu, 8 Feb 2007 15:53:24 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 08 Feb 2007 07:53:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1170891439.4978.2.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1170891439.4978.2.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Feb 07, 2007 at 06:37:19PM -0500, Stefan Berger wrote:

> Don't return an API error if vTPM cannot be destroyed due to a running
> VM, but a value indicating failure instead. Adapt python code, libxen
> and documentation.
> 
> Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

We have a separate error-returning mechanism -- you should be using that
rather than returning an error code.  Take a look at the end of
xenapi-datamodel.tex; the error code definitions are there.  In XendAPI.py,
you have xen_api_error available, which will marshall an error code and
arguments, and in xen/xm/messages there is a translation database for those
error messages.

Cheers,

Ewan.

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