From: Ewan Mellor Subject: Re: [PATCH] [XEN-API] Not raising an API error in VTPM destroy method Date: Thu, 8 Feb 2007 15:53:24 +0000 Message-ID: <20070208155324.GA2043@leeni.uk.xensource.com> References: <1170891439.4978.2.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1170891439.4978.2.camel@941e-2.watson.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefan Berger Cc: xen-devel List-Id: xen-devel@lists.xenproject.org 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 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.