diff -r f62a052384a5 tools/python/xen/xend/XendAPI.py --- a/tools/python/xen/xend/XendAPI.py Wed Feb 21 18:38:11 2007 -0800 +++ b/tools/python/xen/xend/XendAPI.py Fri Feb 23 10:33:54 2007 -0500 @@ -1900,7 +1900,7 @@ class XendAPI(object): XendDomain.POWER_STATE_NAMES[dom.state]]) from xen.xend.server import tpmif tpmif.destroy_vtpmstate(dom.getName()) - return xen_api_success(True) + return xen_api_success_void() else: return xen_api_error(['HANDLE_INVALID', 'VM', vtpm_struct['VM']]) diff -r f62a052384a5 tools/xm-test/tests/vtpm/09_vtpm-xapi.py --- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py Wed Feb 21 18:38:11 2007 -0800 +++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py Fri Feb 23 10:36:26 2007 -0500 @@ -113,7 +113,7 @@ if not re.search("PCR-00:",run["output"] FAIL("1. Virtual TPM is not working correctly on /dev/vtpm on backend side: \n%s" % run["output"]) try: - rc = session.xenapi.VTPM.destroy(vtpm_uuid) + session.xenapi.VTPM.destroy(vtpm_uuid) #Should never get here FAIL("Could destroy vTPM while VM is running") except: @@ -124,7 +124,7 @@ if rc: FAIL("Could not suspend VM") try: - rc = session.xenapi.VTPM.destroy(vtpm_uuid) + session.xenapi.VTPM.destroy(vtpm_uuid) #May not throw an exception in 'suspend' state except: pass @@ -150,8 +150,9 @@ if not re.search("PCR-00:",run["output"] domain.stop() -rc = session.xenapi.VTPM.destroy(vtpm_uuid) -if not rc: +try: + session.xenapi.VTPM.destroy(vtpm_uuid) +except: FAIL("Could NOT destroy vTPM while domain is halted.") domain.destroy()