Skip to contentSkip to conversation

Proper error from Xen-API call

PATCH New Stefan Berger 1 participant 1 message Apr 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Proper error from Xen-API call

Return a proper error when in the Xen-API call.
Fix a bug in the test.

xen-unstable.hg/tools/python/xen/xend/XendAPI.py +1 -1
Index: root/xen-unstable.hg/tools/python/xen/xend/XendAPI.py
===================================================================
@@ -2372,7 +2372,7 @@ class XendAPI(object):
         if not cfg:
             return xen_api_error(['HANDLE_INVALID', 'VTPM', vtpm_ref])
         if not cfg.has_key('backend'):
-            return xen_api_error(['VTPM backend not set'])
+            return xen_api_error(['INTERNAL_ERROR', 'VTPM backend not set'])
         return xen_api_success(cfg['backend'])
 
     def VTPM_get_VM(self, session, vtpm_ref):
xen-unstable.hg/tools/xm-test/tests/vtpm/09_vtpm-xapi.py +1 -1
Index: root/xen-unstable.hg/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
===================================================================
@@ -91,7 +91,7 @@ if vtpm_uuid not in vm_vtpms:
 try:
     console = domain.start()
 except DomainError, e:
-    FAIL("Unable to create domain (%s)")
+    FAIL("Unable to create domain.")
 
 try:
     console.sendInput("input")

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel