[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Send INTERNAL_ERROR rather than ERROR_TODO if device creation fails.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1175694832 -3600
# Node ID 610dcfb3c1641c7f62bf546aa4eea781aaa7999c
# Parent  e5931b5e6cc5202a9c86c3cd717580bead18c657
Send INTERNAL_ERROR rather than ERROR_TODO if device creation fails.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r e5931b5e6cc5 -r 610dcfb3c164 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Wed Apr 04 14:49:38 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Wed Apr 04 14:53:52 2007 +0100
@@ -2079,8 +2079,8 @@ class XendAPI(object):
             vif_ref = dom.create_vif(vif_struct)
             xendom.managed_config_save(dom)
             return xen_api_success(vif_ref)
-        except XendError:
-            return xen_api_error(XEND_ERROR_TODO)
+        except XendError, exn:
+            return xen_api_error(['INTERNAL_ERROR', str(exn)])
           
     def VIF_destroy(self, session, vif_ref):
         xendom = XendDomain.instance()
@@ -2367,8 +2367,8 @@ class XendAPI(object):
                 vtpm_ref = dom.create_vtpm(vtpm_struct)
                 xendom.managed_config_save(dom)
                 return xen_api_success(vtpm_ref)
-            except XendError:
-                return xen_api_error(XEND_ERROR_TODO)
+            except XendError, exn:
+                return xen_api_error(['INTERNAL_ERROR', str(exn)])
         else:
             return xen_api_error(['HANDLE_INVALID', 'VM', vtpm_struct['VM']])
 
@@ -2442,8 +2442,8 @@ class XendAPI(object):
             console_ref = dom.create_console(console_struct)
             xendom.managed_config_save(dom)
             return xen_api_success(console_ref)
-        except XendError, e:
-            return xen_api_error([XEND_ERROR_TODO, str(e)])
+        except XendError, exn:
+            return xen_api_error(['INTERNAL_ERROR', str(exn)])
 
     # Xen API: Class SR
     # ----------------------------------------------------------------

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.