[VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance

Make the vTPM hotplug script use the UUID of the vTPM instance for
associating it with its instance number rather than the name of the
domain.
Also change the cleanup in the xm test to use the atexit mechanism
rather than explicitly calling a function to clean up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-07-17 10:33:26 +01:00
1 parent 86de051ee1
commit f0a8a3f3fb
12 files changed
+78 -115

No files matched your search

+2 -1
View File
@@ -78,6 +78,7 @@ class XendDevices:
@param domain: domain this controller is handling devices for.
@type domain: XendDomainInfo
"""
tpmif.destroy_vtpmstate(domain.getName())
from xen.xend.XendLogging import log
tpmif.destroy_vtpmstate(domain.info.get('vtpm_refs'))
destroy_device_state = classmethod(destroy_device_state)
+3 -2
View File
@@ -31,9 +31,10 @@ import re
xoptions = XendOptions.instance()
def destroy_vtpmstate(name):
def destroy_vtpmstate(uuids):
if os.path.exists(VTPM_DELETE_SCRIPT):
os.system(VTPM_DELETE_SCRIPT + " " + name)
for uuid in uuids:
os.system(VTPM_DELETE_SCRIPT + " " + uuid)
class TPMifController(DevController):
"""TPM interface controller. Handles all TPM devices for a domain.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.