|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Make the VTPM.destroy method return 'void
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1173407572 0
# Node ID 5dd14bfbe956b107c8ca11fb475baca161ce4d16
# Parent b2f0840bb88fd3b6bd142287fdc5ac0525e14bbd
Make the VTPM.destroy method return 'void' upon success and adapt the
test case to reflect that.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 2 +-
tools/xm-test/tests/vtpm/09_vtpm-xapi.py | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff -r b2f0840bb88f -r 5dd14bfbe956 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Fri Mar 09 01:59:59 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py Fri Mar 09 02:32:52 2007 +0000
@@ -1926,7 +1926,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 b2f0840bb88f -r 5dd14bfbe956 tools/xm-test/tests/vtpm/09_vtpm-xapi.py
--- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py Fri Mar 09 01:59:59 2007 +0000
+++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py Fri Mar 09 02:32:52 2007 +0000
@@ -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()
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Make the VTPM.destroy method return 'void' upon success and adapt the,
Xen patchbot-unstable <=
|
|
|
|
|