ia64/xen-unstable

changeset 14880:ed6de46738fd

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

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author Keir Fraser <keir@xensource.com>
date Thu Apr 19 19:29:45 2007 +0100 (2007-04-19)
parents 186e2cf99bbb
children 56fa8b1f8e08
files tools/python/xen/xend/XendAPI.py tools/xm-test/tests/vtpm/09_vtpm-xapi.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Thu Apr 19 19:29:19 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Thu Apr 19 19:29:45 2007 +0100
     1.3 @@ -2372,7 +2372,7 @@ class XendAPI(object):
     1.4          if not cfg:
     1.5              return xen_api_error(['HANDLE_INVALID', 'VTPM', vtpm_ref])
     1.6          if not cfg.has_key('backend'):
     1.7 -            return xen_api_error(['VTPM backend not set'])
     1.8 +            return xen_api_error(['INTERNAL_ERROR', 'VTPM backend not set'])
     1.9          return xen_api_success(cfg['backend'])
    1.10  
    1.11      def VTPM_get_VM(self, session, vtpm_ref):
     2.1 --- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py	Thu Apr 19 19:29:19 2007 +0100
     2.2 +++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py	Thu Apr 19 19:29:45 2007 +0100
     2.3 @@ -91,7 +91,7 @@ if vtpm_uuid not in vm_vtpms:
     2.4  try:
     2.5      console = domain.start()
     2.6  except DomainError, e:
     2.7 -    FAIL("Unable to create domain (%s)")
     2.8 +    FAIL("Unable to create domain.")
     2.9  
    2.10  try:
    2.11      console.sendInput("input")